diff --git a/templates/backOffice/default/customers.html b/templates/backOffice/default/customers.html index ba59f4693..9a16031b0 100644 --- a/templates/backOffice/default/customers.html +++ b/templates/backOffice/default/customers.html @@ -1,368 +1,390 @@ - -{extends file="admin-layout.tpl"} - -{block name="page-title"}{intl l='Customer'}{/block} - -{block name="check-resource"}admin.customer{/block} -{block name="check-access"}view{/block} - -{block name="main-content"} -
-
- - - - {module_include location='customer_top'} - -
-
-
- {if $removal_error } -
- - -
- {/if} -
- - - - {ifloop rel="customer_list"} - - - - - {module_include location='customer_list_header'} - - - - - - - - - - -{* TODO - - - -*} - - - - - - {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" ''} - - {loop type="order" name="last-order" customer=$ID order="create-date-reverse" limit="1"} - {assign "lastOrderDate" "{format_date date=$CREATE_DATE}"} - {assign "lastOrderAmount" "{format_number number=$TOTAL_TAXED_AMOUNT}"} - {loop type="currency" name="order-currency" id=$CURRENCY} - {assign "lastOrderCurrency" $SYMBOL} - {/loop} - {/loop} - - - - - - - - - - {module_include location='customer_list_row'} - - - - - - - - - - {/loop} - - - - - - - {/ifloop} -
- {intl l="Customers list"} - - {module_include location='customer_list_caption'} - - {loop type="auth" name="can_create" role="ADMIN" resource="admin.customer" access="CREATE"} - - - - {/loop} -
- {admin_sortable_header - current_order=$customer_order - order='reference' - reverse_order='reference_reverse' - path={url path='/admin/customers'} - request_parameter_name='customer_order' - label="{intl l='Reference'}" - } - - {admin_sortable_header - current_order=$customer_order - order='lastname' - reverse_order='lastname_reverse' - path={url path='/admin/customers'} - request_parameter_name='customer_order' - label="{intl l='Last name'}" - } - - {admin_sortable_header - current_order=$customer_order - order='firstname' - reverse_order='firstname_reverse' - path={url path='/admin/customers'} - request_parameter_name='customer_order' - label="{intl l='First name'}" - } - - {admin_sortable_header - current_order=$customer_order - order='registration_date' - reverse_order='registration_date_reverse' - path={url path='/admin/customers'} - request_parameter_name='customer_order' - label="{intl l='Registration date'}" - } - {intl l='Date of last order'}{intl l='Last order amount'} - {admin_sortable_header - current_order=$customer_order - order='last_order' - reverse_order='last_order_reverse' - path={url path='/admin/customers'} - request_parameter_name='customer_order' - label="{intl l='Date of last order'}" - } - - {admin_sortable_header - current_order=$customer_order - order='order_amount' - reverse_order='order_amount_reverse' - path={url path='/admin/customers'} - request_parameter_name='customer_order' - label="{intl l='Last order amount'}" - } - {intl l='Actions'}
{$REF} - {$LASTNAME} - - {$FIRSTNAME} - - {format_date date=$CREATE_DATE} - - {$lastOrderDate} - - {$lastOrderCurrency} {$lastOrderAmount} - -
- - {loop type="auth" name="can_change" role="ADMIN" resource="admin.customer" access="UPDATE"} - - {/loop} - {loop type="auth" name="can_send_mail" role="ADMIN" resource="admin.customer" access="VIEW"} - - {/loop} - {loop type="auth" name="can_delete" role="ADMIN" resource="admin.customer" access="DELETE"} - - {/loop} -
-
- {include - file = "includes/pagination.html" - - loop_ref = "customer_list" - max_page_count = 10 - page_url = "{url path="/admin/customers" customer_order=$customer_order}" - } -
-
-
-
-
- - - {module_include location='customer_bottom'} - - {* Adding a new Category *} - - - {form name="thelia.admin.customer.create"} - - {* 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="password"} - - {/form_field} - - {form_field form=$form field="password_confirm"} - - {/form_field} - - {form_field form=$form field="agreed"} - - {/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} - - {module_include location='customer_create_form'} - - {/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"} - - - - {module_include location='customer_delete_form'} - {/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_customer_dialog nofilter} - form_id = "form_delete_customer" - } - -{/block} - -{block name="javascript-initialization"} - - - -{/block} - -{block name="javascript-last-call"} - {module_include location='customers-js'} + +{extends file="admin-layout.tpl"} + +{block name="page-title"}{intl l='Customer'}{/block} + +{block name="check-resource"}admin.customer{/block} +{block name="check-access"}view{/block} + +{block name="main-content"} +
+
+ + + + {module_include location='customer_top'} + +
+
+
+ {if $removal_error } +
+ + +
+ {/if} +
+ + + + {ifloop rel="customer_list"} + + + + + {module_include location='customer_list_header'} + + + + + + + + + + +{* TODO + + + +*} + + + + + + {loop name="customer_list" type="customer" current="false" visible="*" order=$customer_order backend_context="1" page=$page limit=$display_customer} + {assign "lastOrderDate" ''} + {assign "lastOrderAmount" ''} + {assign "lastOrderCurrency" ''} + + {loop type="order" name="last-order" customer=$ID order="create-date-reverse" limit="1"} + {assign "lastOrderDate" "{format_date date=$CREATE_DATE}"} + {assign "lastOrderAmount" "{format_number number=$TOTAL_TAXED_AMOUNT}"} + {loop type="currency" name="order-currency" id=$CURRENCY} + {assign "lastOrderCurrency" $SYMBOL} + {/loop} + {/loop} + + + + + + + + + + {module_include location='customer_list_row'} + + + + + + + + + + {/loop} + + + + + + + {/ifloop} +
+ {intl l="Customers list"} + + {module_include location='customer_list_caption'} + + {loop type="auth" name="can_create" role="ADMIN" resource="admin.customer" access="CREATE"} + + + + {/loop} +
+ {admin_sortable_header + current_order=$customer_order + order='reference' + reverse_order='reference_reverse' + path={url path='/admin/customers'} + request_parameter_name='customer_order' + label="{intl l='Reference'}" + } + + {admin_sortable_header + current_order=$customer_order + order='lastname' + reverse_order='lastname_reverse' + path={url path='/admin/customers'} + request_parameter_name='customer_order' + label="{intl l='Last name'}" + } + + {admin_sortable_header + current_order=$customer_order + order='firstname' + reverse_order='firstname_reverse' + path={url path='/admin/customers'} + request_parameter_name='customer_order' + label="{intl l='First name'}" + } + + {admin_sortable_header + current_order=$customer_order + order='registration_date' + reverse_order='registration_date_reverse' + path={url path='/admin/customers'} + request_parameter_name='customer_order' + label="{intl l='Registration date'}" + } + {intl l='Date of last order'}{intl l='Last order amount'} + {admin_sortable_header + current_order=$customer_order + order='last_order' + reverse_order='last_order_reverse' + path={url path='/admin/customers'} + request_parameter_name='customer_order' + label="{intl l='Date of last order'}" + } + + {admin_sortable_header + current_order=$customer_order + order='order_amount' + reverse_order='order_amount_reverse' + path={url path='/admin/customers'} + request_parameter_name='customer_order' + label="{intl l='Last order amount'}" + } + {intl l='Actions'}
{$REF} + {$LASTNAME} + + {$FIRSTNAME} + + {format_date date=$CREATE_DATE} + + {$lastOrderDate} + + {$lastOrderCurrency} {$lastOrderAmount} + +
+ + {loop type="auth" name="can_change" role="ADMIN" resource="admin.customer" access="UPDATE"} + + {/loop} + {loop type="auth" name="can_send_mail" role="ADMIN" resource="admin.customer" access="VIEW"} + + {/loop} + {loop type="auth" name="can_delete" role="ADMIN" resource="admin.customer" access="DELETE"} + + {/loop} +
+
+ +
+
    + + {if $page != 1} +
  • «
  • + {/if} + {pageloop rel="customer_list" numPage="20"} + {if $PAGE == $CURRENT && $PAGE > 2} +
  • + {/if} + + {if $PAGE != $CURRENT} +
  • {$PAGE}
  • + + {else} +
  • {$PAGE}
  • + {/if} + + {if $PAGE == $END && $PAGE < $LAST} +
  • + {/if} + {/pageloop} + {if $LAST > $CURRENT} +
  • »
  • + {/if} +
+
+ +
+
+
+
+
+ + + {module_include location='customer_bottom'} + + {* Adding a new Category *} + + + {form name="thelia.admin.customer.create"} + + {* 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="password"} + + {/form_field} + + {form_field form=$form field="password_confirm"} + + {/form_field} + + {form_field form=$form field="agreed"} + + {/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} + + {module_include location='customer_create_form'} + + {/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"} + + + + {module_include location='customer_delete_form'} + {/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_customer_dialog nofilter} + form_id = "form_delete_customer" + } + +{/block} + +{block name="javascript-initialization"} + + + +{/block} + +{block name="javascript-last-call"} + {module_include location='customers-js'} {/block} \ No newline at end of file