From 8dfcc871d1bbc4965e7416d987d887b8e15d61c1 Mon Sep 17 00:00:00 2001 From: Vova Yatsyuk Date: Wed, 8 Feb 2017 13:45:49 +0200 Subject: [PATCH] Improved action rendering, when only one action is available --- .../Core/Block/Adminhtml/Renderer/Actions.php | 22 ++++++++++++------- js/tm/adminhtml/core/actions.css | 3 +++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/app/code/community/TM/Core/Block/Adminhtml/Renderer/Actions.php b/app/code/community/TM/Core/Block/Adminhtml/Renderer/Actions.php index ca70f93..75bfb4d 100644 --- a/app/code/community/TM/Core/Block/Adminhtml/Renderer/Actions.php +++ b/app/code/community/TM/Core/Block/Adminhtml/Renderer/Actions.php @@ -28,17 +28,23 @@ public function render(Varien_Object $row) } $result = '
'; - $result .= '' - . Mage::helper('adminhtml')->__('Select') - . ''; + if (count($actions) > 1) { + $result .= '' + . Mage::helper('adminhtml')->__('Select') + . ''; - $result .= ''; - $result .= '
'; + return $result; } } diff --git a/js/tm/adminhtml/core/actions.css b/js/tm/adminhtml/core/actions.css index e0b676f..c5d7384 100644 --- a/js/tm/adminhtml/core/actions.css +++ b/js/tm/adminhtml/core/actions.css @@ -4,6 +4,9 @@ .tm-action-select-wrap { position: relative; } +.tm-action-select-wrap a { + text-decoration: none; +} .tm-action-select { text-decoration: none; padding-right: 15px;