From e9dbadcabfe3a876596a24f5013c68399eb92506 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Wed, 11 Sep 2013 20:41:14 +0200 Subject: [PATCH] // Tree --- .../helpers/tree/tree_categories.tpl | 108 +++++++ ...ategory.tpl => tree_node_folder_radio.tpl} | 0 ..._category.tpl => tree_node_item_radio.tpl} | 4 +- .../template/helpers/tree/tree_categories.tpl | 116 ++++++++ .../helpers/tree/tree_node_folder.tpl | 1 - .../tree/tree_node_folder_checkbox.tpl} | 4 +- .../tree/tree_node_folder_radio.tpl} | 4 +- .../tree/tree_node_item_checkbox.tpl} | 4 +- .../tree/tree_node_item_radio.tpl} | 4 +- classes/helper/HelperForm.php | 14 +- classes/helper/HelperTreeCategories.php | 265 ++++++++++++++++++ .../ITreeToolbar.php} | 2 +- .../ITreeToolbarButton.php} | 2 +- .../{helper/HelperTree.php => tree/Tree.php} | 64 ++++- .../TreeToolbar.php} | 6 +- .../TreeToolbarButton.php} | 2 +- .../TreeToolbarLink.php} | 4 +- .../TreeToolbarSearch.php} | 4 +- .../admin/AdminCategoriesController.php | 71 +---- controllers/admin/AdminProductsController.php | 193 +------------ 20 files changed, 587 insertions(+), 285 deletions(-) create mode 100644 admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_categories.tpl rename admin-dev/themes/default/template/controllers/categories/helpers/tree/{tree_node_folder_category.tpl => tree_node_folder_radio.tpl} (100%) rename admin-dev/themes/default/template/controllers/categories/helpers/tree/{tree_node_item_category.tpl => tree_node_item_radio.tpl} (88%) create mode 100644 admin-dev/themes/default/template/helpers/tree/tree_categories.tpl rename admin-dev/themes/default/template/{controllers/products/helpers/tree/tree_node_folder_associations.tpl => helpers/tree/tree_node_folder_checkbox.tpl} (84%) rename admin-dev/themes/default/template/{controllers/products/helpers/tree/tree_node_folder.tpl => helpers/tree/tree_node_folder_radio.tpl} (84%) rename admin-dev/themes/default/template/{controllers/products/helpers/tree/tree_node_item_associations.tpl => helpers/tree/tree_node_item_checkbox.tpl} (84%) rename admin-dev/themes/default/template/{controllers/products/helpers/tree/tree_node_item.tpl => helpers/tree/tree_node_item_radio.tpl} (84%) create mode 100644 classes/helper/HelperTreeCategories.php rename classes/{helper/HelperITreeToolbar.php => tree/ITreeToolbar.php} (97%) rename classes/{helper/HelperITreeToolbarButton.php => tree/ITreeToolbarButton.php} (97%) rename classes/{helper/HelperTree.php => tree/Tree.php} (88%) rename classes/{helper/HelperTreeToolbar.php => tree/TreeToolbar.php} (96%) rename classes/{helper/HelperTreeToolbarButton.php => tree/TreeToolbarButton.php} (98%) rename classes/{helper/HelperTreeToolbarLink.php => tree/TreeToolbarLink.php} (94%) rename classes/{helper/HelperTreeToolbarSearch.php => tree/TreeToolbarSearch.php} (96%) diff --git a/admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_categories.tpl b/admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_categories.tpl new file mode 100644 index 000000000..d738beea3 --- /dev/null +++ b/admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_categories.tpl @@ -0,0 +1,108 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
+ {if isset($header)}{$header}{/if} + {if isset($nodes)} +
    + {$nodes} +
+ {/if} +
+ \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_node_folder_category.tpl b/admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_node_folder_radio.tpl similarity index 100% rename from admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_node_folder_category.tpl rename to admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_node_folder_radio.tpl diff --git a/admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_node_item_category.tpl b/admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_node_item_radio.tpl similarity index 88% rename from admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_node_item_category.tpl rename to admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_node_item_radio.tpl index 7cffdc99d..d53652678 100644 --- a/admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_node_item_category.tpl +++ b/admin-dev/themes/default/template/controllers/categories/helpers/tree/tree_node_item_radio.tpl @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -
  • -
  • +
  • diff --git a/admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_folder_associations.tpl b/admin-dev/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl similarity index 84% rename from admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_folder_associations.tpl rename to admin-dev/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl index 2d76f50d3..80083b3d9 100644 --- a/admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_folder_associations.tpl +++ b/admin-dev/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl @@ -23,8 +23,8 @@ * International Registered Trademark & Property of PrestaShop SA *}
  • - - + + diff --git a/admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_folder.tpl b/admin-dev/themes/default/template/helpers/tree/tree_node_folder_radio.tpl similarity index 84% rename from admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_folder.tpl rename to admin-dev/themes/default/template/helpers/tree/tree_node_folder_radio.tpl index 91bfdcf67..33af6b61a 100644 --- a/admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_folder.tpl +++ b/admin-dev/themes/default/template/helpers/tree/tree_node_folder_radio.tpl @@ -23,8 +23,8 @@ * International Registered Trademark & Property of PrestaShop SA *}
  • - - + + diff --git a/admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_item_associations.tpl b/admin-dev/themes/default/template/helpers/tree/tree_node_item_checkbox.tpl similarity index 84% rename from admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_item_associations.tpl rename to admin-dev/themes/default/template/helpers/tree/tree_node_item_checkbox.tpl index 6aeccb01a..ca0235597 100644 --- a/admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_item_associations.tpl +++ b/admin-dev/themes/default/template/helpers/tree/tree_node_item_checkbox.tpl @@ -22,9 +22,9 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -
  • +
  • diff --git a/admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_item.tpl b/admin-dev/themes/default/template/helpers/tree/tree_node_item_radio.tpl similarity index 84% rename from admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_item.tpl rename to admin-dev/themes/default/template/helpers/tree/tree_node_item_radio.tpl index b32174dea..911a69bdc 100644 --- a/admin-dev/themes/default/template/controllers/products/helpers/tree/tree_node_item.tpl +++ b/admin-dev/themes/default/template/helpers/tree/tree_node_item_radio.tpl @@ -22,9 +22,9 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -
  • +