aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-05-02 21:56:21 +0000
committerrub <rub@piwigo.org>2008-05-02 21:56:21 +0000
commit5436a351ef6dd685483f022af6656bbf8b797cb6 (patch)
tree8d963ace1e57b404726500753111649d144527c6 /template
parent7942dccf9b682d359a89636528e96af5b38327da (diff)
Resolved issue 0000823: Enhance upload functionalities
First commit, others will be follow. Not hesitate to change my translations. Add upload configuration tabsheet (move and add configuration) Change and add define for access level Can show upload link every time Can restrict access upload.class.php Can choice category on upload page Add upload class not use for the moment Review quickly and temporary style of upload.tpl git-svn-id: http://piwigo.org/svn/trunk@2325 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--template/yoga/admin/configuration.tpl28
-rw-r--r--template/yoga/admin/default-layout.css16
-rw-r--r--template/yoga/admin/picture_modify.tpl16
-rw-r--r--template/yoga/menubar.tpl232
-rw-r--r--template/yoga/upload.tpl45
5 files changed, 182 insertions, 155 deletions
diff --git a/template/yoga/admin/configuration.tpl b/template/yoga/admin/configuration.tpl
index cccb879af..04d8c7855 100644
--- a/template/yoga/admin/configuration.tpl
+++ b/template/yoga/admin/configuration.tpl
@@ -79,13 +79,6 @@
<input type="checkbox" name="email_admin_on_new_user" {if ($main.email_admin_on_new_user)}checked="checked"{/if} />
</label>
</li>
-
- <li>
- <label>
- <span class="property">{'Email administrators when a picture is uploaded'|@translate}</span>
- <input type="checkbox" name="email_admin_on_picture_uploaded" {if ($main.email_admin_on_picture_uploaded)}checked="checked"{/if} />
- </label>
- </li>
</ul>
</fieldset>
{/if}
@@ -152,6 +145,27 @@
</fieldset>
{/if}
+{if isset($upload)}
+<fieldset id="uploadConf">
+ <ul>
+ <li>
+ <label><span class="property">{'Show upload link every time'|@translate}</span>
+ <input type="checkbox" name="upload_link_everytime" {if ($upload.upload_link_everytime)}checked="checked"{/if} /></label>
+ </li>
+ <li>
+ <label><span class="property">{'User access level to upload'|@translate}</span>
+ {html_options name="upload_user_access" options=$upload.upload_user_access_options selected=$upload.upload_user_access_options_selected}
+ </li>
+ <li>
+ <label>
+ <span class="property">{'Email administrators when a picture is uploaded'|@translate}</span>
+ <input type="checkbox" name="email_admin_on_picture_uploaded" {if ($upload.email_admin_on_picture_uploaded)}checked="checked"{/if} />
+ </label>
+ </li>
+ </ul>
+</fieldset>
+{/if}
+
{if isset($default)}
{$PROFILE_CONTENT}
{/if}
diff --git a/template/yoga/admin/default-layout.css b/template/yoga/admin/default-layout.css
index b458b72f4..45e352606 100644
--- a/template/yoga/admin/default-layout.css
+++ b/template/yoga/admin/default-layout.css
@@ -99,13 +99,15 @@ FORM#categoryPermissions LI {
FIELDSET#mainConfCheck SPAN.property,
FIELDSET#historyConf SPAN.property,
-FIELDSET#commentsConf SPAN.property {
+FIELDSET#commentsConf SPAN.property,
+FIELDSET#uploadConf SPAN.property {
float: right;
text-align: left;
}
FIELDSET#mainConfCheck INPUT,
FIELDSET#historyConf INPUT,
-FIELDSET#commentsConf INPUT {
+FIELDSET#commentsConf INPUT,
+FIELDSET#uploadConf INPUT {
float: none;
}
@@ -121,15 +123,19 @@ FIELDSET#historyConf SPAN.property {
width: 90%;
}
FIELDSET#mainConfCheck INPUT,
-FIELDSET#historyConf INPUT {
+FIELDSET#historyConf INPUT,
+FIELDSET#commentsConf INPUT,
+FIELDSET#uploadConf SELECT,
+FIELDSET#uploadConf INPUT {
margin-left: 5%;
}
FIELDSET#commentsConf SPAN.property {
width: 85%;
}
-FIELDSET#commentsConf INPUT {
- margin-left: 5%;
+
+FIELDSET#uploadConf SPAN.property {
+ width: 75%;
}
/* PWG Links Menu is fixed Graphic charts */
diff --git a/template/yoga/admin/picture_modify.tpl b/template/yoga/admin/picture_modify.tpl
index a48773e35..f6243acb9 100644
--- a/template/yoga/admin/picture_modify.tpl
+++ b/template/yoga/admin/picture_modify.tpl
@@ -115,14 +115,14 @@
<td><textarea name="description" class="description">{$DESCRIPTION}</textarea></td>
</tr>
- <tr>
- <td><strong>{'Minimum privacy level'|@translate}</strong></td>
- <td>
- <select name="level" size="1">
- {html_options options=$level_options selected=$level_options_selected}
- </select>
- </td>
- </tr>
+ <tr>
+ <td><strong>{'Minimum privacy level'|@translate}</strong></td>
+ <td>
+ <select name="level" size="1">
+ {html_options options=$level_options selected=$level_options_selected}
+ </select>
+ </td>
+ </tr>
</table>
diff --git a/template/yoga/menubar.tpl b/template/yoga/menubar.tpl
index b53af4b1e..fda136c29 100644
--- a/template/yoga/menubar.tpl
+++ b/template/yoga/menubar.tpl
@@ -3,20 +3,20 @@
<div id="menubar">
{if not empty($links)}
<dl id="mbLinks">
- <dt>{'Links'|@translate}</dt>
- <dd>
- <ul>
- {foreach from=$links item=link}
- <li>
- <a href="{$link.URL}"
- {if isset($link.new_window) }onclick="window.open(this.href, '{$link.new_window.NAME|@escape:'javascript'}','{$link.new_window.FEATURES|@escape:'javascript'}'); return false;"{/if}
- >
- {$link.LABEL}
- </a>
- </li>
- {/foreach}{*links*}
- </ul>
- </dd>
+ <dt>{'Links'|@translate}</dt>
+ <dd>
+ <ul>
+ {foreach from=$links item=link}
+ <li>
+ <a href="{$link.URL}"
+ {if isset($link.new_window) }onclick="window.open(this.href, '{$link.new_window.NAME|@escape:'javascript'}','{$link.new_window.FEATURES|@escape:'javascript'}'); return false;"{/if}
+ >
+ {$link.LABEL}
+ </a>
+ </li>
+ {/foreach}{*links*}
+ </ul>
+ </dd>
</dl>
{/if}{*links*}
@@ -28,136 +28,136 @@
{/if}
<dl id="mbCategories">
- <dt><a href="{$U_CATEGORIES}">{'Categories'|@translate}</a></dt>
- <dd>
- {$MENU_CATEGORIES_CONTENT}
+ <dt><a href="{$U_CATEGORIES}">{'Categories'|@translate}</a></dt>
+ <dd>
+ {$MENU_CATEGORIES_CONTENT}
{if isset($U_UPLOAD)}
<ul><li>
<a href="{$U_UPLOAD}">{'upload_picture'|@translate}</a>
</li></ul>
{/if}
- <p class="totalImages">{$pwg->l10n_dec('%d element', '%d elements', $NB_PICTURE)}</p>
+ <p class="totalImages">{$pwg->l10n_dec('%d element', '%d elements', $NB_PICTURE)}</p>
</dd>
</dl>
{if not empty($related_tags)}
<dl id="mbTags">
- <dt>{'Related tags'|@translate}</dt>
- <dd>
- <ul id="menuTagCloud">
- {foreach from=$related_tags item=tag}
- <li>
- {if !empty($tag.add) }
- <a href="{$tag.add.URL}"
- title="{$pwg->l10n_dec('%d element are also linked to current tags', '%d elements are also linked to current tags', $tag.add.COUNTER)}"
- rel="nofollow">
- <img src="{$ROOT_URL}{$themeconf.icon_dir}/add_tag.png" alt="+" />
- </a>
- {/if}
- <a href="{$tag.U_TAG}" class="{$tag.CLASS}" title="{'See elements linked to this tag only'|@translate}">{$tag.NAME}</a>
- </li>
- {/foreach}
- </ul>
- </dd>
+ <dt>{'Related tags'|@translate}</dt>
+ <dd>
+ <ul id="menuTagCloud">
+ {foreach from=$related_tags item=tag}
+ <li>
+ {if !empty($tag.add) }
+ <a href="{$tag.add.URL}"
+ title="{$pwg->l10n_dec('%d element are also linked to current tags', '%d elements are also linked to current tags', $tag.add.COUNTER)}"
+ rel="nofollow">
+ <img src="{$ROOT_URL}{$themeconf.icon_dir}/add_tag.png" alt="+" />
+ </a>
+ {/if}
+ <a href="{$tag.U_TAG}" class="{$tag.CLASS}" title="{'See elements linked to this tag only'|@translate}">{$tag.NAME}</a>
+ </li>
+ {/foreach}
+ </ul>
+ </dd>
</dl>
{/if}
<dl id="mbSpecial">
- <dt>{'special_categories'|@translate}</dt>
- <dd>
- <ul>
- {foreach from=$special_categories item=cat}
- <li><a href="{$cat.URL}" title="{$cat.TITLE}" {if isset($cat.REL)}{$cat.REL}{/if}>{$cat.NAME}</a></li>
- {/foreach}
- </ul>
- </dd>
+ <dt>{'special_categories'|@translate}</dt>
+ <dd>
+ <ul>
+ {foreach from=$special_categories item=cat}
+ <li><a href="{$cat.URL}" title="{$cat.TITLE}" {if isset($cat.REL)}{$cat.REL}{/if}>{$cat.NAME}</a></li>
+ {/foreach}
+ </ul>
+ </dd>
</dl>
<dl id="mbMenu">
- <dt>{'title_menu'|@translate}</dt>
- <dd>
- <form action="{$ROOT_URL}qsearch.php" method="get" id="quicksearch">
- <p>
- <input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" />
- </p>
- </form>
- <script type="text/javascript">var qsearch_prompt="{'qsearch'|@translate|@escape:'javascript'}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>
-
- <ul>
- {foreach from=$summaries item=sum}
- <li><a href="{$sum.U_SUMMARY}" title="{$sum.TITLE}" {if isset($sum.REL)}{$sum.REL}{/if}>{$sum.NAME}</a></li>
- {/foreach}
- </ul>
- </dd>
+ <dt>{'title_menu'|@translate}</dt>
+ <dd>
+ <form action="{$ROOT_URL}qsearch.php" method="get" id="quicksearch">
+ <p>
+ <input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" />
+ </p>
+ </form>
+ <script type="text/javascript">var qsearch_prompt="{'qsearch'|@translate|@escape:'javascript'}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>
+
+ <ul>
+ {foreach from=$summaries item=sum}
+ <li><a href="{$sum.U_SUMMARY}" title="{$sum.TITLE}" {if isset($sum.REL)}{$sum.REL}{/if}>{$sum.NAME}</a></li>
+ {/foreach}
+ </ul>
+ </dd>
</dl>
<dl id="mbIdentification">
- <dt>{'identification'|@translate}</dt>
- <dd>
+ <dt>{'identification'|@translate}</dt>
+ <dd>
{if isset($USERNAME)}
<p>{'hello'|@translate}&nbsp;{$USERNAME}&nbsp;!</p>
{/if}
- <ul>
- {if isset($U_REGISTER)}
- <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow">{'Register'|@translate}</a></li>
- {/if}
-
- {if isset($U_IDENTIFY)}
- <li><a href="{$U_IDENTIFY}" rel="nofollow">{'Connection'|@translate}</a></li>
- {/if}
-
- {if isset($U_LOGOUT)}
- <li><a href="{$U_LOGOUT}">{'logout'|@translate}</a></li>
- {/if}
-
- {if isset($U_PROFILE)}
- <li><a href="{$U_PROFILE}" title="{'hint_customize'|@translate}">{'customize'|@translate}</a></li>
- {/if}
-
- {if isset($U_ADMIN)}
- <li><a href="{$U_ADMIN}" title="{'hint_admin'|@translate}">{'admin'|@translate}</a></li>
- {/if}
- </ul>
-
- {if isset($U_IDENTIFY)}
- <form method="post" action="{$U_IDENTIFY}" class="filter" id="quickconnect">
- <fieldset>
- <legend>{'Quick connect'|@translate}</legend>
-
- <label>
- {'Username'|@translate}
- <input type="text" name="username" size="15" value="">
- </label>
-
- <label>
- {'Password'|@translate}
- <input type="password" name="password" size="15">
- </label>
-
- {if $AUTHORIZE_REMEMBERING}
- <label>
- {'remember_me'|@translate}
- <input type="checkbox" name="remember_me" value="1">
- </label>
- {/if}
- <p>
- <input class="submit" type="submit" name="login" value="{'Submit'|@translate}">
- </p>
-
- <ul class="actions">
- <li><a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}"></a></li>
- {if isset($U_REGISTER)}
- <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'Register'|@translate}"/></a></li>
- {/if}
- </ul>
-
- </fieldset>
- </form>
+ <ul>
+ {if isset($U_REGISTER)}
+ <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow">{'Register'|@translate}</a></li>
+ {/if}
+
+ {if isset($U_IDENTIFY)}
+ <li><a href="{$U_IDENTIFY}" rel="nofollow">{'Connection'|@translate}</a></li>
+ {/if}
+
+ {if isset($U_LOGOUT)}
+ <li><a href="{$U_LOGOUT}">{'logout'|@translate}</a></li>
+ {/if}
+
+ {if isset($U_PROFILE)}
+ <li><a href="{$U_PROFILE}" title="{'hint_customize'|@translate}">{'customize'|@translate}</a></li>
+ {/if}
+
+ {if isset($U_ADMIN)}
+ <li><a href="{$U_ADMIN}" title="{'hint_admin'|@translate}">{'admin'|@translate}</a></li>
+ {/if}
+ </ul>
+
+ {if isset($U_IDENTIFY)}
+ <form method="post" action="{$U_IDENTIFY}" class="filter" id="quickconnect">
+ <fieldset>
+ <legend>{'Quick connect'|@translate}</legend>
+
+ <label>
+ {'Username'|@translate}
+ <input type="text" name="username" size="15" value="">
+ </label>
+
+ <label>
+ {'Password'|@translate}
+ <input type="password" name="password" size="15">
+ </label>
+
+ {if $AUTHORIZE_REMEMBERING}
+ <label>
+ {'remember_me'|@translate}
+ <input type="checkbox" name="remember_me" value="1">
+ </label>
+ {/if}
+ <p>
+ <input class="submit" type="submit" name="login" value="{'Submit'|@translate}">
+ </p>
+
+ <ul class="actions">
+ <li><a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}"></a></li>
+ {if isset($U_REGISTER)}
+ <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'Register'|@translate}"/></a></li>
+ {/if}
+ </ul>
+
+ </fieldset>
+ </form>
{/if}
</dd>
diff --git a/template/yoga/upload.tpl b/template/yoga/upload.tpl
index 1aad667e3..78ef36585 100644
--- a/template/yoga/upload.tpl
+++ b/template/yoga/upload.tpl
@@ -35,50 +35,57 @@
</td>
</tr>
<tr>
- <td colspan="2" align="center" style="padding:10px;">
+ <td colspan="2" align="center">
<input name="picture" type="file" value="" />
</td>
</tr>
{if isset($SHOW_FORM_FIELDS) and $SHOW_FORM_FIELDS}
- <!-- username -->
+ <!-- category -->
+ <tr>
+ <td>{'Category'|@translate}</td>
+ <td>
+ {html_options name="category" options=$categories selected=$categories_selected}
+ </td>
+ </tr>
+ <!-- username -->
<tr>
- <td class="menu">{'Username'|@translate} <span style="color:red;">*</span></td>
- <td align="left" style="padding:10px;">
+ <td>{'Username'|@translate} <span style="color:red;">*</span></td>
+ <td>
<input name="username" type="text" value="{$NAME}" />
</td>
</tr>
- <!-- mail address -->
+ <!-- mail address -->
<tr>
- <td class="menu">{'mail_address'|@translate} <span style="color:red;">*</span></td>
- <td align="left" style="padding:10px;">
+ <td>{'mail_address'|@translate} <span style="color:red;">*</span></td>
+ <td>
<input name="mail_address" type="text" value="{$EMAIL}" />
</td>
</tr>
- <!-- name of the picture -->
+ <!-- name of the picture -->
<tr>
- <td class="menu">{'upload_name'|@translate}</td>
- <td align="left" style="padding:10px;">
+ <td>{'upload_name'|@translate}</td>
+ <td>
<input name="name" type="text" value="{$NAME_IMG}" />
</td>
</tr>
- <!-- author -->
+ <!-- author -->
<tr>
- <td class="menu">{'upload_author'|@translate}</td>
- <td align="left" style="padding:10px;">
+ <td>{'upload_author'|@translate}</td>
+ <td>
<input name="author" type="text" value="{$AUTHOR_IMG}" />
</td>
</tr>
- <!-- date of creation -->
+ <!-- date of creation -->
<tr>
- <td class="menu">{'Creation date'|@translate} (DD/MM/YYYY)</td>
- <td align="left" style="padding:10px;">
+ <td>{'Creation date'|@translate} (DD/MM/YYYY)</td>
+ <td>
<input name="date_creation" type="text" value="{$DATE_IMG}" />
</td>
</tr>
- <!-- comment -->
+ <!-- comment -->
<tr>
- <td class="menu">{'comment'|@translate}</td>
- <td align="left" style="padding:10px;">
+ <td>{'comment'|@translate}</td>
+ <td>
<textarea name="comment" rows="3" cols="40" style="overflow:auto">{$COMMENT_IMG}</textarea>
</td>
</tr>