diff --git a/templates/backOffice/default/category-edit.html b/templates/backOffice/default/category-edit.html index e2d414565..b2011dea2 100755 --- a/templates/backOffice/default/category-edit.html +++ b/templates/backOffice/default/category-edit.html @@ -6,298 +6,287 @@ {block name="page-title"}{intl l='Edit category'}{/block} {block name="main-content"} -
-
- {include file="includes/catalog-breadcrumb.html" editing_category="true"} +
+
-
- {loop name="category_edit" type="category" visible="*" id="{$category_id}" backend_context="1" lang="$edit_language_id"} -
-
-
- {intl l='Edit category %title' title=$TITLE} -
+ {include file="includes/catalog-breadcrumb.html" editing_category="true"} /{$category_id}/{$edit_language_id}/ -
+
+ {loop name="category_edit" type="category" visible="*" id="{$category_id}" backend_context="1" lang="$edit_language_id"} - {if $HAS_PREVIOUS != 0} - - {else} - - {/if} + {* 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} - - {if $HAS_NEXT != 0} - - {else} - - {/if} -
-
+
+
+
+ {intl l='Edit category %title' title=$TITLE} +
-
-
+
+ + + +
+
- +
+
-
+ -
+
-
+
- {form name="thelia.admin.category.modification"} -
+
- {include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/categories' category_id=$PARENT}"} + {form name="thelia.admin.category.modification"} + - {* Be sure to get the category ID, even if the form could not be validated *} - + {include + file="includes/inner-form-toolbar.html" + close_url=$close_url + } - + {form_hidden_fields form=$form} - {form_hidden_fields form=$form} + {form_field form=$form field='success_url'} + + {/form_field} - {form_field form=$form field='success_url'} - - {/form_field} + {if $form_error and $form_error_message}{include file='includes/notifications.html' message=$form_error_message}{/if} - {form_field form=$form field='locale'} - - {/form_field} +
+
+ {include file="includes/standard-description-form-fields.html"} +
- {if $form_error}
{$form_error_message}
{/if} +
+ {form_field form=$form field='parent'} +
-
-
+ - {include file="includes/standard-description-form-fields.html"} + +
+ {/form_field} + + {form_field form=$form field='visible'} +
+ +
+ +
+
+ {/form_field} +
-
+ {include + file="includes/inner-form-toolbar.html" + hide_submit_buttons = false + hide_flags = true + close_url=$close_url + } - {form_field form=$form field='parent'} -
+ {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} +
+
- -
- {/form_field} - - {form_field form=$form field='visible'} -
- -
- -
-
- {/form_field} -
-
- - {include - file="includes/inner-form-toolbar.html" - hide_submit_buttons = false - hide_flags = true - - close_url="{url path='/admin/categories' category_id=$PARENT}" +
+ {form name="thelia.admin.seo"} + {include file="includes/seo-tab.html" + form = $form + formAction = "{url path='/admin/categories/seo/save'}" + closeUrl = $close_url } + {/form} +
- {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/inner-form-toolbar.html" + hide_submit_buttons=true + close_url=$close_url + } -
- {form name="thelia.admin.seo"} - {include file="includes/seo-tab.html" - form = $form - formAction = "{url path='/admin/categories/seo/save'}" - closeUrl = "{url path='/admin/categories' category_id=$PARENT}" - } - {/form} -
+

{intl l='Related content'}

+

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

-
-
-
- -
- {/ifloop} +
+ + + + - {elseloop rel="folders"} -
{intl l="No folders found"}
- {/elseloop} + - - + {module_include location='category_contents_table_header'} -
-
{intl l='ID'}{intl l='Content title'}
- - - + + + - + + {loop name="assigned_contents" type="associated_content" category="$category_id" backend_context="1" lang="$edit_language_id"} + + - {module_include location='category_contents_table_header'} + - - - + {module_include location='category_contents_table_row'} - - {loop name="assigned_contents" type="associated_content" category="$category_id" backend_context="1" lang="$edit_language_id"} - - + + + {/loop} - + {elseloop rel="assigned_contents"} + + + + {/elseloop} + +
{intl l='ID'}{intl l="Actions"}
{intl l='Content title'}
{$ID}{$TITLE}{intl l="Actions"}
{$ID} +
+ {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.category" access="UPDATE"} + + + + {/loop} +
+
- {$TITLE} -
+
+ {intl l="This category contains no contents"} +
+
+
+
+
- {module_include location='category_contents_table_row'} +
+ {include file='includes/image-upload-form.html' imageType='category' parentId=$category_id} +
- -
- {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.category" access="UPDATE"} - - - - {/loop} -
- - - {/loop} +
+ {include file='includes/document-upload-form.html' documentType='category' parentId=$category_id} +
- {elseloop rel="assigned_contents"} - - -
- {intl l="This category contains no contents"} -
- - - {/elseloop} - - -
-
-
- -
- {include file='includes/image-upload-form.html' imageType='category' parentId=$category_id} -
- -
- {include file='includes/document-upload-form.html' documentType='category' parentId=$category_id} -
- -
-
-
+
+ {module_include location='category-edit'} +
+
+
-
- {/loop} -
-
-
+ {/loop} +
+
+
-{* Delete related content confirmation dialog *} + {* Delete related content confirmation dialog *} -{capture "delete_content_dialog"} - - - + {capture "delete_content_dialog"} + + + - -{/capture} + + {/capture} -{include - file = "includes/generic-confirm-dialog.html" + {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 ?"} + 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 = {url path='/admin/categories/related-content/delete'} - form_content = {$smarty.capture.delete_content_dialog nofilter} -} + form_action = {url path='/admin/categories/related-content/delete'} + form_content = {$smarty.capture.delete_content_dialog nofilter} + } {/block} {block name="javascript-initialization"} @@ -348,6 +337,9 @@ $(function() { $('#folder_delete_id').val($('#folder_id').val()); }); + // Load active tab + $('.nav-tabs a[href="#{$current_tab}"]').trigger("click"); + // Load content on folder selection $('#folder_id').change(function(event) {