From e53e63c257d107b1955231a9823913b11fb51d4d Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Mon, 21 Oct 2013 13:45:39 +0200 Subject: [PATCH] // Add Back button to list footer --- .../default/template/helpers/list/list_footer.tpl | 13 +++++++++++++ .../default/template/helpers/list/list_header.tpl | 2 +- classes/helper/HelperList.php | 8 ++++---- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/admin-dev/themes/default/template/helpers/list/list_footer.tpl b/admin-dev/themes/default/template/helpers/list/list_footer.tpl index b1b1515db..e6cb8841f 100644 --- a/admin-dev/themes/default/template/helpers/list/list_footer.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_footer.tpl @@ -131,6 +131,18 @@ {/if} +{foreach from=$toolbar_btn item=btn key=k} + {if $k == 'back'} + {assign 'back_button' $btn} + {/if} +{/foreach} +{if isset($back_button)} + +{/if} {if !$simple_header} @@ -140,6 +152,7 @@ {/if} + {hook h='displayAdminListAfter'} {if isset($name_controller)} {capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListAfter{/capture} diff --git a/admin-dev/themes/default/template/helpers/list/list_header.tpl b/admin-dev/themes/default/template/helpers/list/list_header.tpl index b16b32d6c..4323bc617 100644 --- a/admin-dev/themes/default/template/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_header.tpl @@ -83,7 +83,7 @@ {if isset($toolbar_btn) && count($toolbar_btn) >0} {foreach from=$toolbar_btn item=btn key=k} - {if $k != 'modules-list'} + {if $k != 'modules-list' && $k != 'back'} diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php index 2d7ff0cda..6eec22ee7 100644 --- a/classes/helper/HelperList.php +++ b/classes/helper/HelperList.php @@ -603,16 +603,16 @@ class HelperListCore extends Helper 'list_total' => $this->listTotal, 'token' => $this->token, 'table' => $this->table, - 'bulk_actions' => (count($this->_list) <= 1 && !$has_value) ? array() : $this->bulk_actions + 'bulk_actions' => (count($this->_list) <= 1 && !$has_value) ? array() : $this->bulk_actions, + 'show_toolbar' => $this->show_toolbar, + 'toolbar_scroll' => $this->toolbar_scroll, + 'toolbar_btn' => $this->toolbar_btn, )); $this->header_tpl->assign(array_merge($this->tpl_vars, array( 'title' => array_key_exists('title', $this->tpl_vars) ? $this->tpl_vars['title'] : $this->title, 'show_filters' => (count($this->_list) <= 1 && !$has_value) ? false : true, 'filters_has_value' => $has_value, - 'show_toolbar' => $this->show_toolbar, - 'toolbar_scroll' => $this->toolbar_scroll, - 'toolbar_btn' => $this->toolbar_btn, 'currentIndex' => $this->currentIndex, 'action' => $action, 'is_order_position' => $this->position_identifier && $this->orderBy == 'position',