- 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
This commit is contained in:
rvelices
2008-03-26 00:55:19 +00:00
parent 6aa72e141a
commit 9e1f97cd16
5 changed files with 56 additions and 112 deletions
+24 -49
View File
@@ -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 = '
+1
View File
@@ -68,6 +68,7 @@
<li><label><input type="radio" name="sync" value="files" {if 'files'==$introduction.sync}checked="checked"{/if}/> {'update_sync_all'|@translate}</label></li>
<li><label><input type="checkbox" name="display_info" value="1" {if $introduction.display_info}checked="checked"{/if}/> {'update_display_info'|@translate}</label></li>
<li><label><input type="checkbox" name="add_to_caddie" value="1" {if $introduction.add_to_caddie}checked="checked"{/if}/> {'add new elements to caddie'|@translate}</label></li>
<li><label>{'Minimum privacy level'|@translate} <select name="privacy_level">{html_options options=$introduction.privacy_level_options selected=$introduction.privacy_level_selected}</select></label></li>
</ul>
</fieldset>
+1 -7
View File
@@ -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
*/
-4
View File
@@ -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;
}
+30 -52
View File
@@ -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;
BODY, H3, #imageHeaderBar, #imageToolBar A:hover, .row1, UL.tabsheet LI.normal_tab {
background-color: #2f2f2f;
}
H3, #the_page, #imageHeaderBar, #imageToolBar A:hover, .row1 {
background-color: #3f3f3f;
#menubar DL, #content, #imageToolBar, .header_notes, .content, UL.tabsheet LI.selected_tab {
background-color: #505050;
}
#menubar DL, #content, #imageToolBar, .header_notes, .content {
background-color: #5f5f5f;
}
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;
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;
}
.virtual_cat { background: #3f3f3f !important; }
.virtual_cat { background: #3f3f3f; }