aboutsummaryrefslogtreecommitdiffstats
path: root/admin/help.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-18 22:12:30 +0000
committerplegall <plg@piwigo.org>2010-03-18 22:12:30 +0000
commit27de15e07661fdff7a19d3ead990c37efb532c7a (patch)
treeb7e684dfd61dbb64b64173658da867b6b7d16b7f /admin/help.php
parentd158f116d22a4a5dda945b09a58f2e48c0f3b1ea (diff)
feature 1519: admin instructions are dispatched into several tabs. Only
applied to en_UK and fr_FR. The help content itself needs some updates but it will be another set of commits, in this commit, I nearly only modified the container. The new "Add Photos" help page only introduces you to 3 main ways to add photos: direct upload, pLoader and FTP. Each of them has a dedicated tab on the Admin>Photos>Add screen. No use of the big question mark icon linked to the Help pages in the administration header, to avoid having this icon twice : in the header + in the content next to H2. git-svn-id: http://piwigo.org/svn/trunk@5182 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/help.php74
1 files changed, 73 insertions, 1 deletions
diff --git a/admin/help.php b/admin/help.php
index 06bd5ca80..fdffeff01 100644
--- a/admin/help.php
+++ b/admin/help.php
@@ -22,11 +22,83 @@
// +-----------------------------------------------------------------------+
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok |
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);
-$template->assign('ADMIN_CONTENT', load_language('help.html','',array('return'=>true)) );
+$link = get_root_url().'admin.php?page=help&section=';
+$selected = null;
+$help_section_title = null;
+
+$tabs = array(
+ array(
+ 'code' => 'add_photos',
+ 'label' => 'Add Photos',
+ ),
+ array(
+ 'code' => 'permissions',
+ 'label' => 'Permissions',
+ ),
+ array(
+ 'code' => 'groups',
+ 'label' => 'Groups',
+ ),
+ array(
+ 'code' => 'user_upload',
+ 'label' => 'User Upload',
+ ),
+ array(
+ 'code' => 'virtual_links',
+ 'label' => 'Virtual Links',
+ ),
+ array(
+ 'code' => 'misc',
+ 'label' => 'Miscellaneous',
+ ),
+ );
+
+if (!isset($_GET['section']))
+{
+ $section = $tabs[0]['code'];
+}
+else
+{
+ $section = $_GET['section'];
+}
+
+$tabsheet = new tabsheet();
+foreach ($tabs as $tab)
+{
+ if ($tab['code'] == $section)
+ {
+ $selected_tab = $tab['code'];
+ $help_section_title = l10n($tab['label']);
+ }
+
+ $tabsheet->add($tab['code'], l10n($tab['label']), $link.$tab['code']);
+}
+$tabsheet->select($selected_tab);
+$tabsheet->assign();
+
+$template->set_filenames(array('help' => 'help.tpl'));
+
+$template->assign(
+ array(
+ 'HELP_CONTENT' => load_language(
+ 'help/help_'.$selected_tab.'.html',
+ '',
+ array('return'=>true)
+ ),
+ 'HELP_SECTION_TITLE' => $help_section_title,
+ )
+ );
+
+// +-----------------------------------------------------------------------+
+// | sending html code |
+// +-----------------------------------------------------------------------+
+
+$template->assign_var_from_handle('ADMIN_CONTENT', 'help');
?>