finish simple list customer page in backoffice
This commit is contained in:
@@ -35,6 +35,6 @@ class CustomerController extends BaseAdminController
|
|||||||
{
|
{
|
||||||
if (null !== $response = $this->checkAuth("admin.customers.view")) return $response;
|
if (null !== $response = $this->checkAuth("admin.customers.view")) return $response;
|
||||||
|
|
||||||
return $this->render("customers");
|
return $this->render("customers", array("display_customer" => 20));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
{extends file="admin-layout.tpl"}
|
{extends file="admin-layout.tpl"}
|
||||||
|
|
||||||
{block name="page-title"}{intl l='Customer'}{/block}
|
{block name="page-title"}{intl l='Customer'}{/block}
|
||||||
@@ -5,6 +6,9 @@
|
|||||||
{block name="check-permissions"}admin.customer.view{/block}
|
{block name="check-permissions"}admin.customer.view{/block}
|
||||||
|
|
||||||
{block name="main-content"}
|
{block name="main-content"}
|
||||||
|
{assign var=customer_page value={$smarty.get.page|default:1}}
|
||||||
|
|
||||||
|
|
||||||
<div class="catalog">
|
<div class="catalog">
|
||||||
<div id="wrapper" class="container">
|
<div id="wrapper" class="container">
|
||||||
|
|
||||||
@@ -21,7 +25,7 @@
|
|||||||
{module_include location='customer_list_caption'}
|
{module_include location='customer_list_caption'}
|
||||||
|
|
||||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"}
|
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"}
|
||||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new category'}" href="#add_category_dialog" data-toggle="modal">
|
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new Customer'}" href="#add_customer_dialog" data-toggle="modal">
|
||||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||||
</a>
|
</a>
|
||||||
{/loop}
|
{/loop}
|
||||||
@@ -31,7 +35,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="object-title">
|
<th class="object-title">
|
||||||
{intl l="customer ref"}
|
{intl l="customer ref"} {$customer_current_page} toto
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th class="object-title">
|
<th class="object-title">
|
||||||
@@ -55,7 +59,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{loop name="customer_list" type="customer" visible="*" last_order="1" backend_context="1"}
|
{loop name="customer_list" type="customer" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{#REF}</td>
|
<td>{#REF}</td>
|
||||||
|
|
||||||
@@ -102,6 +106,33 @@
|
|||||||
|
|
||||||
|
|
||||||
{module_include location='customer_bottom'}
|
{module_include location='customer_bottom'}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 text-center">
|
||||||
|
|
||||||
|
<ul class="pagination pagination-centered">
|
||||||
|
{if #customer_page != 1}
|
||||||
|
<li><a href="{url path="/admin/customers" page="1"}">«</a></li>
|
||||||
|
{else}
|
||||||
|
<li class="disabled"><a href="#">«</a></li>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{pageloop rel="customer_list"}
|
||||||
|
{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 == #LAST && #LAST != #CURRENT}
|
||||||
|
<li><a href="{url path="/admin/customers" page="#PAGE"}">»</a></li>
|
||||||
|
{else}
|
||||||
|
<li class="disabled"><a href="#">»</a></li>
|
||||||
|
{/if}
|
||||||
|
{/pageloop}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user