{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"} {$label} {/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' }
{include file="includes/inner-form-toolbar.html" hide_submit_buttons=true close_url=$close_url }

{intl l='Related content'}

{intl l='You can attach here some content to this category'}

{ifloop rel="folders"}
{intl l='Select a folder to get its content'}
{intl l='Select a content and click (+) to add it to this category'}
{intl l="No available content in this folder"}
{/ifloop} {elseloop rel="folders"}
{intl l="No folders found"}
{/elseloop}

{intl l='ID'} | {intl l='Content title'} {hook name="category.contents-table-header" location="category_contents_table_header" } | {intl l="Actions"}
--- | --- | ---
{loop name="assigned_contents" type="associated_content" category="$ID" backend_context="1" lang="$edit_language_id"}
{$CONTENT_ID} | {$TITLE} {hook name="category.contents-table-row" location="category_contents_table_row" } | {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.category" access="UPDATE"} {/loop}
{/loop} {elseloop rel="assigned_contents"}
{intl l="This category contains no contents"}
{/elseloop}

{include file='includes/image-upload-form.html' imageType='category' parentId=$ID resource="admin.category"}
{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} close_url = {$closeUrl} 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}