{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'}
{hook name='brands.table-header' location='brands_table_header'} {loop name="brands" type="brand" visible="*" backend_context="1" lang=$lang_id order=$order return_url=false} {hook name='brands.table-row' location='brands_table_row' brand_id={$ID}} {/loop} {elseloop rel="brands"} {/elseloop}
{intl l='Brands'} {include file='renderer/buttons.html' btn_group=false buttons=[ [ 'type' => 'create', 'class' => 'action-btn', 'title' => {intl l='Add a new brand'}, 'href' => '#creation_dialog', 'auth' => ['resource' => 'admin.brand'], 'data' => [ 'toggle' => 'modal' ] ] ]}
{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=$order order='visible' reverse_order='visible-reverse' path={url path='/admin/brand'} label="{intl l='Online'}" } {intl l='Actions'}
{$ID} {loop type="image" name="folder_image" source="brand" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"} {$TITLE} {/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}
{include file='renderer/buttons.html' buttons=[ [ 'type' => 'edit', 'title' => {intl l='Change this brand'}, 'href' => {url path="/admin/brand/update/%id" id=$ID}, 'auth' => ['resource' => 'admin.brand'] ], [ 'type' => 'delete', 'class' => 'brand-delete', 'title' => {intl l='Delete this brand'}, 'href' => '#delete_dialog', 'data' => [ 'id' => $ID, 'toggle' => 'modal' ], 'auth' => ['resource' => 'admin.brand'] ] ]}
{intl l="No brand has been created yet. Click the + button to create one."}
{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}
{$TITLE}
{/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}