[+] BO : New Bulk actions button
This commit is contained in:
@@ -25,11 +25,21 @@
|
||||
</table>
|
||||
|
||||
{if $bulk_actions}
|
||||
<p>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
{l s='Bulk actions'} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href=""><i class="icon-check-sign"></i> {l s='Select all'}</a></li>
|
||||
<li><a href=""><i class="icon-check-empty"></i> {l s='Unselect all'}</a></li>
|
||||
<li class="divider"></li>
|
||||
{foreach $bulk_actions as $key => $params}
|
||||
<input type="submit" class="btn btn-default" name="submitBulk{$key}{$table}" value="{$params.text}" {if isset($params.confirm)}onclick="return confirm('{$params.confirm}');"{/if} />
|
||||
<li{if $params.text == 'divider'} class="divider"{/if}>
|
||||
{if $params.text != 'divider'}<a href=""><i class="{$params.icon}"></i> {$params.text}</a>{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</p>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !$simple_header && $list_total > 20}
|
||||
|
||||
@@ -38,7 +38,13 @@ class AdminSuppliersControllerCore extends AdminController
|
||||
$this->addRowAction('delete');
|
||||
$this->allow_export = true;
|
||||
|
||||
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'icon' => $this->l('icon-trash'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
|
||||
$this->_select = 'COUNT(DISTINCT ps.`id_product`) AS products';
|
||||
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product_supplier` ps ON (a.`id_supplier` = ps.`id_supplier`)';
|
||||
|
||||
Reference in New Issue
Block a user