{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'tools'} {/block} {block name="page-title"}{intl l='Brands'}{/block} {block name="check-resource"}admin.brand{/block} {block name="check-access"}view{/block} {block name="main-content"}
{hook name='brands.top' location='brands_top'}

{intl l='Brands'} {loop type="auth" name="can_create" role="ADMIN" resource="admin.brand" access="CREATE"} {/loop}
{admin_sortable_header current_order=$order order='id' reverse_order='id-reverse' path='/admin/brand' label="{intl l='ID'}" } |  | {admin_sortable_header current_order=$order order='alpha' reverse_order='alpha-reverse' path='/admin/brand' label="{intl l='Name'}" } | {admin_sortable_header current_order=$order order='manual' reverse_order='manual-reverse' path='/admin/brand' label="{intl l="Position"}" } | {admin_sortable_header current_order=$content_order order='visible' reverse_order='visible-reverse' path={url path='/admin/brand'} label="{intl l='Online'}" } {hook name='brands.table-header' location='brands_table_header'} | {intl l='Actions'}
--- | --- | --- | --- | --- | ---
{loop name="brands" type="brand" visible="*" backend_context="1" lang=$lang_id order=$order return_url=false}
{$ID} | {loop type="image" name="folder_image" source="brand" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"} {/loop} | {loop type="auth" name="can_change" role="ADMIN" resource="admin.brand" access="UPDATE"} {$TITLE} {/loop} {elseloop rel="can_change"} {$TITLE} {/elseloop} | {admin_position_block resource="admin.brand" access="UPDATE" path="/admin/brand/update-position" url_parameter="brand_id" in_place_edit_class="brandPositionChange" position="$POSITION" id="$ID" } | {loop type="auth" name="can_change" role="ADMIN" resource="admin.brand" access="UPDATE"} {/loop} {elseloop rel="can_change"} {/elseloop} {hook name='brands.table-row' location='brands_table_row' brand_id={$ID}} | {loop type="auth" name="can_change" role="ADMIN" resource="admin.brand" access="UPDATE"} {/loop} {loop type="auth" name="can_delete" role="ADMIN" resource="admin.brand" access="DELETE"} {/loop}
{/loop} {elseloop rel="brands"}
{intl l="No brand has been created yet. Click the + button to create one."}
{/elseloop}

{hook name='brands.bottom' location='brands_bottom'}
{* Adding a new brand *} {form name="thelia.admin.brand.creation"} {* Capture the dialog body, to pass it to the generic dialog *} {capture "creation_dialog"} {form_hidden_fields exclude="locale"} {render_form_field field="success_url" value={url path='/admin/brand/update/_ID_'}} {custom_render_form_field field="title"} {loop type="lang" name="default-lang" default_only="1"} {* Switch edition to the current locale *} {render_form_field field="locale" value=$LOCALE}
{/loop} {/custom_render_form_field} {custom_render_form_field field="visible"} {$label} {/custom_render_form_field} {hook name='brand.create-form' location='brand_create_form'} {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "creation_dialog" dialog_title = {intl l="Create a new brand"} dialog_body = {$smarty.capture.creation_dialog nofilter} dialog_ok_label = {intl l="Create this brand"} form_action = {url path='/admin/brand/create'} form_enctype = {form_enctype} form_error_message = $form_error_message } {/form} {* Delete confirmation dialog *} {capture "delete_dialog"} {hook name='brand.delete-form' location='brand_delete_form'} {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "delete_dialog" dialog_title = {intl l="Delete brand"} dialog_message = {intl l="Do you really want to delete this brand ?"} form_action = {token_url path='/admin/brand/delete'} form_content = {$smarty.capture.delete_dialog nofilter} } {/block} {block name="javascript-initialization"} {javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
{/javascripts} {javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
{/javascripts}
{/block} {block name="javascript-last-call"} {hook name='brand.js' location='brand_js'} {/block}