From 0aed5501195b6969bc8b7d18ed4fbe2f3a8bc5db Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 1 Sep 2011 14:01:52 +0000 Subject: plugin manager: replace the top left "Display Compact/Complete" select box by a simpler link "show details" or "hide details" on top right. git-svn-id: http://piwigo.org/svn/trunk@12029 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/plugins_installed.php | 40 +++++++++++++++++----- .../themes/default/template/plugins_installed.tpl | 24 ++++++------- admin/themes/default/theme.css | 2 ++ 3 files changed, 44 insertions(+), 22 deletions(-) (limited to 'admin') diff --git a/admin/plugins_installed.php b/admin/plugins_installed.php index 758c1b11d..d20e1ee1d 100644 --- a/admin/plugins_installed.php +++ b/admin/plugins_installed.php @@ -30,9 +30,28 @@ include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php'); $template->set_filenames(array('plugins' => 'plugins_installed.tpl')); -// display mode -$plugin_display = isset($_GET['plugin_display']) ? $_GET['plugin_display'] : (pwg_get_session_var('plugin_display') != null ? pwg_get_session_var('plugin_display') : 'compact'); -pwg_set_session_var('plugin_display', $plugin_display); +// should we display details on plugins? +if (isset($_GET['show_details'])) +{ + if (1 == $_GET['show_details']) + { + $show_details = true; + } + else + { + $show_details = false; + } + + pwg_set_session_var('plugins_show_details', $show_details); +} +elseif (null != pwg_get_session_var('plugins_show_details')) +{ + $show_details = pwg_get_session_var('plugins_show_details'); +} +else +{ + $show_details = false; +} $base_url = get_root_url().'admin.php?page='.$page['page']; $pwg_token = get_pwg_token(); @@ -176,12 +195,15 @@ function cmp($a, $b) } usort($tpl_plugins, 'cmp'); -$template->assign(array( - 'plugin_display' => $plugin_display, - 'plugins' => $tpl_plugins, - 'active_plugins' => $active_plugins, - 'PWG_TOKEN' => $pwg_token, -)); +$template->assign( + array( + 'plugins' => $tpl_plugins, + 'active_plugins' => $active_plugins, + 'PWG_TOKEN' => $pwg_token, + 'base_url' => $base_url, + 'show_details' => $show_details, + ) + ); $template->assign_var_from_handle('ADMIN_CONTENT', 'plugins'); ?> \ No newline at end of file diff --git a/admin/themes/default/template/plugins_installed.tpl b/admin/themes/default/template/plugins_installed.tpl index a27000cec..b10be0401 100644 --- a/admin/themes/default/template/plugins_installed.tpl +++ b/admin/themes/default/template/plugins_installed.tpl @@ -49,7 +49,7 @@ jQuery(document).ready(function() { success: function(data) { for (i=0;i') {else} jQuery('#'+data[i]+' .pluginMiniBoxNameCell').prepend('') @@ -87,19 +87,17 @@ jQuery(document).ready(function() { {/footer_script}
- -
- - {'Display'|@translate} : - -
-

{'Plugins'|@translate}

+
+ {if $show_details} + {'hide details'|@translate} + {else} + {'show details'|@translate} + {/if} +
+ {if isset($plugins)} {assign var='field_name' value='null'} {* *} @@ -134,7 +132,7 @@ jQuery(document).ready(function() { {/if} {/if} - {if $plugin_display == 'complete'} + {if $show_details}
@@ -175,7 +173,7 @@ jQuery(document).ready(function() {
{**} - {elseif $plugin_display == 'compact'} + {else} {if not empty($plugin.VISIT_URL)} {assign var='version' value=""|cat:$plugin.VERSION|cat:""} {else} diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index 7b798dc59..f8bf70be1 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -926,6 +926,7 @@ h2:lang(en) { text-transform:capitalize; } .warning:before {content:url(icon/warning.png);vertical-align:top;} .deactivate_all {text-align:right;font-size:0.95em;} +.showDetails {text-align:right; margin-bottom:-15px; margin-top:-10px; padding-right:1em;} .languageBoxes {min-height:0;text-align:left;} .languageBox {display:inline-table; text-align:center; width:200px; height:40px; margin:5px; -moz-border-radius:5px;border-radius:5px; overflow:hidden; } @@ -1076,3 +1077,4 @@ p#uploadModeInfos {text-align:left;margin-top:1em;font-size:90%;color:#999;} #uploadProgress {width:650px; margin:10px auto;font-size:90%;} #progressbar {border:1px solid #ccc; background-color:#eee;} .ui-progressbar-value { background-image: url(images/pbar-ani.gif); height:10px;margin:-1px;border:1px solid #E78F08;} + -- cgit v1.2.3