{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'catalog'} {/block} {block name="check-resource"}admin.category{/block} {block name="check-access"}update{/block} {block name="page-title"}{intl l='Edit category'}{/block} {block name="main-content"}
{include file="includes/catalog-breadcrumb.html" editing_category="true"} {hook name="category-edit.top" category_id=$category_id}
{loop name="category_edit" type="category" visible="*" id="{$category_id}" backend_context="1" with_prev_next_info="true" lang="$edit_language_id"} {* Define close url *} {if $PARENT gt 0} {assign var='close_url' value="{url path='/admin/categories' category_id=$PARENT}"} {else} {assign var='close_url' value="{url path='/admin/catalog'}"} {/if}
{intl l='Edit category %title' title={$TITLE}}
{hookblock name="category.tab" id="{$category_id}" fields="id,title,href,content"} {capture "category_tab_tab"} {forhook rel="category.tab"}
  • {$title}
  • {/forhook} {/capture} {capture "category_tab_content"} {forhook rel="category.tab"}
    {if $href} {* ajax *}
    {intl l="Please wait, loading"}
    {else} {$content nofilter} {/if}
    {/forhook} {/capture} {/hookblock}
    {form name="thelia.admin.category.modification"}
    {include file="includes/inner-form-toolbar.html" close_url=$close_url } {* Be sure to get the category ID, even if the form could not be validated *} {form_hidden_fields exclude="parent"} {render_form_field field='success_url' value={$close_url}} {* Display error message if exist *} {include file='includes/notifications.html' message=$form_error_message}
    {include file="includes/standard-description-form-fields.html"}
    {hook name="category.modification.form-right.top" category_id=$category_id} {custom_render_form_field field='parent'} {/custom_render_form_field} {render_form_field field="default_template_id"} {form_field field="visible"} {/form_field} {hook name="category.modification.form-right.bottom" category_id=$category_id}
    {include file="includes/inner-form-toolbar.html" hide_submit_buttons = false hide_flags = true close_url=$close_url } {intl l='Category created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}
    {/form}
    {include file="includes/seo-tab.html" formAction = "{url path='/admin/categories/seo/save'}" pageUrl = "{url path='/admin/categories/update' category_id=$ID}" current_id = $ID closeUrl = $close_url success_url = $close_url seoType = 'category' }
    {hook name="category.contents-table-header" location="category_contents_table_header" } {loop name="assigned_contents" type="associated_content" category="$ID" backend_context="1" lang="$edit_language_id"} {hook name="category.contents-table-row" location="category_contents_table_row" } {/loop} {elseloop rel="assigned_contents"} {/elseloop}
    {intl l='ID'} {intl l='Content title'}{intl l="Actions"}
    {$CONTENT_ID} {$TITLE} {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.category" access="UPDATE"} {/loop}
    {intl l="This category contains no contents"}
    {ifhook rel="item.edition.images"} {hook name="item.edition.images" itemType='category' itemId=$ID resource="admin.category"} {/ifhook} {elsehook rel="item.edition.images"}
    {include file='includes/image-upload-form.html' imageType='category' parentId=$ID resource="admin.category"}
    {/elsehook}
    {include file='includes/document-upload-form.html' documentType='category' parentId=$ID resource="admin.category"}
    {$smarty.capture.category_tab_content nofilter}
    {include file = "includes/inner-form-toolbar.html" hide_submit_buttons = true page_url = $pageUrl|default:null close_url = $closeUrl|default:null current_tab = "modules" }
    {* ugly fix : {hook name="category.tab-content" id="{$category_id}" view="category"} *} {include file="includes/module-tab-content.html" hook="category.tab-content" location="category-edit" id="{$category_id}" view="category"}
    {/loop}
    {hook name="category-edit.bottom" category_id=$category_id}
    {* Delete related content confirmation dialog *} {capture "delete_content_dialog"} {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "delete_content_dialog" dialog_title = {intl l="Remove related content"} dialog_message = {intl l="Do you really want to remove this related content ?"} form_action = {token_url path='/admin/categories/related-content/delete'} form_content = {$smarty.capture.delete_content_dialog nofilter} } {/block} {block name="javascript-initialization"} {javascripts file='assets/js/dropzone.js'} {/javascripts} {javascripts file='assets/js/image-upload.js'} {/javascripts} {javascripts file='assets/js/document-upload.js'} {/javascripts} {javascripts file='assets/js/jquery-ui-1.10.3.custom.min.js'} {/javascripts} {/block} {block name="javascript-last-call"} {hook name="category.edit-js" location="category-edit-js" category_id=$category_id} {hook name="wysiwyg.js" location="wysiwyg-category-edit-js" } {/block}