From e969cc95b2a12a957a8de07a09360a3e3d8e2878 Mon Sep 17 00:00:00 2001 From: ADTC Date: Mon, 13 Mar 2017 21:31:02 +0800 Subject: [PATCH 1/5] Use icons for Activate/Deactive/Settings links An unchecked checkbox icon is used for Activate (to show that it's currently inactive). A checked checkbox icon is used for Deactivate (to show that it's currently active). A gear icon is used for the Settings link. The checkbox icons are placed on the left side of the name, as checkboxes usually appear. The gear icon is placed floated to the right side of the name, to have a clean look. The plugin list is more compact, and it's much easier to identify which plugins are currently active, and which have settings. No need to read any words! The previously used words (with language dependency) is still used as the tooltip (title) that is shown when the mouse hovers over the icons. In the themes page, the checked checkbox icon denotes the curently active theme, but doesn't do anything when clicked. This is by design, since only one theme can be active at a time. For consistency sake, a circle (radio button style) was not used. Signed-off-by: ADTC --- bl-kernel/admin/themes/default/css/default.css | 5 +++++ bl-kernel/admin/views/plugins.php | 14 +++++--------- bl-kernel/admin/views/themes.php | 10 ++++++---- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/bl-kernel/admin/themes/default/css/default.css b/bl-kernel/admin/themes/default/css/default.css index 7e5aa9a3..f322c464 100644 --- a/bl-kernel/admin/themes/default/css/default.css +++ b/bl-kernel/admin/themes/default/css/default.css @@ -591,6 +591,11 @@ tr.theme-installed { background: #F2F7FF !important; } +div.plugin-name i.settings-icon { + float: right; + margin-top: 3px; +} + div.plugin-links > a { display: inline-block; margin-top: 5px; diff --git a/bl-kernel/admin/views/plugins.php b/bl-kernel/admin/views/plugins.php index bdb13af2..0bd47d67 100644 --- a/bl-kernel/admin/views/plugins.php +++ b/bl-kernel/admin/views/plugins.php @@ -20,25 +20,21 @@ foreach($plugins['all'] as $Plugin) echo ' installed()?'class="plugin-installed"':'class="plugin-notInstalled"').'> -
'.$Plugin->name().'
- '; echo ''; diff --git a/bl-kernel/admin/views/themes.php b/bl-kernel/admin/views/themes.php index 56abd3d7..66c7ed39 100644 --- a/bl-kernel/admin/views/themes.php +++ b/bl-kernel/admin/views/themes.php @@ -20,16 +20,18 @@ foreach($themes as $theme) echo ' theme()?'class="theme-installed"':'class="theme-notInstalled"').'> -
'.$theme['name'].'
- '; echo ''; From b57020b42179addad683d92b848e51fd68d49b4f Mon Sep 17 00:00:00 2001 From: ADTC Date: Mon, 13 Mar 2017 21:41:29 +0800 Subject: [PATCH 2/5] Use an icon in the incompatibility warning message The incompatibility warning message has an exclamation triangle icon to call attention to it. Signed-off-by: ADTC --- bl-kernel/admin/views/plugins.php | 2 +- bl-kernel/admin/views/themes.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bl-kernel/admin/views/plugins.php b/bl-kernel/admin/views/plugins.php index 0bd47d67..f2877248 100644 --- a/bl-kernel/admin/views/plugins.php +++ b/bl-kernel/admin/views/plugins.php @@ -40,7 +40,7 @@ foreach($plugins['all'] as $Plugin) echo ''; echo $Plugin->description(); if( !$Plugin->isCompatible() ) { - echo '
This plugin is incompatible with Bludit v'.BLUDIT_VERSION.'
'; + echo '
This plugin is incompatible with Bludit v'.BLUDIT_VERSION.'
'; } echo ''; diff --git a/bl-kernel/admin/views/themes.php b/bl-kernel/admin/views/themes.php index 66c7ed39..8b67ee73 100644 --- a/bl-kernel/admin/views/themes.php +++ b/bl-kernel/admin/views/themes.php @@ -38,7 +38,7 @@ foreach($themes as $theme) echo $theme['description']; if( !$theme['compatible'] ) { - echo '
This theme is incompatible with Bludit v'.BLUDIT_VERSION.'
'; + echo '
This theme is incompatible with Bludit v'.BLUDIT_VERSION.'
'; } echo ''; From 3ab6fc63c3c19c582b1724cb848a0b9a4b40ae49 Mon Sep 17 00:00:00 2001 From: ADTC Date: Mon, 13 Mar 2017 21:42:28 +0800 Subject: [PATCH 3/5] Fix spelling mistake in link attribute name (target) The mistake caused the links to open in the same window/tab instead of a new window or tab. Signed-off-by: ADTC --- bl-kernel/admin/views/plugins.php | 2 +- bl-kernel/admin/views/themes.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bl-kernel/admin/views/plugins.php b/bl-kernel/admin/views/plugins.php index f2877248..30c8671f 100644 --- a/bl-kernel/admin/views/plugins.php +++ b/bl-kernel/admin/views/plugins.php @@ -46,7 +46,7 @@ foreach($plugins['all'] as $Plugin) echo ' '.$Plugin->version().' - '.$Plugin->author().' + '.$Plugin->author().' '; echo ''; diff --git a/bl-kernel/admin/views/themes.php b/bl-kernel/admin/views/themes.php index 8b67ee73..0fba80c5 100644 --- a/bl-kernel/admin/views/themes.php +++ b/bl-kernel/admin/views/themes.php @@ -44,7 +44,7 @@ foreach($themes as $theme) echo ' '.$theme['version'].' - '.$theme['author'].' + '.$theme['author'].' '; echo ''; From daf3da5bbc15534292258eed6c380b8cb102003e Mon Sep 17 00:00:00 2001 From: ADTC Date: Mon, 13 Mar 2017 22:03:56 +0800 Subject: [PATCH 4/5] Add a little left margin to gear icon This is to keep some distance from the plugin name, especially in narrower screens or when the browser window is resized to be narrower. It ensures the placement still looks neat :) Signed-off-by: ADTC --- bl-kernel/admin/themes/default/css/default.css | 1 + 1 file changed, 1 insertion(+) diff --git a/bl-kernel/admin/themes/default/css/default.css b/bl-kernel/admin/themes/default/css/default.css index f322c464..64f8a1ac 100644 --- a/bl-kernel/admin/themes/default/css/default.css +++ b/bl-kernel/admin/themes/default/css/default.css @@ -594,6 +594,7 @@ tr.theme-installed { div.plugin-name i.settings-icon { float: right; margin-top: 3px; + margin-left: 3px; } div.plugin-links > a { From 8fa754e4497eb3b356c1e422008dfe9aa6210bdc Mon Sep 17 00:00:00 2001 From: ADTC Date: Tue, 14 Mar 2017 12:21:25 +0800 Subject: [PATCH 5/5] Show incompatibility warning as an icon next to the version number Signed-off-by: ADTC --- bl-kernel/admin/themes/default/css/default.css | 4 ++++ bl-kernel/admin/views/plugins.php | 10 ++++++---- bl-kernel/admin/views/themes.php | 8 +++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/bl-kernel/admin/themes/default/css/default.css b/bl-kernel/admin/themes/default/css/default.css index 64f8a1ac..b9c18d5f 100644 --- a/bl-kernel/admin/themes/default/css/default.css +++ b/bl-kernel/admin/themes/default/css/default.css @@ -597,6 +597,10 @@ div.plugin-name i.settings-icon { margin-left: 3px; } +i.incompatible-warning { + color: #daa520; +} + div.plugin-links > a { display: inline-block; margin-top: 5px; diff --git a/bl-kernel/admin/views/plugins.php b/bl-kernel/admin/views/plugins.php index 30c8671f..b3077f73 100644 --- a/bl-kernel/admin/views/plugins.php +++ b/bl-kernel/admin/views/plugins.php @@ -39,13 +39,15 @@ foreach($plugins['all'] as $Plugin) echo ''; echo $Plugin->description(); - if( !$Plugin->isCompatible() ) { - echo '
This plugin is incompatible with Bludit v'.BLUDIT_VERSION.'
'; - } echo ''; + echo ' + '; + if( !$Plugin->isCompatible() ) { + echo ''; + } + echo $Plugin->version().''; echo ' - '.$Plugin->version().' '.$Plugin->author().' '; diff --git a/bl-kernel/admin/views/themes.php b/bl-kernel/admin/views/themes.php index 0fba80c5..b8565581 100644 --- a/bl-kernel/admin/views/themes.php +++ b/bl-kernel/admin/views/themes.php @@ -36,14 +36,16 @@ foreach($themes as $theme) echo ''; echo $theme['description']; + echo ''; + echo ' + '; if( !$theme['compatible'] ) { - echo '
This theme is incompatible with Bludit v'.BLUDIT_VERSION.'
'; + echo ''; } - echo ''; + echo $theme['version'].''; echo ' - '.$theme['version'].' '.$theme['author'].' ';