aboutsummaryrefslogtreecommitdiffstats
path: root/admin/cat_options.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-08-17 14:25:38 +0000
committerplegall <plg@piwigo.org>2005-08-17 14:25:38 +0000
commit20f05416971676e5433da86f3f924d4efe2f92df (patch)
tree406375600205f9e264694da57de66a0f14ea1acd /admin/cat_options.php
parentde22732f93fad45f94d8c95fdca4cdf6a870327d (diff)
- modification : major simplification of admin.php. Titles are managed by
included page, localized items are managed directly in the template. - new : sub template admin/double_select is included in templates admin/cat_options, admin/user_perm and admin/group_perm. I haven't been able to use it in admin/picture_modify because it seems impossible to have two instance of the same sub-template without interfering. - modification : bug 99, in profile manager, no auto submit when changing language (useless and generate accessibility problem). - improvement : HTML semantically correct for administration menu, simpler syntax, less tags, correct tags (dl/dt/dd instead of div/div). - modification : number of waiting elements and unvalidated comments are displayed in admin/intro instead of administration menu (with a link to the dedicated pages). - deletion : no link to profile from admin/user_list anymore (no need). git-svn-id: http://piwigo.org/svn/trunk@817 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/cat_options.php')
-rw-r--r--admin/cat_options.php34
1 files changed, 19 insertions, 15 deletions
diff --git a/admin/cat_options.php b/admin/cat_options.php
index fc10cbc05..24e0687cd 100644
--- a/admin/cat_options.php
+++ b/admin/cat_options.php
@@ -30,9 +30,11 @@ if (!defined('PHPWG_ROOT_PATH'))
die ("Hacking attempt!");
}
include_once(PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php');
+
// +-----------------------------------------------------------------------+
// | modification registration |
// +-----------------------------------------------------------------------+
+
// print '<pre>';
// print_r($_POST);
// print '</pre>';
@@ -129,21 +131,21 @@ UPDATE '.CATEGORIES_TABLE.'
}
}
}
+
// +-----------------------------------------------------------------------+
// | template init |
// +-----------------------------------------------------------------------+
-$template->set_filenames(array('cat_options'=>'admin/cat_options.tpl'));
-if (!isset($_GET['section']))
-{
- $page['section'] = 'upload';
-}
-else
-{
- $page['section'] = $_GET['section'];
-}
+$template->set_filenames(
+ array(
+ 'cat_options' => 'admin/cat_options.tpl',
+ 'double_select' => 'admin/double_select.tpl'
+ )
+ );
+$page['section'] = isset($_GET['section']) ? $_GET['section'] : 'upload';
$base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_options&amp;section=';
+
$template->assign_vars(
array(
'L_SUBMIT'=>$lang['submit'],
@@ -153,7 +155,6 @@ $template->assign_vars(
)
);
-$template->assign_vars(array(strtoupper($page['section']).'_CLASS'=>'opened'));
// +-----------------------------------------------------------------------+
// | form display |
// +-----------------------------------------------------------------------+
@@ -189,7 +190,7 @@ SELECT id,name,uppercats,global_rank
;';
$template->assign_vars(
array(
- 'L_CAT_TITLE' => $lang['cat_upload_title'],
+ 'L_SECTION' => $lang['cat_upload_title'],
'L_CAT_OPTIONS_TRUE' => $lang['authorized'],
'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],
'L_CAT_OPTIONS_INFO' => $lang['cat_upload_info'],
@@ -211,7 +212,7 @@ SELECT id,name,uppercats,global_rank
;';
$template->assign_vars(
array(
- 'L_CAT_TITLE' => $lang['cat_comments_title'],
+ 'L_SECTION' => $lang['cat_comments_title'],
'L_CAT_OPTIONS_TRUE' => $lang['authorized'],
'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],
'L_CAT_OPTIONS_INFO' => $lang['cat_comments_info'],
@@ -233,7 +234,7 @@ SELECT id,name,uppercats,global_rank
;';
$template->assign_vars(
array(
- 'L_CAT_TITLE' => $lang['cat_lock_title'],
+ 'L_SECTION' => $lang['cat_lock_title'],
'L_CAT_OPTIONS_TRUE' => $lang['unlocked'],
'L_CAT_OPTIONS_FALSE' => $lang['locked'],
'L_CAT_OPTIONS_INFO' => $lang['cat_lock_info'],
@@ -255,7 +256,7 @@ SELECT id,name,uppercats,global_rank
;';
$template->assign_vars(
array(
- 'L_CAT_TITLE' => $lang['cat_status_title'],
+ 'L_SECTION' => $lang['cat_status_title'],
'L_CAT_OPTIONS_TRUE' => $lang['cat_public'],
'L_CAT_OPTIONS_FALSE' => $lang['cat_private'],
'L_CAT_OPTIONS_INFO' => $lang['cat_status_info'],
@@ -278,7 +279,7 @@ SELECT id,name,uppercats,global_rank
;';
$template->assign_vars(
array(
- 'L_CAT_TITLE' => l10n('Representative'),
+ 'L_SECTION' => l10n('Representative'),
'L_CAT_OPTIONS_TRUE' => l10n('singly represented'),
'L_CAT_OPTIONS_FALSE' => l10n('randomly represented'),
'L_CAT_OPTIONS_INFO' => l10n('')
@@ -289,8 +290,11 @@ SELECT id,name,uppercats,global_rank
}
display_select_cat_wrapper($query_true,array(),'category_option_true');
display_select_cat_wrapper($query_false,array(),'category_option_false');
+
// +-----------------------------------------------------------------------+
// | sending html code |
// +-----------------------------------------------------------------------+
+
+$template->assign_var_from_handle('DOUBLE_SELECT', 'double_select');
$template->assign_var_from_handle('ADMIN_CONTENT', 'cat_options');
?> \ No newline at end of file