New mode kaban for products list
This commit is contained in:
parent
cdcd54e6fe
commit
1c108f3583
@ -6238,6 +6238,61 @@ class Product extends CommonObject
|
||||
|
||||
return $prodDurationHours;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return clicable link of object (with eventually picto)
|
||||
*
|
||||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
|
||||
* @return string HTML Code for Kanban thumb.
|
||||
*/
|
||||
public function getKanbanView($option = '')
|
||||
{
|
||||
global $langs,$conf;
|
||||
|
||||
$return = '<div class="box-flex-item box-flex-grow-zero">';
|
||||
$return .= '<div class="info-box info-box-sm">';
|
||||
$return .= '<div class="info-box-img">';
|
||||
$label = '';
|
||||
|
||||
if ($this->is_photo_available($conf->product->multidir_output[$this->entity])) {
|
||||
$label .= $this->show_photos('product', $conf->product->multidir_output[$this->entity]);
|
||||
$return .= $label;
|
||||
} else {
|
||||
if ($this->type == Product::TYPE_PRODUCT) {
|
||||
$label .= img_picto('', 'product');
|
||||
} elseif ($this->type == Product::TYPE_SERVICE) {
|
||||
$label .= img_picto('', 'service');
|
||||
}
|
||||
$return .= $label;
|
||||
}
|
||||
|
||||
$return .= '</div>';
|
||||
$return .= '<div class="info-box-content">';
|
||||
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
||||
if (property_exists($this, 'label')) {
|
||||
$return .= '<br><span class="info-box-label opacitymedium">'.$this->label.'</span>';
|
||||
}
|
||||
if (property_exists($this, 'price') && property_exists($this, 'price_ttc')) {
|
||||
if ($this->price_base_type == 'TTC') {
|
||||
$return .= '<br><span class="info-box-status amount">'.price($this->price_ttc).' '.$langs->trans("TTC").'</span>';
|
||||
} else {
|
||||
if ($this->status) {
|
||||
$return .= '<br><span class="info-box-status amount">'.price($this->price).' '.$langs->trans("HT").'</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (property_exists($this, 'stock_reel')) {
|
||||
$return .= '<br><span class="info-box-status opacitymedium">'.$langs->trans('PhysicalStock').' : <span class="bold">'.$this->stock_reel.'</span></span>';
|
||||
}
|
||||
if (method_exists($this, 'getLibStatut')) {
|
||||
$return .='<br><span class="info-box-status margintoponly">'.$this->getLibStatut(5, 1).' '.$this->getLibStatut(5, 0).'</span>';
|
||||
}
|
||||
$return .= '</div>';
|
||||
$return .= '</div>';
|
||||
$return .= '</div>';
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -173,6 +173,31 @@ a.info-box-text-a i.fa.fa-exclamation-triangle {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
/* customize section img box on list of products */
|
||||
.info-box-img {
|
||||
height: 105px !important;
|
||||
width: 88px;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 2px;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
text-align: center;
|
||||
font-size: 2.8em;
|
||||
line-height: 90px;
|
||||
margin-right: 5px;
|
||||
background: var(--colorbacktitle1) !important;
|
||||
}
|
||||
.info-box-img > img {
|
||||
width: 90%;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
<?php if (empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS) && !empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD)) { ?>
|
||||
.info-box-icon-text{
|
||||
opacity: 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user