From 9e1f97cd16128bfc9488c4d75f8e3f04c95b24ed Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 26 Mar 2008 00:55:19 +0000 Subject: - can set privacy level for added elements during site sync - removed some unused css and simplified a bit dark theme (more consistent with the orhers) git-svn-id: http://piwigo.org/svn/trunk@2292 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/site_update.php | 73 +++++++++++---------------------- template/yoga/admin/site_update.tpl | 1 + template/yoga/default-colors.css | 8 +--- template/yoga/picture.css | 4 -- template/yoga/theme/dark/theme.css | 80 ++++++++++++++----------------------- 5 files changed, 55 insertions(+), 111 deletions(-) diff --git a/admin/site_update.php b/admin/site_update.php index 7c7f25113..9e19d0fff 100644 --- a/admin/site_update.php +++ b/admin/site_update.php @@ -449,55 +449,17 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id continue; } - // 2 cases : the element is a picture or not. Indeed, for a picture - // thumbnail is mandatory and for non picture element, thumbnail and - // representative are optionnal - if ( isset( $conf['flip_picture_ext'][get_extension($filename)] ) ) - { - // if we found a thumnbnail corresponding to our picture... - if (isset($fs[$path]['tn_ext'])) - { - $insert = array( - 'id' => $next_element_id++, - 'file' => $filename, - 'date_available' => CURRENT_DATE, - 'tn_ext' => $fs[$path]['tn_ext'], - 'path' => $path, - 'storage_category_id' => $db_fulldirs[$dirname], - ); - - array_push( - $inserts, - $insert - ); - - array_push( - $insert_links, - array( - 'image_id' => $insert{'id'}, - 'category_id' => $insert['storage_category_id'], - ) - ); - array_push( - $infos, - array( - 'path' => $insert{'path'}, - 'info' => l10n('update_research_added') - ) - ); - - $caddiables[] = $insert['id']; - } - else - { - array_push( - $errors, - array( - 'path' => $path, - 'type' => 'PWG-UPDATE-2' - ) - ); - } + if ( isset( $conf['flip_picture_ext'][get_extension($filename)] ) + and !isset($fs[$path]['tn_ext']) ) + { // For a picture thumbnail is mandatory and for non picture element, + // thumbnail and representative are optionnal + array_push( + $errors, + array( + 'path' => $path, + 'type' => 'PWG-UPDATE-2' + ) + ); } else { @@ -511,6 +473,11 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id : null, 'storage_category_id' => $db_fulldirs[$dirname], ); + + if ( $_POST['privacy_level']!=0 ) + { + $insert['level'] = $_POST['privacy_level']; + } array_push( $inserts, @@ -932,6 +899,7 @@ if (!isset($_POST['submit']) or (isset($simulate) and $simulate)) 'display_info' => isset($_POST['display_info']) and $_POST['display_info']==1, 'add_to_caddie' => isset($_POST['add_to_caddie']) and $_POST['add_to_caddie']==1, 'subcats_included' => isset($_POST['subcats-included']) and $_POST['subcats-included']==1, + 'privacy_level_selected' => (int)@$_POST['privacy_level'], ); if (isset($_POST['cat']) and is_numeric($_POST['cat'])) @@ -950,11 +918,18 @@ if (!isset($_POST['submit']) or (isset($simulate) and $simulate)) 'display_info' => false, 'add_to_caddie' => false, 'subcats_included' => true, + 'privacy_level_selected' => 0, ); $cat_selected = array(); } + $tpl_introduction['privacy_level_options']=array(); + foreach ($conf['available_permission_levels'] as $level) + { + $tpl_introduction['privacy_level_options'][$level] = l10n( sprintf('Level %d', $level) ); + } + $template->assign('introduction', $tpl_introduction); $query = ' diff --git a/template/yoga/admin/site_update.tpl b/template/yoga/admin/site_update.tpl index 98f797c96..fc0899a90 100644 --- a/template/yoga/admin/site_update.tpl +++ b/template/yoga/admin/site_update.tpl @@ -68,6 +68,7 @@
  • +
  • diff --git a/template/yoga/default-colors.css b/template/yoga/default-colors.css index dfda2e051..ea65cb72a 100644 --- a/template/yoga/default-colors.css +++ b/template/yoga/default-colors.css @@ -3,7 +3,7 @@ /* others */ #imageToolBar * { - background: inherit; + background: inherit; } /* So that non-links are slightly greyed out */ @@ -69,16 +69,10 @@ INPUT.rateButton, INPUT.rateButtonSelected, INPUT.rateButtonStarFull, INPUT.rate background-image: url(icon/admin/infos.png); background-repeat: no-repeat; background-position: top right; - font-weight: bold; margin: 5px; padding: 10px 50px 10px 10px; } -.infos UL LI -{ - font-weight: normal; -} - /** * Header message like upgrade or adviser mode */ diff --git a/template/yoga/picture.css b/template/yoga/picture.css index 692aefcba..27fd5aec8 100644 --- a/template/yoga/picture.css +++ b/template/yoga/picture.css @@ -127,10 +127,6 @@ TABLE.infoTable TD.value UL { margin: 1em 0; } -#comments H2 { - margin: 0.5em 0; -} - #comments P { margin: 0 0.5em 0 1em; } diff --git a/template/yoga/theme/dark/theme.css b/template/yoga/theme/dark/theme.css index ad19696bf..799306fe8 100644 --- a/template/yoga/theme/dark/theme.css +++ b/template/yoga/theme/dark/theme.css @@ -3,112 +3,90 @@ /* text color */ BODY, H1, H3, DT, INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ { - color:#e0e0e0; + color:#d0d0d0; } H2, #menubar DT, .throw { - color: #fff48e; + color: #fff48e; } /* backgrounds */ -BODY { - background-color: #000000; -} -H3, #the_page, #imageHeaderBar, #imageToolBar A:hover, .row1 { - background-color: #3f3f3f; +BODY, H3, #imageHeaderBar, #imageToolBar A:hover, .row1, UL.tabsheet LI.normal_tab { + background-color: #2f2f2f; } -#menubar DL, #content, #imageToolBar, .header_notes, .content { - background-color: #5f5f5f; +#menubar DL, #content, #imageToolBar, .header_notes, .content, UL.tabsheet LI.selected_tab { + background-color: #505050; } -H2, #menubar DT, .throw { - background-image: url(images/tableh1_bg.png); +H2, #menubar DT, .throw { + background-image: url(images/tableh1_bg.png); } #imageHeaderBar H2 { - background-image: none; - background-color: transparent; - border: none; + background-image: none; + background-color: transparent; + border: none; } #imageHeaderBar { - background-image: url(images/tableh2_bg.png); - background-repeat: repeat-x; - background-position: center; + background-image: url(images/tableh2_bg.png); + background-repeat: repeat-x; + background-position: center; } -UL.tabsheet LI.normal_tab { background-color: #3f3f3f; } -UL.tabsheet LI.selected_tab { background-color: #5f5f5f; } - /* borders */ #menubar DL, #content, .content, #comments DIV.comment BLOCKQUOTE { - border: 1px solid #000000; + border: 1px solid #000000; } #imageHeaderBar { - border-top: 1px solid #000000; + border-top: 1px solid #000000; } H2, #menubar DT, #imageToolBar { - border-bottom: 1px solid #000000; + border-bottom: 1px solid #000000; } #theImage IMG { - border-color: #000000; -} - -#content UL.thumbnail IMG { - border: 1px solid #a0a0a0; + border-color: #000000; } FIELDSET, INPUT, SELECT, TEXTAREA, #content DIV.comment A.illustration IMG, #content DIV.thumbnailCategory { - border: 1px solid gray; + border: 1px solid gray; } #comments DIV.comment BLOCKQUOTE { - border-left: 2px solid #696969; + border-left: 2px solid #696969; } #content UL.thumbnails SPAN.wrap2 { - border: 1px solid #aaaaaa; /* thumbnails border color and style */ - border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */ + border: 1px solid #aaaaaa; /* thumbnails border color and style */ + border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */ } #content UL.thumbnails SPAN.wrap2:hover, #content UL.thumbnailCategories DIV.thumbnailCategory:hover, #content UL.thumbnailCategories DIV.thumbnailCategory:hover A { - background-color: #faebd7; - border-color: yellow; /* thumbnails border color when mouse cursor is over it */ - color: black; + background-color: #faebd7; + border-color: yellow; /* thumbnails border color when mouse cursor is over it */ + color: black; } UL.tabsheet LI.normal_tab:hover { border-color: #fff48e; } /* links */ A, INPUT.rateButton { - color: #FFFFFF; + color: #FFFFFF; + border: none; } A:hover { - color: #FFF48E; -} - -#imageToolBar A, #imageToolBar A:hover, -A.navThumb, A.navThumb:hover { - border-bottom: none; -} - -#the_page { - border: 1px solid #e0e0e0; - padding-top: 5px; - padding-bottom:30px; - text-align:center; - display:block; + color: #FFF48E; } -.virtual_cat { background: #3f3f3f !important; } +.virtual_cat { background: #3f3f3f; } -- cgit v1.2.3