diff options
author | plegall <plg@piwigo.org> | 2011-09-01 14:01:52 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2011-09-01 14:01:52 +0000 |
commit | 0aed5501195b6969bc8b7d18ed4fbe2f3a8bc5db (patch) | |
tree | 50b91670b477b4a7611f13aed98b408f3347aaf8 /admin/plugins_installed.php | |
parent | ee7768f536c5802dd5d3874f808b3c2c45b4e08e (diff) |
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
Diffstat (limited to 'admin/plugins_installed.php')
-rw-r--r-- | admin/plugins_installed.php | 40 |
1 files changed, 31 insertions, 9 deletions
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 |