fix front
This commit is contained in:
parent
d636934b5a
commit
4d5dd0a75d
@ -118,6 +118,9 @@ class AdminAntTrackingTag extends AdminTab
|
||||
{
|
||||
$customer_numbers = AntTrackingTag::getCountCustomerByTag((int)$tag['id_trackingtag']);
|
||||
$total = 0;
|
||||
foreach ($customer_numbers as $info) {
|
||||
$total += (int)$info['nb'];
|
||||
}
|
||||
|
||||
$this->_html .='
|
||||
<tr>
|
||||
@ -125,16 +128,9 @@ class AdminAntTrackingTag extends AdminTab
|
||||
<td valign="middle" align="left"><b>'.$tag['name'].'</b></td>
|
||||
<td valign="middle" align="left"><b>'.$tag['tag'].'</b></td>
|
||||
<td align="center">'.((int)$tag['enabled']?'<span class="anticon anticon-checkmark text-green-light"></span>':'<span class="anticon anticon-cross text-rose"></span>').'</td>
|
||||
<td valign="middle" align="center">';
|
||||
foreach ($customer_numbers as $info) {
|
||||
$total += (int)$info['nb'];
|
||||
$this->_html.='
|
||||
<button class="btn btn-primary btn-xs" type="button">
|
||||
'.$info['value'].' <span class="badge">'.$info['nb'].'</span>
|
||||
</button> ';
|
||||
}
|
||||
$this->_html.=
|
||||
'</td>
|
||||
<td valign="middle" align="center">
|
||||
<a class="text-purple-dark" data-toggle="collapse" data-target=".row_more_'.$tag['id_trackingtag'].'"><span style="font-size:21px;cursor:pointer" class="anticon anticon-info"></span></a>
|
||||
</td>
|
||||
<td valign="middle" align="center">'.$total.'</td>
|
||||
<td valign="middle" align="center">
|
||||
<div class="input-group-btn" role="group" aria-label="...">
|
||||
@ -142,6 +138,22 @@ class AdminAntTrackingTag extends AdminTab
|
||||
<a href="'.$_current_index.'&deleteTag=1&id='.$tag['id_trackingtag'].'" class="btn btn-default"><span class="anticon anticon-bin"></span></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="collapse row_more_'.$tag['id_trackingtag'].'">
|
||||
<td colspan="7">
|
||||
Compteurs ordonnés par nb
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="collapse row_more_'.$tag['id_trackingtag'].'">
|
||||
<td colspan="7">';
|
||||
foreach ($customer_numbers as $info) {
|
||||
$this->_html.='
|
||||
<button class="btn btn-primary btn-xs" type="button">
|
||||
'.$info['value'].' <span class="badge">'.$info['nb'].'</span>
|
||||
</button> ';
|
||||
}
|
||||
$this->_html.='
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
$this->_html .='
|
||||
|
@ -99,7 +99,8 @@ class AntTrackingTag extends ObjectModel
|
||||
SELECT COUNT(id_customer) as `nb`, `value`
|
||||
FROM `"._DB_PREFIX_."ant_trackingtag_customer`
|
||||
WHERE `id_trackingtag` = " . (int)$id_trackingtag."
|
||||
GROUP BY `value`"
|
||||
GROUP BY `value`
|
||||
ORDER BY `nb` DESC"
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user