From 5c69d5e64450f44c3553efc6b939eb2df35a3e49 Mon Sep 17 00:00:00 2001 From: chmst Date: Mon, 25 Mar 2019 21:35:29 +0100 Subject: [PATCH 1/4] Make bigger add buttons --- .../language/en-GB/en-GB.mod_quickicon.ini | 2 +- .../mod_quickicon/Helper/QuickIconHelper.php | 5 +++++ .../atum/scss/blocks/_quickicons.scss | 4 ++-- layouts/joomla/quickicons/icon.php | 18 +++++++++--------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/administrator/language/en-GB/en-GB.mod_quickicon.ini b/administrator/language/en-GB/en-GB.mod_quickicon.ini index d55479c9b17b6..8f0546d932ad4 100644 --- a/administrator/language/en-GB/en-GB.mod_quickicon.ini +++ b/administrator/language/en-GB/en-GB.mod_quickicon.ini @@ -4,7 +4,7 @@ ; Note : All ini files need to be saved as UTF-8 MOD_QUICKICON="Quick Icons" -MOD_QUICKICON_ADD_NEW="Add New" +MOD_QUICKICON_ADD_NEW="New %s" MOD_QUICKICON_ARTICLE_MANAGER="Articles" MOD_QUICKICON_ARTICLE_MANAGER_1="Article" MOD_QUICKICON_CATEGORY_MANAGER="Article Categories" diff --git a/administrator/modules/mod_quickicon/Helper/QuickIconHelper.php b/administrator/modules/mod_quickicon/Helper/QuickIconHelper.php index eeacabeecfc64..49d0d7f6815fc 100644 --- a/administrator/modules/mod_quickicon/Helper/QuickIconHelper.php +++ b/administrator/modules/mod_quickicon/Helper/QuickIconHelper.php @@ -96,6 +96,7 @@ public static function &getButtons(Registry $params, CMSApplication $application 'amount' => $amount, 'link' => Route::_('index.php?option=com_users'), 'linkadd' => Route::_('index.php?option=com_users&task=user.add'), + 'addwhat' => Text::plural('MOD_QUICKICON_USER_MANAGER', 1), 'name' => Text::plural('MOD_QUICKICON_USER_MANAGER', $amount), 'access' => array('core.manage', 'com_users', 'core.create', 'com_users'), 'group' => 'MOD_QUICKICON_USERS', @@ -110,6 +111,7 @@ public static function &getButtons(Registry $params, CMSApplication $application 'amount' => $amount, 'link' => Route::_('index.php?option=com_users'), 'linkadd' => Route::_('index.php?option=com_menus&task=item.add'), + 'addwhat' => Text::plural('MOD_QUICKICON_MENUITEMS_MANAGER', 1), 'name' => Text::plural('MOD_QUICKICON_MENUITEMS_MANAGER', $amount), 'access' => array('core.manage', 'com_menus', 'core.create', 'com_menus'), 'group' => 'MOD_QUICKICON_STRUCTURE', @@ -124,6 +126,7 @@ public static function &getButtons(Registry $params, CMSApplication $application 'amount' => $amount, 'link' => Route::_('index.php?option=com_content'), 'linkadd' => Route::_('index.php?option=com_content&task=article.add'), + 'addwhat' => Text::plural('MOD_QUICKICON_ARTICLE_MANAGER', 1), 'name' => Text::plural('MOD_QUICKICON_ARTICLE_MANAGER', $amount), 'access' => array('core.manage', 'com_content', 'core.create', 'com_content'), 'group' => 'MOD_QUICKICON_CONTENT', @@ -137,6 +140,7 @@ public static function &getButtons(Registry $params, CMSApplication $application self::$buttons[$key][] = [ 'amount' => $amount, 'link' => Route::_('index.php?option=com_categories'), + 'addwhat' => Text::plural('MOD_QUICKICON_CATEGORY_MANAGER', 1), 'linkadd' => Route::_('index.php?option=com_categories&task=category.add'), 'name' => Text::plural('MOD_QUICKICON_CATEGORY_MANAGER', $amount), 'access' => array('core.manage', 'com_categories', 'core.create', 'com_categories'), @@ -208,6 +212,7 @@ public static function &getButtons(Registry $params, CMSApplication $application $default = array( 'amount' => null, 'link' => null, + 'addwhat' => null, 'linkadd' => null, 'name' => null, 'image' => null, diff --git a/administrator/templates/atum/scss/blocks/_quickicons.scss b/administrator/templates/atum/scss/blocks/_quickicons.scss index 7966685e25560..d17b5770e3a1f 100644 --- a/administrator/templates/atum/scss/blocks/_quickicons.scss +++ b/administrator/templates/atum/scss/blocks/_quickicons.scss @@ -46,6 +46,7 @@ .quickicon-linkadd { font-size: .9rem; + line-height: 3.4rem; border-top: 1px solid $light_blue; text-decoration: none; @@ -57,10 +58,9 @@ a:not(.quickicon-linkadd) { display: inline-flex; - min-height: 6rem; + min-height: 5.4rem; flex-direction: column; width: 100%; - padding-bottom: 6px; transition: all .25s ease; text-align: center; diff --git a/layouts/joomla/quickicons/icon.php b/layouts/joomla/quickicons/icon.php index d87e17f4f6539..59350e0e8f09f 100644 --- a/layouts/joomla/quickicons/icon.php +++ b/layouts/joomla/quickicons/icon.php @@ -18,7 +18,7 @@ // The title for the link (a11y) $title = empty($displayData['title']) ? '' : (' title="' . $this->escape($displayData['title']) . '"'); - +$add = empty($displayData['addwhat']) ? '' : $displayData['addwhat']; // The information $text = empty($displayData['text']) ? '' : ('' . $displayData['text'] . ''); @@ -32,23 +32,23 @@ } ?> -
  • +
  • href=""> -
  • From e6db17ffddad327b0b4533d2eba9772a0d70b909 Mon Sep 17 00:00:00 2001 From: chmst Date: Mon, 25 Mar 2019 22:02:52 +0100 Subject: [PATCH 2/4] fix typo, add sr-only to buttons --- layouts/joomla/quickicons/icon.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/layouts/joomla/quickicons/icon.php b/layouts/joomla/quickicons/icon.php index 59350e0e8f09f..f51558cda4956 100644 --- a/layouts/joomla/quickicons/icon.php +++ b/layouts/joomla/quickicons/icon.php @@ -32,7 +32,7 @@ } ?> -
  • +
  • href=""> @@ -48,7 +48,7 @@
    - +
    - - + + +
  • From 63165a081464010b5d42973d2545bc710e807450 Mon Sep 17 00:00:00 2001 From: chmst Date: Mon, 25 Mar 2019 22:20:36 +0100 Subject: [PATCH 3/4] CodeSniffer --- layouts/joomla/quickicons/icon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/joomla/quickicons/icon.php b/layouts/joomla/quickicons/icon.php index f51558cda4956..79ddcf385cbd8 100644 --- a/layouts/joomla/quickicons/icon.php +++ b/layouts/joomla/quickicons/icon.php @@ -40,7 +40,7 @@ ' . $amount % 1000 . ''; endif; From 50660b9d7d4776c5b9303099be54f1a0b27cc5e0 Mon Sep 17 00:00:00 2001 From: chmst Date: Tue, 26 Mar 2019 09:34:48 +0100 Subject: [PATCH 4/4] Add padding --- administrator/templates/atum/scss/blocks/_quickicons.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/administrator/templates/atum/scss/blocks/_quickicons.scss b/administrator/templates/atum/scss/blocks/_quickicons.scss index d17b5770e3a1f..6bc846a5c0d2d 100644 --- a/administrator/templates/atum/scss/blocks/_quickicons.scss +++ b/administrator/templates/atum/scss/blocks/_quickicons.scss @@ -26,6 +26,7 @@ .quickicon-name { font-size: 1rem; + padding-bottom: .3rem; } .quickicon-amount {