aboutsummaryrefslogtreecommitdiffstats
path: root/admin/batch_manager.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-07-23 11:50:41 +0000
committermistic100 <mistic@piwigo.org>2012-07-23 11:50:41 +0000
commit9a4a9d846e6bd74a61d1ab390ea4deb3224f4170 (patch)
treed3a40b94d272493fa02cf78434509d678c49ef91 /admin/batch_manager.php
parent7b181f067bd2a02e118e57b4c2fc44e2319ca734 (diff)
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/trunk@16928 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/batch_manager.php')
-rw-r--r--admin/batch_manager.php40
1 files changed, 7 insertions, 33 deletions
diff --git a/admin/batch_manager.php b/admin/batch_manager.php
index ddca63ed0..113d4c629 100644
--- a/admin/batch_manager.php
+++ b/admin/batch_manager.php
@@ -350,22 +350,7 @@ else
// +-----------------------------------------------------------------------+
// | Tabs |
// +-----------------------------------------------------------------------+
-
-$tabs = array(
- array(
- 'code' => 'global',
- 'label' => l10n('global mode'),
- ),
- array(
- 'code' => 'unit',
- 'label' => l10n('unit mode'),
- ),
- );
-
-$tab_codes = array_map(
- create_function('$a', 'return $a["code"];'),
- $tabs
- );
+$manager_link = get_root_url().'admin.php?page=batch_manager&amp;mode=';
if (isset($_GET['mode']))
{
@@ -373,23 +358,13 @@ if (isset($_GET['mode']))
}
else
{
- $page['tab'] = $tabs[0]['code'];
+ $page['tab'] = 'global';
}
-if (in_array($page['tab'], $tab_codes))
-{
- $tabsheet = new tabsheet();
- $tabsheet->set_id('batch_manager');
- foreach ($tabs as $tab)
- {
- $tabsheet->add(
- $tab['code'],
- $tab['label'],
- get_root_url().'admin.php?page='.$_GET['page'].'&amp;mode='.$tab['code']
- );
- }
- $tabsheet->select($page['tab']);
- $tabsheet->assign();
+$tabsheet = new tabsheet();
+$tabsheet->set_id('batch_manager');
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
// +-----------------------------------------------------------------------+
// | tags |
@@ -405,6 +380,5 @@ $template->assign('tags', get_taglist($query, false));
// | open specific mode |
// +-----------------------------------------------------------------------+
- include(PHPWG_ROOT_PATH.'admin/batch_manager_'.$page['tab'].'.php');
-}
+include(PHPWG_ROOT_PATH.'admin/batch_manager_'.$page['tab'].'.php');
?> \ No newline at end of file