{extends file="admin-layout.tpl"} {block name="page-title"}{intl l='Customer'}{/block} {block name="check-permissions"}admin.customer.view{/block} {block name="main-content"} {assign var=customer_page value={$smarty.get.page|default:1}}
{module_include location='customer_top'}
{ifloop rel="customer_list"} {module_include location='category_list_header'} {loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}} {module_include location='customer_list_row'} {/loop} {/ifloop}
{intl l="Customers list"} {module_include location='customer_list_caption'} {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"} {/loop}
{intl l="customer ref"} {intl l="company"} {intl l="firstname & lastname"} {intl l="last order"} {intl l='order amount'} {intl l='Actions'}
{$REF} {$COMPANY} {$FIRSTNAME} {$LASTNAME} {format_date date=$LASTORDER_DATE} {format_number number=$LASTORDER_AMOUNT}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.customer.edit"} {/loop} {loop type="auth" name="can_send_mail" roles="ADMIN" permissions="admin.customer.sendMail"} {/loop} {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.customer.delete"} {/loop}
{module_include location='customer_bottom'}
    {if $customer_page != 1}
  • «
  • {else}
  • «
  • {/if} {pageloop rel="customer_list"} {if $PAGE != $CURRENT}
  • {$PAGE}
  • {else}
  • {$PAGE}
  • {/if} {if $PAGE == $LAST && $LAST != $CURRENT}
  • »
  • {else}
  • »
  • {/if} {/pageloop}
{* Adding a new Category *} {form name="thelia.customer.creation"} {* Capture the dialog body, to pass it to the generic dialog *} {capture "customer_creation_dialog"} {form_hidden_fields form=$form} {form_field form=$form field='success_url'} {* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *} {/form_field} {form_field form=$form field='company'}
{/form_field} {form_field form=$form field='title'}
{/form_field} {form_field form=$form field='firstname'}
{/form_field} {form_field form=$form field='lastname'}
{/form_field} {form_field form=$form field='address1'}
{form_field form=$form field='address2'} {/form_field}
{form_field form=$form field='address3'} {/form_field}
{/form_field} {form_field form=$form field='zipcode'}
{/form_field} {form_field form=$form field='city'}
{/form_field} {form_field form=$form field='country'}
{/form_field} {form_field form=$form field='email'}
{/form_field} {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "add_customer_dialog" dialog_title = {intl l="Create a new customer"} dialog_body = {$smarty.capture.customer_creation_dialog nofilter} dialog_ok_label = {intl l="Create this customer"} dialog_cancel_label = {intl l="Cancel"} form_action = {url path='/admin/customer/create'} form_enctype = {form_enctype form=$form} form_error_message = $form_error_message } {/form} {* Delete confirmation dialog *} {capture "delete_customer_dialog"} {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "delete_customer_dialog" dialog_title = {intl l="Delete customer"} dialog_message = {intl l="Do you really want to delete this customer ?"} form_action = {url path='/admin/customer/delete'} form_content = {$smarty.capture.delete_dialog nofilter} } {/block}