From ecfe61972bc765b408bc326269c9e5266b4c6f51 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Fri, 9 Aug 2013 16:07:07 +0200 Subject: [PATCH] [+] BO : Change action link for button --- admin-dev/themes/default/template/header.tpl | 4 +- .../list/list_action_button_delete.tpl | 27 +++++ .../list/list_action_button_duplicate.tpl | 27 +++++ .../helpers/list/list_action_button_edit.tpl | 27 +++++ .../helpers/list/list_action_button_view.tpl | 27 +++++ .../template/helpers/list/list_content.tpl | 12 +- classes/helper/HelperList.php | 105 +++++++++++++++++- 7 files changed, 218 insertions(+), 11 deletions(-) create mode 100644 admin-dev/themes/default/template/helpers/list/list_action_button_delete.tpl create mode 100644 admin-dev/themes/default/template/helpers/list/list_action_button_duplicate.tpl create mode 100644 admin-dev/themes/default/template/helpers/list/list_action_button_edit.tpl create mode 100644 admin-dev/themes/default/template/helpers/list/list_action_button_view.tpl diff --git a/admin-dev/themes/default/template/header.tpl b/admin-dev/themes/default/template/header.tpl index b7b04fb34..895271f5d 100644 --- a/admin-dev/themes/default/template/header.tpl +++ b/admin-dev/themes/default/template/header.tpl @@ -103,14 +103,14 @@ - {*if isset($brightness)*} + {if isset($brightness)} - {*/if*} + {/if} diff --git a/admin-dev/themes/default/template/helpers/list/list_action_button_delete.tpl b/admin-dev/themes/default/template/helpers/list/list_action_button_delete.tpl new file mode 100644 index 000000000..2d6d69af9 --- /dev/null +++ b/admin-dev/themes/default/template/helpers/list/list_action_button_delete.tpl @@ -0,0 +1,27 @@ +{* +* 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 +*} + \ No newline at end of file diff --git a/admin-dev/themes/default/template/helpers/list/list_action_button_duplicate.tpl b/admin-dev/themes/default/template/helpers/list/list_action_button_duplicate.tpl new file mode 100644 index 000000000..3ddb3b35d --- /dev/null +++ b/admin-dev/themes/default/template/helpers/list/list_action_button_duplicate.tpl @@ -0,0 +1,27 @@ +{* +* 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 +*} + \ No newline at end of file diff --git a/admin-dev/themes/default/template/helpers/list/list_action_button_edit.tpl b/admin-dev/themes/default/template/helpers/list/list_action_button_edit.tpl new file mode 100644 index 000000000..7e235b9c9 --- /dev/null +++ b/admin-dev/themes/default/template/helpers/list/list_action_button_edit.tpl @@ -0,0 +1,27 @@ +{* +* 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 +*} + \ No newline at end of file diff --git a/admin-dev/themes/default/template/helpers/list/list_action_button_view.tpl b/admin-dev/themes/default/template/helpers/list/list_action_button_view.tpl new file mode 100644 index 000000000..ecbff6b22 --- /dev/null +++ b/admin-dev/themes/default/template/helpers/list/list_action_button_view.tpl @@ -0,0 +1,27 @@ +{* +* 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 +*} + diff --git a/admin-dev/themes/default/template/helpers/list/list_content.tpl b/admin-dev/themes/default/template/helpers/list/list_content.tpl index a22b30ac5..fa268a30a 100644 --- a/admin-dev/themes/default/template/helpers/list/list_content.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_content.tpl @@ -136,13 +136,11 @@ {/if} {if $has_actions} -
- - {assign var='action' value=$actions[0]} - {if isset($tr.$action)} - {$tr.$action} - {/if} - +
+ {assign var='action' value=$actions[0]|cat:"_button"} + {if isset($tr.$action)} + {$tr.$action} + {/if} {if count($actions) > 1}