aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-03-24 00:39:34 +0000
committerpatdenice <patdenice@piwigo.org>2010-03-24 00:39:34 +0000
commit151920ed0943568ad51bd6d9bacadcdea46fea4f (patch)
tree1af7e76fe85079e485a9eedc19d8daaefab27243 /admin
parent8802877a844a9604072dd2ebbfddc668d53a12d2 (diff)
Feature 1533: Allow activation or deactivation of download icon.
Add display configuration for picture properties. git-svn-id: http://piwigo.org/svn/trunk@5304 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/configuration.php26
-rw-r--r--admin/themes/default/default-layout.css12
-rw-r--r--admin/themes/default/template/configuration.tpl84
3 files changed, 116 insertions, 6 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index b8dc57433..9ec7ed805 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -89,6 +89,19 @@ $display_checkboxes = array(
'picture_navigation_thumb',
);
+$display_info_checkboxes = array(
+ 'author',
+ 'created_on',
+ 'posted_on',
+ 'dimensions',
+ 'file',
+ 'filesize',
+ 'tags',
+ 'categories',
+ 'visits',
+ 'average_rate',
+ );
+
//------------------------------ verification and registration of modifications
if (isset($_POST['submit']) and !is_adviser())
{
@@ -151,6 +164,12 @@ if (isset($_POST['submit']) and !is_adviser())
{
$_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
}
+ foreach( $display_info_checkboxes as $checkbox)
+ {
+ $_POST['picture_informations'][$checkbox] =
+ empty($_POST['picture_informations'][$checkbox])? false : true;
+ }
+ $_POST['picture_informations'] = addslashes(serialize($_POST['picture_informations']));
break;
}
}
@@ -333,6 +352,13 @@ switch ($page['section'])
true
);
}
+ $template->append(
+ 'display',
+ array(
+ 'picture_informations' => unserialize($conf['picture_informations'])
+ ),
+ true
+ );
break;
}
}
diff --git a/admin/themes/default/default-layout.css b/admin/themes/default/default-layout.css
index aa9f4fae1..d9c71d96a 100644
--- a/admin/themes/default/default-layout.css
+++ b/admin/themes/default/default-layout.css
@@ -128,7 +128,8 @@ FIELDSET#historyConf SPAN.property,
FIELDSET#commentsConf SPAN.property,
FIELDSET#uploadConf SPAN.property,
FIELDSET#indexDisplayConf SPAN.property,
-FIELDSET#pictureDisplayConf SPAN.property {
+FIELDSET#pictureDisplayConf SPAN.property,
+FIELDSET#pictureInfoConf SPAN.property {
float: right;
text-align: left;
}
@@ -137,7 +138,8 @@ FIELDSET#historyConf INPUT,
FIELDSET#commentsConf INPUT,
FIELDSET#uploadConf INPUT,
FIELDSET#indexDisplayConf INPUT,
-FIELDSET#pictureDisplayConf INPUT {
+FIELDSET#pictureDisplayConf INPUT,
+FIELDSET#pictureInfoConf INPUT {
float: none;
}
@@ -151,14 +153,16 @@ FIELDSET#mainConf TEXTAREA.description {
FIELDSET#mainConfCheck SPAN.property,
FIELDSET#historyConf SPAN.property,
FIELDSET#indexDisplayConf SPAN.property,
-FIELDSET#pictureDisplayConf 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#pictureDisplayConf INPUT,
+FIELDSET#pictureInfoConf INPUT {
margin-left: 5%;
}
FIELDSET#uploadConf SELECT {
diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl
index 3ec558dbc..c31374148 100644
--- a/admin/themes/default/template/configuration.tpl
+++ b/admin/themes/default/template/configuration.tpl
@@ -103,7 +103,6 @@
</fieldset>
{/if}
-
{if isset($comments)}
<fieldset id="commentsConf">
<legend></legend>
@@ -129,7 +128,6 @@
</label>
</li>
-
<li>
<label>
<span class="property">{'Email admins when a valid comment is entered'|@translate}</span>
@@ -289,6 +287,88 @@
</li>
</ul>
</fieldset>
+
+<fieldset id="pictureInfoConf">
+ <legend>{'Photo Properties'|@translate}</legend>
+ <ul>
+ <li>
+ <label>
+ <span class="property">{'Author'|@translate}</span>
+ <input type="checkbox" name="picture_informations[author]" {if ($display.picture_informations.author)}checked="checked"{/if}>
+ </label>
+ </li>
+
+ <li>
+ <label>
+ <span class="property">{'Created on'|@translate}</span>
+ <input type="checkbox" name="picture_informations[created_on]" {if ($display.picture_informations.created_on)}checked="checked"{/if}>
+ </label>
+ </li>
+
+ <li>
+ <label>
+ <span class="property">{'Posted on'|@translate}</span>
+ <input type="checkbox" name="picture_informations[posted_on]" {if ($display.picture_informations.posted_on)}checked="checked"{/if}>
+ </label>
+ </li>
+
+ <li>
+ <label>
+ <span class="property">{'Dimensions'|@translate}</span>
+ <input type="checkbox" name="picture_informations[dimensions]" {if ($display.picture_informations.dimensions)}checked="checked"{/if}>
+ </label>
+ </li>
+
+ <li>
+ <label>
+ <span class="property">{'File'|@translate}</span>
+ <input type="checkbox" name="picture_informations[file]" {if ($display.picture_informations.file)}checked="checked"{/if}>
+ </label>
+ </li>
+
+ <li>
+ <label>
+ <span class="property">{'Filesize'|@translate}</span>
+ <input type="checkbox" name="picture_informations[filesize]" {if ($display.picture_informations.filesize)}checked="checked"{/if}>
+ </label>
+ </li>
+
+ <li>
+ <label>
+ <span class="property">{'Tags'|@translate}</span>
+ <input type="checkbox" name="picture_informations[tags]" {if ($display.picture_informations.tags)}checked="checked"{/if}>
+ </label>
+ </li>
+
+ <li>
+ <label>
+ <span class="property">{'Categories'|@translate}</span>
+ <input type="checkbox" name="picture_informations[categories]" {if ($display.picture_informations.categories)}checked="checked"{/if}>
+ </label>
+ </li>
+
+ <li>
+ <label>
+ <span class="property">{'Visits'|@translate}</span>
+ <input type="checkbox" name="picture_informations[visits]" {if ($display.picture_informations.visits)}checked="checked"{/if}>
+ </label>
+ </li>
+
+ <li>
+ <label>
+ <span class="property">{'Average rate'|@translate}</span>
+ <input type="checkbox" name="picture_informations[average_rate]" {if ($display.picture_informations.average_rate)}checked="checked"{/if}>
+ </label>
+ </li>
+
+ <li>
+ <label>
+ <span class="property">{'Privacy level'|@translate} ({'available for administrators only'|@translate})</span>
+ <input type="checkbox" name="picture_informations[privacy_level]" {if ($display.picture_informations.privacy_level)}checked="checked"{/if}>
+ </label>
+ </li>
+ </ul>
+</fieldset>
{/if}
{if !isset($default)}