@@ -1,5 +1,6 @@
|
||||
#order
|
||||
max_displayed_orders = 20
|
||||
max_displayed_customers = 20
|
||||
|
||||
#order status
|
||||
order_not_paid = 'warning'
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="customer_list" type="customer" current="false" visible="*" order=$customer_order backend_context="1" page=$page limit=$display_customer}
|
||||
{loop name="customer_list" type="customer" current="false" visible="*" order=$customer_order backend_context="1" page=$page limit=#max_displayed_customers#}
|
||||
{assign "lastOrderDate" ''}
|
||||
{assign "lastOrderAmount" ''}
|
||||
{assign "lastOrderCurrency" ''}
|
||||
@@ -179,34 +179,13 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
{include
|
||||
file = "includes/pagination.html"
|
||||
|
||||
<div class="text-center">
|
||||
<ul class="pagination pagination-centered">
|
||||
|
||||
{if $page != 1}
|
||||
<li><a href="{url path="/admin/customers" page="1"}">«</a></li>
|
||||
{/if}
|
||||
{pageloop rel="customer_list" numPage="20"}
|
||||
{if $PAGE == $CURRENT && $PAGE > 2}
|
||||
<li><a href="{url path="/admin/customers" page=$PREV}">‹</a></li>
|
||||
{/if}
|
||||
|
||||
{if $PAGE != $CURRENT}
|
||||
<li><a href="{url path="/admin/customers" page="{$PAGE}"}">{$PAGE}</a></li>
|
||||
|
||||
{else}
|
||||
<li class="active"><a href="#">{$PAGE}</a></li>
|
||||
{/if}
|
||||
|
||||
{if $PAGE == $END && $PAGE < $LAST}
|
||||
<li><a href="{url path="/admin/customers" page=$NEXT}">›</a></li>
|
||||
{/if}
|
||||
{/pageloop}
|
||||
{if $LAST > $CURRENT}
|
||||
<li><a href="{url path="/admin/customers" page="$LAST"}">»</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
loop_ref = "customer_list"
|
||||
max_page_count = 10
|
||||
page_url = "{url path="/admin/customers" customer_order=$customer_order}"
|
||||
}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
69
templates/backOffice/default/includes/pagination.html
Normal file
69
templates/backOffice/default/includes/pagination.html
Normal file
@@ -0,0 +1,69 @@
|
||||
{*
|
||||
A generic pager for thelia back-office
|
||||
|
||||
Parameters :
|
||||
|
||||
$loop_ref: the name of the related loop
|
||||
$max_page_count : maximum number of pages to display
|
||||
$page_url : the URL of the page. The parameter page=x is appended to this URL.
|
||||
|
||||
*}
|
||||
|
||||
{* Prepare the URL so that the page=x parameter coumd be safely appended *}
|
||||
|
||||
{if strpos($page_url, '?')}
|
||||
{$page_url="$page_url&"}
|
||||
{else}
|
||||
{$page_url="$page_url?"}
|
||||
{/if}
|
||||
|
||||
<div class="text-center">
|
||||
<ul class="pagination pagination-centered">
|
||||
{pageloop rel=$loop_ref limit=$max_page_count}
|
||||
{$prev_page = $PREV}
|
||||
{$next_page = $NEXT}
|
||||
{$last_page = $LAST}
|
||||
{$has_prev = $CURRENT > 1}
|
||||
{$has_next = $CURRENT < $LAST}
|
||||
|
||||
{$has_pages_after = $END < $LAST && $LAST > $max_page_count}
|
||||
{$has_pages_before = $START > 1}
|
||||
|
||||
{if $PAGE == $START}
|
||||
{if $has_prev}
|
||||
<li><a title="{intl l="Go to first page"}" href="{$page_url}page=1">«</a></li>
|
||||
<li><a title="{intl l="Go to previous page"}" href="{$page_url}page=$prev_page">‹</a></li>
|
||||
|
||||
{if $has_pages_before}
|
||||
<li title="{intl l="More pages before"}" class="disabled"><a href="#">…</a></li>
|
||||
{/if}
|
||||
|
||||
{else}
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
<li class="disabled"><a href="#">‹</a></li>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $PAGE != $CURRENT}
|
||||
<li><a href="{$page_url}page={$PAGE}">{$PAGE}</a></li>
|
||||
{else}
|
||||
<li class="active"><a href="#">{$PAGE}</a></li>
|
||||
{/if}
|
||||
|
||||
{if $PAGE == $END}
|
||||
{if $has_next}
|
||||
{if $has_pages_after}
|
||||
<li title="{intl l="More pages after"}" class="disabled"><a href="#">…</a></li>
|
||||
{/if}
|
||||
|
||||
<li><a title="{intl l="Go to next page"}" href="{$page_url}page={$next_page}">›</a></li>
|
||||
<li><a title="{intl l="Go to last page"}" href="{$page_url}page={$last_page}">»</a></li>
|
||||
|
||||
{else}
|
||||
<li class="disabled"><a href="#">›</a></li>
|
||||
<li class="disabled"><a href="#">»</a></li>
|
||||
{/if}
|
||||
{/if}
|
||||
{/pageloop}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -150,32 +150,13 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
{include
|
||||
file = "includes/pagination.html"
|
||||
|
||||
<div class="text-center">
|
||||
<ul class="pagination pagination-centered">
|
||||
{if $order_page != 1}
|
||||
<li><a href="{url path="/admin/orders" page=1 orders_order=$orders_order}">«</a></li>
|
||||
{else}
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
{/if}
|
||||
|
||||
{pageloop rel="order-list"}
|
||||
{if $PAGE != $CURRENT}
|
||||
<li><a href="{url path="/admin/orders" page=$PAGE orders_order=$orders_order}">{$PAGE}</a></li>
|
||||
|
||||
{else}
|
||||
<li class="active"><a href="#">{$PAGE}</a></li>
|
||||
{/if}
|
||||
|
||||
|
||||
{/pageloop}
|
||||
{if $PAGE == $LAST && $LAST != $CURRENT}
|
||||
<li><a href="{url path="/admin/orders" page=$PAGE orders_order=$orders_order}">»</a></li>
|
||||
{else}
|
||||
<li class="disabled"><a href="#">»</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
loop_ref = "order-list"
|
||||
max_page_count = 10
|
||||
page_url = "{url path="/admin/orders" orders_order=$orders_order}"
|
||||
}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user