1{** 2 * Copyright since 2007 PrestaShop SA and Contributors 3 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA 4 * 5 * NOTICE OF LICENSE 6 * 7 * This source file is subject to the Open Software License (OSL 3.0) 8 * that is bundled with this package in the file LICENSE.md. 9 * It is also available through the world-wide-web at this URL: 10 * https://opensource.org/licenses/OSL-3.0 11 * If you did not receive a copy of the license and are unable to 12 * obtain it through the world-wide-web, please send an email 13 * to license@prestashop.com so we can send you a copy immediately. 14 * 15 * DISCLAIMER 16 * 17 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 18 * versions in the future. If you wish to customize PrestaShop for your 19 * needs please refer to https://devdocs.prestashop.com/ for more information. 20 * 21 * @author PrestaShop SA and Contributors <contact@prestashop.com> 22 * @copyright Since 2007 PrestaShop SA and Contributors 23 * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) 24 *} 25 </table> 26</div> 27<div class="row"> 28 <div class="col-lg-8"> 29 {if $bulk_actions} 30 <div class="btn-group bulk-actions"> 31 <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> 32 {l s='Bulk actions' d='Admin.Global'} <span class="caret"></span> 33 </button> 34 <ul class="dropdown-menu"> 35 <li> 36 <a href="#" onclick="javascript:checkDelBoxes($(this).closest('form').get(0), '{$table}Box[]', true);return false;"> 37 <i class="icon-check-sign"></i> {l s='Select all' d='Admin.Actions'} 38 </a> 39 </li> 40 <li> 41 <a href="#" onclick="javascript:checkDelBoxes($(this).closest('form').get(0), '{$table}Box[]', false);return false;"> 42 <i class="icon-check-empty"></i> {l s='Unselect all' d='Admin.Actions'} 43 </a> 44 </li> 45 <li class="divider"></li> 46 {foreach $bulk_actions as $key => $params} 47 <li{if $params.text == 'divider'} class="divider"{/if}> 48 {if $params.text != 'divider'} 49 <a href="#" onclick="{if isset($params.confirm)}if (confirm('{$params.confirm}')){/if}sendBulkAction($(this).closest('form').get(0), 'submitBulk{$key}{$table}');"> 50 {if isset($params.icon)}<i class="{$params.icon}"></i>{/if} {$params.text} 51 </a> 52 {/if} 53 </li> 54 {/foreach} 55 </ul> 56 </div> 57 {/if} 58 </div> 59 {if !$simple_header && $list_total > $pagination[0]} 60 <div class="col-lg-4"> 61 {* Choose number of results per page *} 62 <div class="pagination"> 63 {l s='Display' d='Admin.Actions'} 64 <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> 65 {$selected_pagination} 66 <i class="icon-caret-down"></i> 67 </button> 68 <ul class="dropdown-menu"> 69 {foreach $pagination AS $value} 70 <li> 71 <a href="javascript:void(0);" class="pagination-items-page" data-items="{$value|intval}" data-list-id="{$list_id}">{$value}</a> 72 </li> 73 {/foreach} 74 </ul> 75 / {$list_total} {l s='result(s)' d='Admin.Global'} 76 <input type="hidden" id="{$list_id}-pagination-items-page" name="{$list_id}_pagination" value="{$selected_pagination|intval}" /> 77 </div> 78 <script type="text/javascript"> 79 $('.pagination-items-page').on('click',function(e){ 80 e.preventDefault(); 81 $('#'+$(this).data("list-id")+'-pagination-items-page').val($(this).data("items")).closest("form").submit(); 82 }); 83 </script> 84 <ul class="pagination pull-right"> 85 <li {if $page <= 1}class="disabled"{/if}> 86 <a href="javascript:void(0);" class="pagination-link" data-page="1" data-list-id="{$list_id}"> 87 <i class="icon-double-angle-left"></i> 88 </a> 89 </li> 90 <li {if $page <= 1}class="disabled"{/if}> 91 <a href="javascript:void(0);" class="pagination-link" data-page="{$page - 1}" data-list-id="{$list_id}"> 92 <i class="icon-angle-left"></i> 93 </a> 94 </li> 95 {assign p 0} 96 {while $p++ < $total_pages} 97 {if $p < $page-2} 98 <li class="disabled"> 99 <a href="javascript:void(0);">…</a> 100 </li> 101 {assign p $page-3} 102 {elseif $p > $page+2} 103 <li class="disabled"> 104 <a href="javascript:void(0);">…</a> 105 </li> 106 {assign p $total_pages} 107 {else} 108 <li {if $p == $page}class="active"{/if}> 109 <a href="javascript:void(0);" class="pagination-link" data-page="{$p}" data-list-id="{$list_id}">{$p}</a> 110 </li> 111 {/if} 112 {/while} 113 <li {if $page >= $total_pages}class="disabled"{/if}> 114 <a href="javascript:void(0);" class="pagination-link" data-page="{$page + 1}" data-list-id="{$list_id}"> 115 <i class="icon-angle-right"></i> 116 </a> 117 </li> 118 <li {if $page >= $total_pages}class="disabled"{/if}> 119 <a href="javascript:void(0);" class="pagination-link" data-page="{$total_pages}" data-list-id="{$list_id}"> 120 <i class="icon-double-angle-right"></i> 121 </a> 122 </li> 123 </ul> 124 <script type="text/javascript"> 125 $('.pagination-link').on('click',function(e){ 126 e.preventDefault(); 127 128 if (!$(this).parent().hasClass('disabled')) 129 $('#submitFilter'+$(this).data("list-id")).val($(this).data("page")).closest("form").submit(); 130 }); 131 </script> 132 </div> 133 {/if} 134</div> 135{if !$simple_header} 136 <input type="hidden" name="token" value="{$token|escape:'html':'UTF-8'}" /> 137 </div> 138 {hook h='displayAdminListAfter'} 139</form> 140{/if} 141{if isset($name_controller)} 142 {capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListAfter{/capture} 143 {hook h=$hookName} 144{elseif isset($smarty.get.controller)} 145 {capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}ListAfter{/capture} 146 {hook h=$hookName} 147{/if} 148 149 150{block name="after"}{/block} 151