From d03e85cfb5c684ab865463e19eb7a4254bb9e574 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 31 Jan 2012 15:19:09 +0000 Subject: feature 2559: minor redesign on configuration screens * 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 --- admin/configuration.php | 33 +-- admin/themes/default/template/configuration.tpl | 292 +++++++++++++++--------- admin/themes/default/theme.css | 81 ++----- 3 files changed, 203 insertions(+), 203 deletions(-) (limited to 'admin') diff --git a/admin/configuration.php b/admin/configuration.php index e03d84fb0..61975c2c7 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -52,18 +52,15 @@ $main_checkboxes = array( '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', @@ -207,14 +204,6 @@ if (isset($_POST['submit'])) 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 @@ -295,7 +284,6 @@ $tabsheet = new tabsheet(); $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 @@ -387,21 +375,6 @@ switch ($page['section']) } 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( diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl index ea4e32fab..f880bea05 100644 --- a/admin/themes/default/template/configuration.tpl +++ b/admin/themes/default/template/configuration.tpl @@ -14,78 +14,106 @@ - -
- - -
{/if} -{if isset($history)} -
- -
{/if} @@ -176,8 +204,8 @@ jQuery(document).ready(function () { @@ -185,71 +213,66 @@ jQuery(document).ready(function () { {footer_script}{literal} @@ -261,12 +284,61 @@ jQuery(document).ready(function(){ jQuery("#comments_param_warp").hide(); } }); + + /* notify on validation checkbox */ + if (jQuery('input[name="comments_validation"]').is(':checked')) { + jQuery('#email_admin_on_comment_validation').show(); + } + else { + jQuery('#email_admin_on_comment_validation').hide(); + } + + jQuery('input[name="comments_validation"]').change(function(){ + if ($(this).is(':checked')) { + jQuery('#email_admin_on_comment_validation').show(); + } + else { + jQuery('#email_admin_on_comment_validation').hide(); + } + }); + + /* notify on edition checkbox */ + if (jQuery('input[name="user_can_edit_comment"]').is(':checked')) { + jQuery('#email_admin_on_comment_edition').show(); + } + else { + jQuery('#email_admin_on_comment_edition').hide(); + } + + jQuery('input[name="user_can_edit_comment"]').change(function(){ + if ($(this).is(':checked')) { + jQuery('#email_admin_on_comment_edition').show(); + } + else { + jQuery('#email_admin_on_comment_edition').hide(); + } + }); + + /* notify on deletion checkbox */ + if (jQuery('input[name="user_can_delete_comment"]').is(':checked')) { + jQuery('#email_admin_on_comment_deletion').show(); + } + else { + jQuery('#email_admin_on_comment_deletion').hide(); + } + + jQuery('input[name="user_can_delete_comment"]').change(function(){ + if ($(this).is(':checked')) { + jQuery('#email_admin_on_comment_deletion').show(); + } + else { + jQuery('#email_admin_on_comment_deletion').hide(); + } + }); }); {/literal}{/footer_script} {/if} - - {if isset($sizes)} {footer_script}{literal} @@ -313,60 +385,56 @@ jQuery(document).ready(function(){ {/if} -{if isset($default)} -{$PROFILE_CONTENT} -{/if} - {if isset($display)}
{'Main Page'|@translate} @@ -377,50 +445,50 @@ jQuery(document).ready(function(){ @@ -431,78 +499,78 @@ jQuery(document).ready(function(){ @@ -516,3 +584,9 @@ jQuery(document).ready(function(){

{/if} + + + +{if isset($default)} +{$PROFILE_CONTENT} +{/if} diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index 072319bf0..5f732ca9b 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -245,63 +245,6 @@ FORM#categoryPermissions LI { white-space: nowrap; } -FIELDSET#mainConfCheck SPAN.property, -FIELDSET#historyConf SPAN.property, -FIELDSET#commentsConf SPAN.property, -FIELDSET#uploadConf SPAN.property, -FIELDSET#indexDisplayConf SPAN.property, -FIELDSET#pictureDisplayConf SPAN.property, -FIELDSET#pictureInfoConf SPAN.property { - float: right; - text-align: left; -} -FIELDSET#mainConfCheck INPUT, -FIELDSET#historyConf INPUT, -FIELDSET#commentsConf INPUT, -FIELDSET#uploadConf INPUT, -FIELDSET#indexDisplayConf INPUT, -FIELDSET#pictureDisplayConf INPUT, -FIELDSET#pictureInfoConf INPUT { - float: none; -} - -FIELDSET#mainConf SPAN.property { - width: 25%; -} -FIELDSET#mainConf TEXTAREA.description { - width: 70%; -} - -FIELDSET#mainConfCheck SPAN.property, -FIELDSET#historyConf SPAN.property, -FIELDSET#indexDisplayConf SPAN.property, -FIELDSET#pictureDisplayConf SPAN.property, -FIELDSET#pictureInfoConf SPAN.property { - width: 90%; -} -FIELDSET#mainConfCheck INPUT, -FIELDSET#historyConf INPUT, -FIELDSET#commentsConf INPUT, -FIELDSET#indexDisplayConf INPUT, -FIELDSET#pictureDisplayConf INPUT, -FIELDSET#pictureInfoConf INPUT { - margin-left: 5%; -} -FIELDSET#uploadConf SELECT { - float: right; - margin: 2px 10px 0px; -} -FIELDSET#uploadConf INPUT { - float: right; - margin: 5px 10px 0px; -} -FIELDSET#uploadConf SPAN.property { - width: 65%; -} -FIELDSET#commentsConf SPAN.property { - width: 85%; -} - .statBar { height: 10px; background-color: #ff7700; @@ -528,6 +471,16 @@ FORM.properties SPAN.property { padding: 0 0.5em 0 0; } +#mainConf, #historyConf, #commentsConf {border:none} + +#configContent label { + font-weight: bold; +} + +#mainConf li { + margin-bottom: 1em; +} + #theHeader H1 { margin-bottom: 0.5em; } @@ -843,7 +796,7 @@ h2:lang(en) { text-transform:capitalize; } #helpContent LI, #ftpPage LI {margin-top:10px;} #helpContent P.nextStepLink {text-align:center; font-weight:bold; margin-bottom:20px;} -#configContent FIELDSET, #availablePlugins FIELDSET {border:none;} +#availablePlugins FIELDSET {border:none;} /** * Informations box in administration @@ -1050,12 +1003,12 @@ div.token-input-dropdown ul li.token-input-dropdown-item2 {background-color: #ff div.token-input-dropdown ul li em {font-weight: bold;font-style: normal;} div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-color: #3b5998;color: #fff;} -#mainConfCheck a.addFilter {font-weight:normal;margin-left:20px;} -#mainConfCheck a.removeFilter {font-weight:normal;} -#mainConfCheck span.property span.filter:first-child a.removeFilter {display:none;} /* can't delete the first field */ -#mainConfCheck span.filter {display:block;margin-left:20px;} -#mainConfCheck .transparent {opacity:0.5;filter:alpha(opacity=50);} -#mainConfCheck .order_by_is_custom {display:block;font-weight:normal;font-style:italic;margin-left:20px;} +#mainConf a.addFilter {font-weight:normal;margin-left:20px;} +#mainConf a.removeFilter {font-weight:normal;} +#mainConf span.property span.filter:first-child a.removeFilter {display:none;} /* can't delete the first field */ +#mainConf span.filter {display:block;margin-left:20px;} +#mainConf .transparent {opacity:0.5;filter:alpha(opacity=50);} +#mainConf .order_by_is_custom {display:block;font-weight:normal;font-style:italic;margin-left:20px;} /* Upload Form */ #uploadBoxes .file {margin-bottom:5px;text-align:left;} -- cgit v1.2.3