diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Module.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Module.php index 77715cad6..84e8c4c86 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Module.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Module.php @@ -67,7 +67,7 @@ class Module extends AbstractSmartyPlugin if (false !== $location = $this->getParam($params, 'location', false)) { if ($this->debug === true && $this->request->get('SHOW_INCLUDE')) { - echo sprintf('
%s
', $location); + echo sprintf('
%s
', $location); } $moduleLimit = $this->getParam($params, 'module', null); @@ -83,9 +83,14 @@ class Module extends AbstractSmartyPlugin $file = sprintf("%s/AdminIncludes/%s.html", $module->getAbsoluteBaseDir(), $location); if (file_exists($file)) { - $content .= file_get_contents($file); - $count++; + $output = trim(file_get_contents($file)); + + if (! empty($output)) { + $content .= $output; + + $count++; + } } } } diff --git a/templates/backOffice/default/category-edit.html b/templates/backOffice/default/category-edit.html index 02e48bc63..4d9682d7a 100644 --- a/templates/backOffice/default/category-edit.html +++ b/templates/backOffice/default/category-edit.html @@ -271,13 +271,8 @@ } - {module_include location='category-edit' countvar='module_count'} + {include file="includes/module-tab-content.html" location="category-edit"} - {if $module_count == 0} -
- {intl l="There is currently no active module here."} -
- {/if} diff --git a/templates/backOffice/default/content-edit.html b/templates/backOffice/default/content-edit.html index 3c238b8da..b5a41c230 100644 --- a/templates/backOffice/default/content-edit.html +++ b/templates/backOffice/default/content-edit.html @@ -7,190 +7,184 @@ {block name="main-content"}
-
+
- {include file="includes/folder-breadcrumb.html" editing_content="true"} - -
- {loop name="content_edit" type="content" visible="*" id="{$content_id}" backend_context="1" lang="$edit_language_id"} -
-
-
- {intl l='Edit content %title' title=$TITLE} -
- -
- - {if $HAS_PREVIOUS != 0} - - {else} - - {/if} - - - - {if $HAS_NEXT != 0} - - {else} - - {/if} -
-
- -
-
- - - -
- -
- -
- - {form name="thelia.admin.content.modification"} -
- - {include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/folders' parent=$DEFAULT_FOLDER}"} - - {* Be sure to get the folder ID, even if the form could not be validated *} - - - - - {form_hidden_fields form=$form} - - {form_field form=$form field='success_url'} - - {/form_field} - - {form_field form=$form field='locale'} - - {/form_field} - - {if $form_error}
{$form_error_message}
{/if} + {include file="includes/folder-breadcrumb.html" editing_content="true"} +
+ {loop name="content_edit" type="content" visible="*" id="{$content_id}" backend_context="1" lang="$edit_language_id"} +
-
- {include file="includes/standard-description-form-fields.html"} +
+ {intl l='Edit content %title' title=$TITLE}
-
+
- {form_field form=$form field='default_folder'} -
+ {if $HAS_PREVIOUS != 0} + + {else} + + {/if} - + - -
- {/form_field} - - {form_field form=$form field='visible'} -
- -
- -
-
- {/form_field} + {if $HAS_NEXT != 0} + + {else} + + {/if}
- {include - file="includes/inner-form-toolbar.html" - hide_submit_buttons = false - hide_flags = true +
+
- close_url="{url path='/admin/folders' parent=$DEFAULT_FOLDER}" - } + - {intl l='Folder created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"} +
- - {/form} +
+ +
+ + {form name="thelia.admin.content.modification"} +
+ + {include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/folders' parent=$DEFAULT_FOLDER}"} + + {* Be sure to get the folder ID, even if the form could not be validated *} + + + + + {form_hidden_fields form=$form} + + {form_field form=$form field='success_url'} + + {/form_field} + + {form_field form=$form field='locale'} + + {/form_field} + + {if $form_error} +
{$form_error_message}
{/if} + +
+
+ {include file="includes/standard-description-form-fields.html"} +
+ +
+ + {form_field form=$form field='default_folder'} +
+ + + + +
+ {/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/folders' parent=$DEFAULT_FOLDER}" + } + + {intl l='Folder created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"} + +
+ {/form} +
+
+ +
+ {form name="thelia.admin.seo"} + {include file="includes/seo-tab.html" + form = $form + formAction = "{url path='/admin/content/seo/save'}" + closeUrl = "{url path='/admin/folders' parent=$DEFAULT_FOLDER}" + current_id = $content_id + } + {/form} +
+ +
+ {include file="includes/content-folder-management.html"} +
+ +
+ {include file='includes/image-upload-form.html' imageType='content' parentId=$content_id} +
+ +
+ {include file='includes/document-upload-form.html' documentType='content' parentId=$content_id} +
+ +
+
+ {include + file = "includes/inner-form-toolbar.html" + hide_submit_buttons = true + page_url = {$pageUrl} + close_url = {$closeUrl} + current_tab = "modules" + } +
+ + {include file="includes/module-tab-content.html" location="content-edit"} +
+
+
+
+
+ {/loop}
- -
- {form name="thelia.admin.seo"} - {include file="includes/seo-tab.html" - form = $form - formAction = "{url path='/admin/content/seo/save'}" - closeUrl = "{url path='/admin/folders' parent=$DEFAULT_FOLDER}" - current_id = $content_id - } - {/form} -
- -
- {include file="includes/content-folder-management.html"} -
- -
- {include file='includes/image-upload-form.html' imageType='content' parentId=$content_id} -
- -
- {include file='includes/document-upload-form.html' documentType='content' parentId=$content_id} -
- -
-
- {include - file = "includes/inner-form-toolbar.html" - hide_submit_buttons = true - page_url = {$pageUrl} - close_url = {$closeUrl} - current_tab = "modules" - } -
- - {module_include location='content-edit' countvar='module_count'} - - {if $module_count == 0} -
- {intl l="There is currently no active module here."} -
- {/if} -
-
-
-
-
- {/loop}
-
-
- - -{* Delete category confirmation dialog *} + {* Delete category confirmation dialog *} {capture "delete_folder_dialog"} - - - - + + + {/capture} {include @@ -220,13 +214,12 @@ form_content = {$smarty.capture.delete_folder_dialog nofilter} {javascripts file='assets/js/jquery-ui-1.10.3.custom.min.js'} {/javascripts} -