aboutsummaryrefslogtreecommitdiffstats
path: root/admin/help.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-07-23 11:52:18 +0000
committermistic100 <mistic@piwigo.org>2012-07-23 11:52:18 +0000
commit18bf888d16ed366ac7a2aa417442bc4f3be9d92d (patch)
tree42f4f4ab774a9b3848b315570b0b6a15cea7d4ad /admin/help.php
parent798de81516100c4037949c7e73c4c5af1915a088 (diff)
Merged revision(s) 16928 from trunk:
feature 2703: make it easy for plugins to add tabs in admin screens centralize all core tabs in one file git-svn-id: http://piwigo.org/svn/branches/2.4@16929 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/help.php')
-rw-r--r--admin/help.php44
1 files changed, 5 insertions, 39 deletions
diff --git a/admin/help.php b/admin/help.php
index ec4a1fc45..e47740ca9 100644
--- a/admin/help.php
+++ b/admin/help.php
@@ -29,54 +29,20 @@ include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);
-$link = get_root_url().'admin.php?page=help&section=';
+$help_link = get_root_url().'admin.php?page=help&section=';
$selected = null;
-$help_section_title = null;
-
-$tabs = array();
-$tabs[] = array(
- 'code' => 'add_photos',
- 'label' => l10n('Add Photos'),
- );
-$tabs[] = array(
- 'code' => 'permissions',
- 'label' => l10n('Permissions'),
- );
-$tabs[] = array(
- 'code' => 'groups',
- 'label' => l10n('Groups'),
- );
-$tabs[] = array(
- 'code' => 'virtual_links',
- 'label' => l10n('Virtual Links'),
- );
-$tabs[] = array(
- 'code' => 'misc',
- 'label' => l10n('Miscellaneous'),
- );
if (!isset($_GET['section']))
{
- $section = $tabs[0]['code'];
+ $selected = 'add_photos';
}
else
{
- $section = $_GET['section'];
+ $selected = $_GET['section'];
}
$tabsheet = new tabsheet();
$tabsheet->set_id('help');
-foreach ($tabs as $tab)
-{
- if ($tab['code'] == $section)
- {
- $selected_tab = $tab['code'];
- $help_section_title = $tab['label'];
- }
-
- $tabsheet->add($tab['code'], $tab['label'], $link.$tab['code']);
-}
-$tabsheet->select($selected_tab);
$tabsheet->assign();
$template->set_filenames(array('help' => 'help.tpl'));
@@ -84,11 +50,11 @@ $template->set_filenames(array('help' => 'help.tpl'));
$template->assign(
array(
'HELP_CONTENT' => load_language(
- 'help/help_'.$selected_tab.'.html',
+ 'help/help_'.$tabsheet->selected.'.html',
'',
array('return'=>true)
),
- 'HELP_SECTION_TITLE' => $help_section_title,
+ 'HELP_SECTION_TITLE' => $tabsheet->sheets[ $tabsheet->selected ]['caption'],
)
);