diff --git a/admin-dev/themes/default/template/controllers/modules_positions/form.tpl b/admin-dev/themes/default/template/controllers/modules_positions/form.tpl index ebd8d9dbc..9f0c61090 100644 --- a/admin-dev/themes/default/template/controllers/modules_positions/form.tpl +++ b/admin-dev/themes/default/template/controllers/modules_positions/form.tpl @@ -49,38 +49,10 @@ * - -
+ {l s='Please specify the files for which you do not want the module to be displayed.'}
+ {l s='Please input each filename, separated by a comma.'}
{if !$except_diff} {$exception_list} {else} @@ -88,9 +60,6 @@ {$value} {/foreach} {/if} - {l s='Please specify the files for which you do not want the module to be displayed.'}.
- {l s='Please input each filename, separated by a comma.'}. -

@@ -102,4 +71,48 @@
* {l s='Required field'}
- \ No newline at end of file + + diff --git a/controllers/admin/AdminModulesPositionsController.php b/controllers/admin/AdminModulesPositionsController.php index 8b7820b19..400611f8c 100644 --- a/controllers/admin/AdminModulesPositionsController.php +++ b/controllers/admin/AdminModulesPositionsController.php @@ -393,21 +393,35 @@ class AdminModulesPositionsControllerCore extends AdminController if (!is_array($file_list)) $file_list = ($file_list) ? array($file_list) : array(); - $content = ''; + $content = ''; if ($shop_id) { $shop = new Shop($shop_id); $content .= ' ('.$shop->name.')'; } - $content .= '
+ '; + // @todo do something better with controllers $controllers = Dispatcher::getControllers(_PS_FRONT_CONTROLLER_DIR_); ksort($controllers); + + foreach ($file_list as $k => $v) + if ( ! array_key_exists ($v, $controllers)) + $content .= ' + '; + + $content .= ' + '; foreach ($controllers as $k => $v) - $content .= ''; - $content .= ' -

'; + $content .= ' + '; + + $content .= ' + + '; return $content; }