{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'configuration'} {/block} {block name="page-title"}{intl l='Edit a template'}{/block} {block name="check-resource"}admin.configuration.template{/block} {block name="check-access"}update{/block} {block name="main-content"}
{loop name="template_edit" type="product-template" id="$template_id" backend_context="1" lang="$edit_language_id"} {hook name="template-edit.top" template_id=$template_id}
{intl l='Edit template "%name"' name={$NAME}}
{form name="thelia.admin.template.modification"}
{* Be sure to get the template ID, even if the form could not be validated *} {include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/configuration/templates'}"} {form_hidden_fields} {form_field field='success_url'} {/form_field} {form_field field='locale'} {/form_field} {if $form_error}
{$form_error_message}
{/if} {form_field field='name'}
{/form_field}
{/form}

{intl l='Attributes'}

{intl l="Manage attributes included in this product template"}

{intl l='Features'}

{intl l="Manage features included in this product template"}

{$max_products = {$smarty.get.p|default:50}} {$total = {count type="product" backend_context=1 visible='*' template_id=$template_id}} {$not_loaded = $total - $max_products}

{intl l='Products using this template (%num)' num=$total}

{ifloop rel='prod-using'} {loop type="product" name="prod-using" backend_context=1 visible='*' template_id=$template_id limit=$max_products order='ref'} {$url = {url path="/admin/products/update" product_id=$ID}} {/loop}
{intl l="ID"} {intl l="Reference"} {intl l="Title"}
{$ID} {$REF} {$TITLE}
{if $total > $max_products}

{intl l="Showing %loaded products. Click here to load the %remaining other products" loaded=$max_products remaining=$not_loaded}

{/if} {/ifloop} {elseloop rel='prod-using'}
{intl l='This template is not used by any product.'}
{/elseloop}
{$max_categories = {$smarty.get.c|default:50}} {$total = {count type="category" name="cat-using" backend_context=1 visible='*' template_id=$template_id}} {$not_loaded = $total - $max_categories}

{intl l='Is the default template for categories (%num)' num={count type="category" backend_context=1 visible='*' template_id=$template_id}}

{ifloop rel='cat-using'} {loop type="category" name="cat-using" backend_context=1 visible='*' template_id=$template_id limit=$loaded_categories|default:null order='alpha'} {$url = {url path="/admin/categories/update" category_id=$ID}} {/loop}
{intl l="ID"} {intl l="Title"}
{$ID} {$TITLE}
{if $total > $max_categories}

{intl l="Showing %loaded categories. Click here to load the %remaining other categories" loaded=$max_categories remaining=$not_loaded}

{/if} {/ifloop} {elseloop rel='cat-using'}
{intl l='No categories are using this template as the default.'}
{/elseloop}
{hook name="template-edit.bottom" template_id=$template_id} {/loop} {elseloop rel="template_edit"}
{intl l="Sorry, template ID=%id was not found." id={$template_id}}
{/elseloop}
{/block} {block name="javascript-initialization"} {javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'} {/javascripts} {/block} {block name="javascript-last-call"} {hook name="template.edit-js" location="template-edit-js" } {/block}