Skip to content

Commit

Permalink
feature 2559: minor redesign on configuration screens
Browse files Browse the repository at this point in the history
* hide "rate_anonymous" when "rate" is deactivated
* hide "email_admin_on_new_user" when "allow_user_registration" is deactivated
* move history settings on main tab
* turn the 3 lines for history into a single line with 3 checkboxes
* for comments, turn the "notify admin" settings into a single line with 4 checkboxes

TODO: remove obsolete language keys


git-svn-id: http://piwigo.org/svn/trunk@13004 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Jan 31, 2012
1 parent 7157b8a commit d03e85c
Show file tree
Hide file tree
Showing 6 changed files with 220 additions and 204 deletions.
33 changes: 3 additions & 30 deletions admin/configuration.php
Expand Up @@ -52,18 +52,15 @@
'rate_anonymous',
'email_admin_on_new_user',
'allow_user_customization',
'log',
'history_admin',
'history_guest',
);

$sizes_checkboxes = array(
'original_resize',
);

$history_checkboxes = array(
'log',
'history_admin',
'history_guest'
);

$comments_checkboxes = array(
'activate_comments',
'comments_forall',
Expand Down Expand Up @@ -207,14 +204,6 @@

break;
}
case 'history' :
{
foreach( $history_checkboxes as $checkbox)
{
$_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
}
break;
}
case 'comments' :
{
// the number of comments per page must be an integer between 5 and 50
Expand Down Expand Up @@ -295,7 +284,6 @@
$tabsheet->add('main', l10n('Main'), $conf_link.'main');
$tabsheet->add('sizes', l10n('Photo Sizes'), $conf_link.'sizes');
$tabsheet->add('display', l10n('Display'), $conf_link.'display');
$tabsheet->add('history', l10n('History'), $conf_link.'history');
$tabsheet->add('comments', l10n('Comments'), $conf_link.'comments');
$tabsheet->add('default', l10n('Guest Settings'), $conf_link.'default');
// TabSheet selection
Expand Down Expand Up @@ -387,21 +375,6 @@ function order_by_is_local()
}
break;
}
case 'history' :
{
//Necessary for merge_block_vars
foreach ($history_checkboxes as $checkbox)
{
$template->append(
'history',
array(
$checkbox => $conf[$checkbox]
),
true
);
}
break;
}
case 'comments' :
{
$template->assign(
Expand Down

0 comments on commit d03e85c

Please sign in to comment.