aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/template
diff options
context:
space:
mode:
Diffstat (limited to 'admin/themes/default/template')
-rw-r--r--admin/themes/default/template/admin.tpl109
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl73
-rw-r--r--admin/themes/default/template/batch_manager_unit.tpl3
-rw-r--r--admin/themes/default/template/cat_list.tpl28
-rw-r--r--admin/themes/default/template/cat_modify.tpl18
-rw-r--r--admin/themes/default/template/cat_perm.tpl4
-rw-r--r--admin/themes/default/template/comments.tpl24
-rw-r--r--admin/themes/default/template/configuration.tpl490
-rw-r--r--admin/themes/default/template/element_set_ranks.tpl6
-rw-r--r--admin/themes/default/template/extend_for_templates.tpl8
-rw-r--r--admin/themes/default/template/group_list.tpl100
-rw-r--r--admin/themes/default/template/header.tpl15
-rw-r--r--admin/themes/default/template/history.tpl64
-rw-r--r--admin/themes/default/template/include/add_album.inc.tpl110
-rw-r--r--admin/themes/default/template/install.tpl29
-rw-r--r--admin/themes/default/template/intro.tpl9
-rw-r--r--admin/themes/default/template/menubar.tpl2
-rw-r--r--admin/themes/default/template/notification_by_mail.tpl14
-rw-r--r--admin/themes/default/template/photos_add_direct.tpl24
-rw-r--r--admin/themes/default/template/picture_modify.tpl13
-rw-r--r--admin/themes/default/template/plugins_installed.tpl4
-rw-r--r--admin/themes/default/template/plugins_new.tpl2
-rw-r--r--admin/themes/default/template/profile_content.tpl2
-rw-r--r--admin/themes/default/template/tags.tpl151
-rw-r--r--admin/themes/default/template/themes_installed.tpl120
-rw-r--r--admin/themes/default/template/updates_ext.tpl8
-rw-r--r--admin/themes/default/template/updates_pwg.tpl14
-rw-r--r--admin/themes/default/template/upgrade.tpl9
-rw-r--r--admin/themes/default/template/user_list.tpl1327
29 files changed, 1865 insertions, 915 deletions
diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl
index 9e929d449..7fc9dc179 100644
--- a/admin/themes/default/template/admin.tpl
+++ b/admin/themes/default/template/admin.tpl
@@ -10,50 +10,47 @@ jQuery(document).ready(function(){ldelim}
});
{/footer_script}
-{combine_script id='raphael' load='async' path='themes/default/js/raphael.js'}
-{combine_script id='raphael.menu_icons' require='raphael' load='async' path='admin/themes/default/js/menu_icons.js'}
-
<div id="menubar">
<div id="adminHome"><a href="{$U_ADMIN}">{'Administration Home'|@translate}</a></div>
- <dl class="first">
- <dt class="rdion"><span id="menubarPhotos">&nbsp;{'Photos'|@translate}&nbsp;</span></dt>
- <dd>
- <ul>
- <li><a href="{$U_ADD_PHOTOS}">{'Add'|@translate}</a></li>
- <li><a href="{$U_RATING}">{'Rating'|@translate}</a></li>
- <li><a href="{$U_TAGS}">{'Tags'|@translate}</a></li>
- <li><a href="{$U_RECENT_SET}">{'Recent photos'|@translate}</a></li>
- <li><a href="{$U_BATCH}">{'Batch Manager'|@translate}</a></li>
+ <dl class="first">
+ <dt class="rdion"><span class="icon-picture"> </span><span>{'Photos'|@translate}&nbsp;</span></dt>
+ <dd>
+ <ul>
+ <li><a class="icon-plus-circled" href="{$U_ADD_PHOTOS}">{'Add'|@translate}</a></li>
+ <li><a class="icon-star" href="{$U_RATING}">{'Rating'|@translate}</a></li>
+ <li><a class="icon-tags" href="{$U_TAGS}">{'Tags'|@translate}</a></li>
+ <li><a class="icon-clock" href="{$U_RECENT_SET}">{'Recent photos'|@translate}</a></li>
+ <li><a class="icon-pencil" href="{$U_BATCH}">{'Batch Manager'|@translate}</a></li>
{if $NB_PHOTOS_IN_CADDIE > 0}
- <li><a href="{$U_CADDIE}">{'Caddie'|@translate}<span class="adminMenubarCounter">{$NB_PHOTOS_IN_CADDIE}</span></a></li>
+ <li><a class="icon-flag" href="{$U_CADDIE}">{'Caddie'|@translate}<span class="adminMenubarCounter">{$NB_PHOTOS_IN_CADDIE}</span></a></li>
{/if}
- </ul>
- </dd>
- </dl>
- <dl>
- <dt class="rdion"><span id="menubarAlbums">&nbsp;{'Albums'|@translate}&nbsp;</span></dt>
+ </ul>
+ </dd>
+ </dl>
+ <dl>
+ <dt class="rdion"><span class="icon-sitemap"> </span><span>{'Albums'|@translate}&nbsp;</span></dt>
<dd>
<ul>
- <li><a href="{$U_CATEGORIES}">{'Manage'|@translate}</a></li>
- <li><a href="{$U_CAT_OPTIONS}">{'Properties'|@translate}</a></li>
+ <li><a class="icon-folder-open" href="{$U_CATEGORIES}">{'Manage'|@translate}</a></li>
+ <li><a class="icon-pencil" href="{$U_CAT_OPTIONS}">{'Properties'|@translate}</a></li>
</ul>
</dd>
- </dl>
- <dl>
- <dt class="rdion"><span id="menubarUsers">&nbsp;{'Users'|@translate}&nbsp;</span></dt>
- <dd>
+ </dl>
+ <dl>
+ <dt class="rdion"><span class="icon-users"> </span><span>{'Users'|@translate}&nbsp;</span></dt>
+ <dd>
<ul>
- <li><a href="{$U_USERS}">{'Manage'|@translate}</a></li>
- <li><a href="{$U_GROUPS}">{'Groups'|@translate}</a></li>
- <li><a href="{$U_NOTIFICATION_BY_MAIL}">{'Notification'|@translate}</a></li>
+ <li><a class="icon-user-add" href="{$U_USERS}">{'Manage'|@translate}</a></li>
+ <li><a class="icon-group" href="{$U_GROUPS}">{'Groups'|@translate}</a></li>
+ <li><a class="icon-mail-1" href="{$U_NOTIFICATION_BY_MAIL}">{'Notification'|@translate}</a></li>
</ul>
- </dd>
- </dl>
- <dl>
- <dt class="rdion"><span id="menubarPlugins">&nbsp;{'Plugins'|@translate}&nbsp;</span></dt>
- <dd>
+ </dd>
+ </dl>
+ <dl>
+ <dt class="rdion"><span class="icon-puzzle"> </span><span>{'Plugins'|@translate}&nbsp;</span></dt>
+ <dd>
<ul>
- <li><a href="{$U_PLUGINS}">{'Manage'|@translate}</a></li>
+ <li><a class="icon-equalizer" href="{$U_PLUGINS}">{'Manage'|@translate}</a></li>
</ul>
<div id="pluginsMenuSeparator"></div>
{if !empty($plugin_menu_items)}
@@ -63,34 +60,34 @@ jQuery(document).ready(function(){ldelim}
{/foreach}
</ul>
{/if}
- </dd>
- </dl>
- <dl>
- <dt class="rdion"><span id="menubarTools">&nbsp;{'Tools'|@translate}&nbsp;</span></dt>
- <dd>
+ </dd>
+ </dl>
+ <dl>
+ <dt class="rdion"><span class="icon-wrench"> </span><span>{'Tools'|@translate}&nbsp;</span></dt>
+ <dd>
<ul>
{if $ENABLE_SYNCHRONIZATION}
- <li><a href="{$U_CAT_UPDATE}">{'Synchronize'|@translate}</a></li>
- <li><a href="{$U_SITE_MANAGER}">{'Site manager'|@translate}</a></li>
+ <li><a class="icon-exchange" href="{$U_CAT_UPDATE}">{'Synchronize'|@translate}</a></li>
+ <li><a class="icon-flow-branch" href="{$U_SITE_MANAGER}">{'Site manager'|@translate}</a></li>
{/if}
- <li><a href="{$U_HISTORY_STAT}">{'History'|@translate}</a></li>
- <li><a href="{$U_MAINTENANCE}">{'Maintenance'|@translate}</a></li>
-{if isset($U_PENDING_COMMENTS)}
- <li><a href="{$U_PENDING_COMMENTS}">{'Pending Comments'|@translate}</a></li>
+ <li><a class="icon-signal" href="{$U_HISTORY_STAT}">{'History'|@translate}</a></li>
+ <li><a class="icon-tools" href="{$U_MAINTENANCE}">{'Maintenance'|@translate}</a></li>
+{if isset($U_COMMENTS)}
+ <li><a class="icon-chat" href="{$U_COMMENTS}">{'Comments'|@translate}{if $NB_PENDING_COMMENTS > 0}<span class="adminMenubarCounter" title="{'%d waiting for validation'|translate:$NB_PENDING_COMMENTS}">{$NB_PENDING_COMMENTS}</span>{/if}</a></li>
{/if}
- <li><a href="{$U_UPDATES}">{'Updates'|@translate}</a></li>
+ <li><a class="icon-arrows-cw" href="{$U_UPDATES}">{'Updates'|@translate}</a></li>
</ul>
- </dd>
- </dl>
- <dl class="last">
- <dt class="rdion"><span id="menubarConfiguration">&nbsp;{'Configuration'|@translate}&nbsp;</span></dt>
- <dd>
+ </dd>
+ </dl>
+ <dl class="last">
+ <dt class="rdion"><span class="icon-cog"> </span><span>{'Configuration'|@translate}&nbsp;</span></dt>
+ <dd>
<ul>
- <li><a href="{$U_CONFIG_GENERAL}">{'Options'|@translate}</a></li>
- <li><a href="{$U_CONFIG_MENUBAR}">{'Menu Management'|@translate}</a></li>
- <li><a href="{$U_CONFIG_EXTENTS}">{'Templates'|@translate}</a></li>
- <li><a href="{$U_CONFIG_LANGUAGES}">{'Languages'|@translate}</a></li>
- <li><a href="{$U_CONFIG_THEMES}">{'Themes'|@translate}</a></li>
+ <li><a class="icon-cog-alt" href="{$U_CONFIG_GENERAL}">{'Options'|@translate}</a></li>
+ <li><a class="icon-menu" href="{$U_CONFIG_MENUBAR}">{'Menu Management'|@translate}</a></li>
+ <li><a class="icon-code" href="{$U_CONFIG_EXTENTS}">{'Templates'|@translate}</a></li>
+ <li><a class="icon-language" href="{$U_CONFIG_LANGUAGES}">{'Languages'|@translate}</a></li>
+ <li><a class="icon-brush" href="{$U_CONFIG_THEMES}">{'Themes'|@translate}</a></li>
</ul>
</dd>
</dl>
@@ -107,7 +104,7 @@ jQuery(document).ready(function(){ldelim}
<li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/help.png" alt="(?)"></a></li>
</ul>
{/if}
-
+
{if isset($errors)}
<div class="errors">
<ul>
diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl
index bb1311097..46e2aa77c 100644
--- a/admin/themes/default/template/batch_manager_global.tpl
+++ b/admin/themes/default/template/batch_manager_global.tpl
@@ -2,6 +2,8 @@
{include file='include/datepicker.inc.tpl'}
{include file='include/colorbox.inc.tpl'}
{include file='include/add_album.inc.tpl'}
+
+{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{combine_script id='jquery.ui.slider' require='jquery.ui' load='footer' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'}
{combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"}
@@ -48,13 +50,14 @@ jQuery(document).ready(function() {
}
return true;
});
- $(this).click(function(event) {console.log(event.shiftKey);$(this).triggerHandler("shclick",event)});
+ $(this).click(function(event) { $(this).triggerHandler("shclick",event)});
});
}
$('ul.thumbnails').enableShiftClick();
});
{/literal}{/footer_script}
+{combine_css path='themes/default/js/plugins/jquery.tokeninput.css'}
{combine_script id='jquery.tokeninput' load='footer' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
{combine_script id='jquery.progressBar' load='footer' path='themes/default/js/plugins/jquery.progressbar.min.js'}
{combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'}
@@ -73,7 +76,7 @@ jQuery(document).ready(function() {ldelim}
newText: ' ({'new'|@translate})',
animateDropdown: false,
preventDuplicates: true,
- allowCreation: true
+ allowFreeTagging: true
}
);
@@ -85,7 +88,7 @@ jQuery(document).ready(function() {ldelim}
searchingText: '{'Searching...'|@translate}',
animateDropdown: false,
preventDuplicates: true,
- allowCreation: false
+ allowFreeTagging: false
}
);
@@ -117,52 +120,6 @@ var height_str = '{'Height'|@translate}';
var max_width_str = '{'Maximum width'|@translate}';
var max_height_str = '{'Maximum height'|@translate}';
{literal}
-function str_repeat(i, m) {
- for (var o = []; m > 0; o[--m] = i);
- return o.join('');
-}
-
-function sprintf() {
- var i = 0, a, f = arguments[i++], o = [], m, p, c, x, s = '';
- while (f) {
- if (m = /^[^\x25]+/.exec(f)) {
- o.push(m[0]);
- }
- else if (m = /^\x25{2}/.exec(f)) {
- o.push('%');
- }
- else if (m = /^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(f)) {
- if (((a = arguments[m[1] || i++]) == null) || (a == undefined)) {
- throw('Too few arguments.');
- }
- if (/[^s]/.test(m[7]) && (typeof(a) != 'number')) {
- throw('Expecting number but found ' + typeof(a));
- }
- switch (m[7]) {
- case 'b': a = a.toString(2); break;
- case 'c': a = String.fromCharCode(a); break;
- case 'd': a = parseInt(a); break;
- case 'e': a = m[6] ? a.toExponential(m[6]) : a.toExponential(); break;
- case 'f': a = m[6] ? parseFloat(a).toFixed(m[6]) : parseFloat(a); break;
- case 'o': a = a.toString(8); break;
- case 's': a = ((a = String(a)) && m[6] ? a.substring(0, m[6]) : a); break;
- case 'u': a = Math.abs(a); break;
- case 'x': a = a.toString(16); break;
- case 'X': a = a.toString(16).toUpperCase(); break;
- }
- a = (/[def]/.test(m[7]) && m[2] && a >= 0 ? '+'+ a : a);
- c = m[3] ? m[3] == '0' ? '0' : m[3].charAt(1) : ' ';
- x = m[5] - String(a).length - s.length;
- p = m[5] ? str_repeat(c, x) : '';
- o.push(s + (m[4] ? a + p : p + a));
- }
- else {
- throw('Huh ?!');
- }
- f = f.substring(m[0].length);
- }
- return o.join('');
-}
function progress(success) {
jQuery('#progressBar').progressBar(derivatives.done, {
@@ -676,15 +633,15 @@ $(document).ready(function() {
{'Dimensions'|@translate}
<blockquote>
- {'Width'|@translate} <span id="filter_dimension_width_info">{'between %d and %d pixels'|@translate|sprintf:$dimensions.selected.min_width:$dimensions.selected.max_width}</span>
+ {'Width'|@translate} <span id="filter_dimension_width_info">{'between %d and %d pixels'|@translate:$dimensions.selected.min_width:$dimensions.selected.max_width}</span>
| <a class="dimensions-choice" data-type="width" data-min="{$dimensions.bounds.min_width}" data-max="{$dimensions.bounds.max_width}">{'Reset'|@translate}</a>
<div id="filter_dimension_width_slider"></div>
- {'Height'|@translate} <span id="filter_dimension_height_info">{'between %d and %d pixels'|@translate|sprintf:$dimensions.selected.min_height:$dimensions.selected.max_height}</span>
+ {'Height'|@translate} <span id="filter_dimension_height_info">{'between %d and %d pixels'|@translate:$dimensions.selected.min_height:$dimensions.selected.max_height}</span>
| <a class="dimensions-choice" data-type="height" data-min="{$dimensions.bounds.min_height}" data-max="{$dimensions.bounds.max_height}">{'Reset'|@translate}</a>
<div id="filter_dimension_height_slider"></div>
- {'Ratio'|@translate} ({'Width'|@translate}/{'Height'|@translate}) <span id="filter_dimension_ratio_info">{'between %.2f and %.2f'|@translate|sprintf:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span>
+ {'Ratio'|@translate} ({'Width'|@translate}/{'Height'|@translate}) <span id="filter_dimension_ratio_info">{'between %.2f and %.2f'|@translate:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span>
{if isset($dimensions.ratio_portrait)}
| <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.ratio_portrait.min}" data-max="{$dimensions.ratio_portrait.max}">{'Portrait'|@translate}</a>
{/if}
@@ -768,8 +725,8 @@ UL.thumbnails SPAN.wrap2 {ldelim}
<span class="wrap2{if $isSelected} thumbSelected{/if}">
<div class="actions"><a href="{$thumbnail.FILE_SRC}" class="preview-box">{'Zoom'|@translate}</a> &middot; <a href="{$thumbnail.U_EDIT}" target="_blank">{'Edit'|@translate}</a></div>
{if $thumbnail.level > 0}
- <em class="levelIndicatorB">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.level))}</em>
- <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.level))}</em>
+ <em class="levelIndicatorB">{'Level %d'|@sprintf:$thumbnail.level|@translate}</em>
+ <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{'Level %d'|@sprintf:$thumbnail.level|@translate}</em>
{/if}
<img src="{$thumbnail.thumb->get_url()}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE|@escape:'html'}" {$thumbnail.thumb->get_size_htm()}>
</span>
@@ -810,7 +767,7 @@ UL.thumbnails SPAN.wrap2 {ldelim}
<select name="selectAction">
<option value="-1">{'Choose an action'|@translate}</option>
<option disabled="disabled">------------------</option>
- <option value="delete">{'Delete selected photos'|@translate}</option>
+ <option value="delete" class="icon-trash">{'Delete selected photos'|@translate}</option>
<option value="associate">{'Associate to album'|@translate}</option>
<option value="move">{'Move to album'|@translate}</option>
{if !empty($dissociate_options)}
@@ -823,7 +780,7 @@ UL.thumbnails SPAN.wrap2 {ldelim}
<option value="author">{'Set author'|@translate}</option>
<option value="title">{'Set title'|@translate}</option>
<option value="date_creation">{'Set creation date'|@translate}</option>
- <option value="level">{'Who can see these photos?'|@translate}</option>
+ <option value="level" class="icon-lock">{'Who can see these photos?'|@translate}</option>
<option value="metadata">{'Synchronize metadata'|@translate}</option>
{if ($IN_CADDIE)}
<option value="remove_from_caddie">{'Remove from caddie'|@translate}</option>
@@ -884,14 +841,14 @@ UL.thumbnails SPAN.wrap2 {ldelim}
<div id="action_author" class="bulkAction">
<label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br>
{assign var='authorDefaultValue' value='Type here the author name'|@translate}
-<input type="text" class="large" name="author" value="{$authorDefaultValue}" onfocus="this.value=(this.value=='{$authorDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$authorDefaultValue}' : this.value;">
+<input type="text" class="large" name="author" value="{$authorDefaultValue}" onfocus="this.value=(this.value=='{$authorDefaultValue|@escape:javascript}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$authorDefaultValue|@escape:javascript}' : this.value;">
</div>
<!-- title -->
<div id="action_title" class="bulkAction">
<label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br>
{assign var='titleDefaultValue' value='Type here the title'|@translate}
-<input type="text" class="large" name="title" value="{$titleDefaultValue}" onfocus="this.value=(this.value=='{$titleDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$titleDefaultValue}' : this.value;">
+<input type="text" class="large" name="title" value="{$titleDefaultValue}" onfocus="this.value=(this.value=='{$titleDefaultValue|@escape:javascript}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$titleDefaultValue|@escape:javascript}' : this.value;">
</div>
<!-- date_creation -->
diff --git a/admin/themes/default/template/batch_manager_unit.tpl b/admin/themes/default/template/batch_manager_unit.tpl
index 7dee4fa51..859a9b6a0 100644
--- a/admin/themes/default/template/batch_manager_unit.tpl
+++ b/admin/themes/default/template/batch_manager_unit.tpl
@@ -2,6 +2,7 @@
{include file='include/datepicker.inc.tpl'}
{include file='include/colorbox.inc.tpl'}
+{combine_css path='themes/default/js/plugins/jquery.tokeninput.css'}
{combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
{footer_script require='jquery.tokeninput'}
jQuery(document).ready(function() {ldelim}
@@ -14,7 +15,7 @@ jQuery(document).ready(function() {ldelim}
newText: ' ({'new'|@translate})',
animateDropdown: false,
preventDuplicates: true,
- allowCreation: true
+ allowFreeTagging: true
}
);
diff --git a/admin/themes/default/template/cat_list.tpl b/admin/themes/default/template/cat_list.tpl
index 859034a77..5fe54b9eb 100644
--- a/admin/themes/default/template/cat_list.tpl
+++ b/admin/themes/default/template/cat_list.tpl
@@ -1,8 +1,6 @@
{footer_script require='jquery.ui.sortable'}{literal}
jQuery(document).ready(function(){
- jQuery(".catPos").hide();
jQuery(".drag_button").show();
- jQuery("#manualOrder").hide();
jQuery(".categoryLi").css("cursor","move");
jQuery(".categoryUl").sortable({
axis: "y",
@@ -12,7 +10,7 @@ jQuery(document).ready(function(){
jQuery("#notManualOrder").hide();
jQuery("#formAutoOrder").hide();
jQuery("#formCreateAlbum").hide();
- },
+ }
});
jQuery("#categoryOrdering").submit(function(){
@@ -62,6 +60,7 @@ jQuery(document).ready(function(){
<p class="showCreateAlbum" id="notManualOrder">
<a href="#" id="addAlbumOpen">{'create a new album'|@translate}</a>
{if count($categories)}| <a href="#" id="autoOrderOpen">{'apply automatic sort order'|@translate}</a>{/if}
+ {if ($PARENT_EDIT)}| <a href="{$PARENT_EDIT}"></span>{'edit'|@translate}</a>{/if}
</p>
<form id="formCreateAlbum" action="{$F_ACTION}" method="post" style="display:none;">
<fieldset>
@@ -104,7 +103,7 @@ jQuery(document).ready(function(){
<form id="categoryOrdering" action="{$F_ACTION}" method="post">
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
- <p id="manualOrder">
+ <p id="manualOrder" style="display:none">
<input class="submit" name="submitManualOrder" type="submit" value="{'Save manual order'|@translate}">
{'... or '|@translate} <a href="#" id="cancelManualOrder">{'cancel manual order'|@translate}</a>
</p>
@@ -115,28 +114,21 @@ jQuery(document).ready(function(){
<li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}" id="cat_{$category.ID}">
<!-- category {$category.ID} -->
<p class="albumTitle">
- <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="button drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}">
+ <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}">
<strong><a href="{$category.U_CHILDREN}" title="{'manage sub-albums'|@translate}">{$category.NAME}</a></strong>
+ <span class="albumInfos"><span class="userSeparator">&middot;</span> {$category.NB_PHOTOS|translate_dec:'%d photo':'%d photos'} <span class="userSeparator">&middot;</span> {$category.NB_SUB_PHOTOS|translate_dec:'%d photo':'%d photos'} {$category.NB_SUB_ALBUMS|translate_dec:'in %d sub-album':'in %d sub-albums'}</span>
</p>
- <p class="catPos">
- <label>
- {'Position'|@translate} :
- <input type="text" size="4" name="catOrd[{$category.ID}]" maxlength="4" value="{$category.RANK}">
- </label>
- </p>
+ <input type="hidden" name="catOrd[{$category.ID}]" value="{$category.RANK}">
<p class="albumActions">
- <a href="{$category.U_EDIT}">{'Edit'|@translate}</a>
- {if isset($category.U_MANAGE_ELEMENTS) }
- | <a href="{$category.U_MANAGE_ELEMENTS}">{'manage album photos'|@translate}</a>
- {/if}
- | <a href="{$category.U_CHILDREN}">{'manage sub-albums'|@translate}</a>
+ <a href="{$category.U_EDIT}"><span class="icon-pencil"></span>{'Edit'|@translate}</a>
+ | <a href="{$category.U_CHILDREN}"><span class="icon-sitemap"></span>{'manage sub-albums'|@translate}</a>
{if isset($category.U_SYNC) }
- | <a href="{$category.U_SYNC}">{'Synchronize'|@translate}</a>
+ | <a href="{$category.U_SYNC}"><span class="icon-exchange"></span>{'Synchronize'|@translate}</a>
{/if}
{if isset($category.U_DELETE) }
- | <a href="{$category.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete album'|@translate}</a>
+ | <a href="{$category.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><span class="icon-trash"></span>{'delete album'|@translate}</a>
{/if}
{if cat_admin_access($category.ID)}
| <a href="{$category.U_JUMPTO}">{'jump to album'|@translate} →</a>
diff --git a/admin/themes/default/template/cat_modify.tpl b/admin/themes/default/template/cat_modify.tpl
index e953ea322..52632ae92 100644
--- a/admin/themes/default/template/cat_modify.tpl
+++ b/admin/themes/default/template/cat_modify.tpl
@@ -29,23 +29,25 @@
<td id="albumLinks">
<p>{$INTRO}</p>
-<ul style="padding-left:15px;">
+<ul>
{if cat_admin_access($CAT_ID)}
- <li><a href="{$U_JUMPTO}">{'jump to album'|@translate} →</a></li>
+ <li><a class="icon-eye" href="{$U_JUMPTO}">{'jump to album'|@translate} →</a></li>
{/if}
{if isset($U_MANAGE_ELEMENTS) }
- <li><a href="{$U_MANAGE_ELEMENTS}">{'manage album photos'|@translate}</a></li>
+ <li><a class="icon-picture" href="{$U_MANAGE_ELEMENTS}">{'manage album photos'|@translate}</a></li>
{/if}
- <li><a href="{$U_CHILDREN}">{'manage sub-albums'|@translate}</a></li>
+ <li style="text-transform:lowercase;"><a class="icon-plus-circled" href="{$U_ADD_PHOTOS_ALBUM}">{'Add Photos'|translate}</a></li>
+
+ <li><a class="icon-sitemap" href="{$U_CHILDREN}">{'manage sub-albums'|@translate}</a></li>
{if isset($U_SYNC) }
- <li><a href="{$U_SYNC}">{'Synchronize'|@translate}</a> ({'Directory'|@translate} = {$CAT_FULL_DIR})</li>
+ <li><a class="icon-exchange" href="{$U_SYNC}">{'Synchronize'|@translate}</a> ({'Directory'|@translate} = {$CAT_FULL_DIR})</li>
{/if}
{if isset($U_DELETE) }
- <li><a href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete album'|@translate}</a></li>
+ <li><a class="icon-trash" href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete album'|@translate}</a></li>
{/if}
</ul>
@@ -83,14 +85,14 @@
<p>
<strong>{'Lock'|@translate}</strong>
<br>
- {html_radios name='visible' values='true,false'|@explode output='No,Yes'|@explode|translate selected=$CAT_VISIBLE}
+ {html_radios name='visible' values=['true','false'] output=['No'|translate,'Yes'|translate] selected=$CAT_VISIBLE}
</p>
{if isset($CAT_COMMENTABLE)}
<p>
<strong>{'Comments'|@translate}</strong>
<br>
- {html_radios name='commentable' values='false,true'|@explode output='No,Yes'|@explode|translate selected=$CAT_COMMENTABLE}
+ {html_radios name='commentable' values=['false','true'] output=['No'|translate,'Yes'|translate] selected=$CAT_COMMENTABLE}
</p>
{/if}
diff --git a/admin/themes/default/template/cat_perm.tpl b/admin/themes/default/template/cat_perm.tpl
index 718c7ba47..0415c87a4 100644
--- a/admin/themes/default/template/cat_perm.tpl
+++ b/admin/themes/default/template/cat_perm.tpl
@@ -76,7 +76,7 @@ jQuery(document).ready(function() {
{if isset($nb_users_granted_indirect)}
<p>
- {'%u users have automatic permission because they belong to a granted group.'|@translate|@sprintf:$nb_users_granted_indirect}
+ {'%u users have automatic permission because they belong to a granted group.'|@translate:$nb_users_granted_indirect}
<a href="#" id="indirectPermissionsDetailsHide" style="display:none">{'hide details'|@translate}</a>
<a href="#" id="indirectPermissionsDetailsShow">{'show details'|@translate}</a>
@@ -150,7 +150,7 @@ jQuery(document).ready(function() {
<p style="margin:12px;text-align:left;">
<input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
- <label id="applytoSubAction" style="display:none;"><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label>
+ <label id="applytoSubAction" style="display:none;"><input type="checkbox" name="apply_on_sub" {if $INHERIT}checked="checked"{/if}>{'Apply to sub-albums'|@translate}</label>
</p>
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
diff --git a/admin/themes/default/template/comments.tpl b/admin/themes/default/template/comments.tpl
index 67a392db7..3b3a40422 100644
--- a/admin/themes/default/template/comments.tpl
+++ b/admin/themes/default/template/comments.tpl
@@ -15,26 +15,26 @@ jQuery(document).ready(function(){
jQuery(".checkComment").click(function(event) {
var checkbox = jQuery(this).children("input[type=checkbox]");
if (event.target.type !== 'checkbox') {
- jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked'));
+ jQuery(checkbox).prop('checked', !jQuery(checkbox).prop('checked'));
}
highlighComments();
});
jQuery("#commentSelectAll").click(function () {
- jQuery(".checkComment input[type=checkbox]").attr('checked', true);
+ jQuery(".checkComment input[type=checkbox]").prop('checked', true);
highlighComments();
return false;
});
jQuery("#commentSelectNone").click(function () {
- jQuery(".checkComment input[type=checkbox]").attr('checked', false);
+ jQuery(".checkComment input[type=checkbox]").prop('checked', false);
highlighComments();
return false;
});
jQuery("#commentSelectInvert").click(function () {
jQuery(".checkComment input[type=checkbox]").each(function() {
- jQuery(this).attr('checked', !$(this).is(':checked'));
+ jQuery(this).prop('checked', !$(this).prop('checked'));
});
highlighComments();
return false;
@@ -43,10 +43,16 @@ jQuery(document).ready(function(){
});
{/literal}{/footer_script}
-<div class="titrePage">
- <h2>{'Pending Comments'|@translate} {$TABSHEET_TITLE}</h2>
+<h2>{'User comments'|@translate} {$TABSHEET_TITLE}</h2>
+
+<div class="commentFilter">
+ <a href="{$F_ACTION}&amp;filter=all" class="{if $filter == 'all'}commentFilterSelected{/if}">{'All'|@translate}</a> ({$nb_total})
+ | <a href="{$F_ACTION}&amp;filter=pending" class="{if $filter == 'pending'}commentFilterSelected{/if}">{'Waiting'|@translate}</a> ({$nb_pending})
+{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
</div>
+
+
{if !empty($comments) }
<form method="post" action="{$F_ACTION}" id="pendingComments">
@@ -59,7 +65,7 @@ jQuery(document).ready(function(){
<td>
<div class="comment">
<a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}"></a>
- <p class="commentHeader"><strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
+ <p class="commentHeader">{if $comment.IS_PENDING}<span class="pendingFlag">{'Waiting'|@translate}</span> - {/if}<strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
<blockquote>{$comment.CONTENT}</blockquote>
</div>
</td>
@@ -75,8 +81,8 @@ jQuery(document).ready(function(){
</p>
<p class="bottomButtons">
- <input class="submit" type="submit" name="validate" value="{'Validate'|@translate}">
- <input class="submit" type="submit" name="reject" value="{'Reject'|@translate}">
+ <input type="submit" name="validate" value="{'Validate'|@translate}">
+ <input type="submit" name="reject" value="{'Reject'|@translate}">
</p>
</form>
diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl
index a2520b0c3..d3309e8a7 100644
--- a/admin/themes/default/template/configuration.tpl
+++ b/admin/themes/default/template/configuration.tpl
@@ -1,13 +1,5 @@
-{footer_script}{literal}
-jQuery(document).ready(function(){
- jQuery("#activate_comments").change(function(){
- if ($(this).is(':checked')) {
- jQuery("#comments_param_warp").show();
- } else {
- jQuery("#comments_param_warp").hide();
- }
- });
-
+{footer_script}
+(function(){
var targets = {
'input[name="rate"]' : '#rate_anonymous',
'input[name="allow_user_registration"]' : '#email_admin_on_new_user',
@@ -22,47 +14,103 @@ jQuery(document).ready(function(){
jQuery(target).toggle(jQuery(selector).is(':checked'));
(function(target){
- jQuery(selector).bind('change', function() {
+ jQuery(selector).on('change', function() {
jQuery(target).toggle($(this).is(':checked'));
});
})(target);
};
-});
-{/literal}{/footer_script}
+}());
+{/footer_script}
<h2>{'Piwigo configuration'|@translate} {$TABSHEET_TITLE}</h2>
{if !isset($default)}
<form method="post" action="{$F_ACTION}" class="properties"{if isset($watermark)} enctype="multipart/form-data"{/if}>
{/if}
+
<div id="configContent">
{if isset($main)}
-<fieldset id="mainConf">
- <legend></legend>
+<fieldset class="mainConf">
+ <legend>{'Basic settings'|translate}</legend>
<ul>
<li>
-
- <label for="gallery_title">{'Gallery title'|@translate}</label>
+ <label for="gallery_title">{'Gallery title'|@translate}</label>
<br>
<input type="text" maxlength="255" size="50" name="gallery_title" id="gallery_title" value="{$main.CONF_GALLERY_TITLE}">
</li>
<li>
-
- <label for="page_banner">{'Page banner'|@translate}</label>
+ <label for="page_banner">{'Page banner'|@translate}</label>
<br>
<textarea rows="5" cols="50" class="description" name="page_banner" id="page_banner">{$main.CONF_PAGE_BANNER}</textarea>
</li>
+
+ <li id="order_filters">
+ <label>{'Default photos order'|@translate}</label>
+
+ {foreach from=$main.order_by item=order}
+ <span class="filter {if isset($ORDER_BY_IS_CUSTOM)}transparent{/if}">
+ <select name="order_by[]" {if isset($ORDER_BY_IS_CUSTOM)}disabled{/if}>
+ {html_options options=$main.order_by_options selected=$order}
+ </select>
+ <a class="removeFilter">{'delete'|@translate}</a>
+ </span>
+ {/foreach}
+ {if !isset($ORDER_BY_IS_CUSTOM)}
+ <a class="addFilter">{'Add a criteria'|@translate}</a>
+ {else}
+ <span class="order_by_is_custom">{'You can\'t define a default photo order because you have a custom setting in your local configuration.'|@translate}</span>
+ {/if}
+ </li>
+ </ul>
+
+{if !isset($ORDER_BY_IS_CUSTOM)}
+{footer_script require='jquery'}
+(function(){
+var max_fields = Math.ceil({$main.order_by_options|@count}/2);
+
+function updateFilters() {
+ var $selects = jQuery('#order_filters select');
+
+ jQuery('#order_filters .addFilter').toggle($selects.length <= max_fields);
+ jQuery('#order_filters .removeFilter').css('display', '').filter(':first').css('display', 'none');
+
+ $selects.find('option').removeAttr('disabled');
+ $selects.each(function() {
+ $selects.not(this).find('option[value="'+ jQuery(this).val() +'"]').attr('disabled', 'disabled');
+ });
+}
+
+jQuery('#order_filters').on('click', '.removeFilter', function() {
+ jQuery(this).parent('span.filter').remove();
+ updateFilters();
+});
+
+jQuery('#order_filters').on('change', 'select', updateFilters);
+
+jQuery('#order_filters .addFilter').click(function() {
+ jQuery(this).prev('span.filter').clone().insertBefore(jQuery(this));
+ jQuery(this).prev('span.filter').children('select').val('');
+ updateFilters();
+});
+
+updateFilters();
+}());
+{/footer_script}
+{/if}
+</fieldset>
+
+<fieldset class="mainConf">
+ <legend>{'Permissions'|translate}</legend>
+ <ul>
<li>
<label>
<input type="checkbox" name="rate" {if ($main.rate)}checked="checked"{/if}>
{'Allow rating'|@translate}
</label>
- </li>
- <li id="rate_anonymous">
- <label>
+ <label id="rate_anonymous" class="no-bold">
<input type="checkbox" name="rate_anonymous" {if ($main.rate_anonymous)}checked="checked"{/if}>
{'Rating by guests'|@translate}
</label>
@@ -73,10 +121,8 @@ jQuery(document).ready(function(){
<input type="checkbox" name="allow_user_registration" {if ($main.allow_user_registration)}checked="checked"{/if}>
{'Allow user registration'|@translate}
</label>
- </li>
- <li id="email_admin_on_new_user">
- <label>
+ <label id="email_admin_on_new_user" class="no-bold">
<input type="checkbox" name="email_admin_on_new_user" {if ($main.email_admin_on_new_user)}checked="checked"{/if}>
{'Email admins when a new user registers'|@translate}
</label>
@@ -95,108 +141,92 @@ jQuery(document).ready(function(){
{'Mail address is obligatory for all users'|@translate}
</label>
</li>
+ </ul>
- <li>
- <label>{'Week starts on'|@translate}
- {html_options name="week_starts_on" options=$main.week_starts_on_options selected=$main.week_starts_on_options_selected}</label>
- </li>
-
- <li>
- <label>{'Default photos order'|@translate}</label>
-
- {foreach from=$main.order_by item=order}
- <span class="filter {if $ORDER_BY_IS_CUSTOM}transparent{/if}">
- <select name="order_by[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}>
- {html_options options=$main.order_by_options selected=$order}
- </select>
- <a class="removeFilter">{'delete'|@translate}</a>
- </span>
- {/foreach}
-
- {if !$ORDER_BY_IS_CUSTOM}
- <a class="addFilter">{'Add a criteria'|@translate}</a>
- {else}
- <span class="order_by_is_custom">{'You can\'t define a default photo order because you have a custom setting in your local configuration.'|@translate}</span>
- {/if}
- </li>
-
-{if !$ORDER_BY_IS_CUSTOM}
{footer_script require='jquery'}
-// counters for displaying of addFilter link
-fields = {$main.order_by|@count}; max_fields = Math.ceil({$main.order_by_options|@count}/2);
-
-{literal}
-function updateAddFilterLink() {
- if (fields >= max_fields) {
- $('.addFilter').css('display', 'none');
+jQuery("#activate_comments").change(function(){
+ if ($(this).is(':checked')) {
+ jQuery("#comments_param_warp").show();
} else {
- $('.addFilter').css('display', '');
+ jQuery("#comments_param_warp").hide();
}
-}
-
-function updateRemoveFilterTrigger() {
- $(".removeFilter").click(function () {
- $(this).parent('span.filter').remove();
- fields--;
- updateAddFilterLink();
- });
-
- $(".removeFilter").css('display', '');
- $(".filter:first .removeFilter").css('display', 'none');
-}
-
-jQuery(document).ready(function () {
- $('.addFilter').click(function() {
- $(this).prev('span.filter').clone().insertBefore($(this));
- $(this).prev('span.filter').children('select[name="order_by[]"]').val('');
-
- fields++;
- updateRemoveFilterTrigger();
- updateAddFilterLink();
- });
-
- updateRemoveFilterTrigger();
- updateAddFilterLink();
});
-{/literal}
{/footer_script}
-{/if}
+</fieldset>
+
+<fieldset class="mainConf">
+ <legend>{'Miscellaneous'|translate}</legend>
+ <ul>
+ <li>
+ <label>{'Week starts on'|@translate}
+ {html_options name="week_starts_on" options=$main.week_starts_on_options selected=$main.week_starts_on_options_selected}</label>
+ </li>
<li>
<strong>{'Save visits in history for'|@translate}</strong>
- <label>
+ <label class="no-bold">
<input type="checkbox" name="history_guest" {if ($main.history_guest)}checked="checked"{/if}>
{'simple visitors'|@translate}
</label>
- <label>
+ <label class="no-bold">
<input type="checkbox" name="log" {if ($main.log)}checked="checked"{/if}>
{'registered users'|@translate}
</label>
- <label>
+ <label class="no-bold">
<input type="checkbox" name="history_admin" {if ($main.history_admin)}checked="checked"{/if}>
{'administrators'|@translate}
</label>
+ </li>
+ <li>
+ <label>{'Mail theme'|@translate}</label>
+
+ <div class="themeBoxes">
+ {foreach from=$main.mail_theme_options item=name key=theme}
+ <div class="themeBox {if $main.mail_theme==$theme}themeDefault{/if}">
+ <label>
+ <div class="themeName">
+ <input type="radio" name="mail_theme" value="{$theme}" {if $main.mail_theme==$theme}checked{/if}>
+ {$name}
+ </div>
+ <div class="themeShot">
+ <img src="{$ROOT_URL}themes/default/template/mail/screenshot-{$theme}.png" width="150"/>
+ </div>
+ </label>
+ <a href="{$ROOT_URL}themes/default/template/mail/screenshot-{$theme}.png">{'Preview'|translate}</a>
+ </div>
+ {/foreach}
+ </div>
</li>
+
+{include file='include/colorbox.inc.tpl'}
+{footer_script require='jquery'}
+jQuery(".themeBoxes a").colorbox();
+
+jQuery("input[name='mail_theme']").change(function() {
+ jQuery("input[name='mail_theme']").parents(".themeBox").removeClass("themeDefault");
+ jQuery(this).parents(".themeBox").addClass("themeDefault");
+});
+{/footer_script}
</ul>
</fieldset>
{/if}
{if isset($comments)}
-<fieldset id="commentsConf">
+<fieldset id="commentsConf" class="no-border">
<legend></legend>
<ul>
<li>
<label>
- <input type="checkbox" name="activate_comments" id="activate_comments"{if ($comments.activate_comments)}checked="checked"{/if}>
+ <input type="checkbox" name="activate_comments" id="activate_comments"{if ($comments.activate_comments)} checked="checked"{/if}>
{'Activate comments'|@translate}
</label>
</li>
</ul>
-
+
<ul id="comments_param_warp"{if not ($comments.activate_comments)} style="display:none;"{/if}>
<li>
<label>
@@ -211,7 +241,7 @@ jQuery(document).ready(function () {
<input type="text" size="3" maxlength="4" name="nb_comment_page" id="nb_comment_page" value="{$comments.NB_COMMENTS_PAGE}">
</label>
</li>
-
+
<li>
<label>
{'Default comments order'|@translate}
@@ -227,14 +257,14 @@ jQuery(document).ready(function () {
{'Validation'|@translate}
</label>
</li>
-
+
<li>
<label>
<input type="checkbox" name="comments_author_mandatory" {if ($comments.comments_author_mandatory)}checked="checked"{/if}>
{'Username is mandatory'|@translate}
</label>
</li>
-
+
<li>
<label>
<input type="checkbox" name="comments_email_mandatory" {if ($comments.comments_email_mandatory)}checked="checked"{/if}>
@@ -248,6 +278,7 @@ jQuery(document).ready(function () {
{'Allow users to edit their own comments'|@translate}
</label>
</li>
+
<li>
<label>
<input type="checkbox" name="user_can_delete_comment" {if ($comments.user_can_delete_comment)}checked="checked"{/if}>
@@ -258,19 +289,19 @@ jQuery(document).ready(function () {
<li id="notifyAdmin">
<strong>{'Notify administrators when a comment is'|@translate}</strong>
- <label id="email_admin_on_comment_validation">
+ <label id="email_admin_on_comment_validation" class="no-bold">
<input type="checkbox" name="email_admin_on_comment_validation" {if ($comments.email_admin_on_comment_validation)}checked="checked"{/if}> {'pending validation'|@translate}
</label>
- <label>
+ <label class="no-bold">
<input type="checkbox" name="email_admin_on_comment" {if ($comments.email_admin_on_comment)}checked="checked"{/if}> {'added'|@translate}
</label>
- <label id="email_admin_on_comment_edition">
+ <label id="email_admin_on_comment_edition" class="no-bold">
<input type="checkbox" name="email_admin_on_comment_edition" {if ($comments.email_admin_on_comment_edition)}checked="checked"{/if}> {'modified'|@translate}
</label>
- <label id="email_admin_on_comment_deletion">
+ <label id="email_admin_on_comment_deletion" class="no-bold">
<input type="checkbox" name="email_admin_on_comment_deletion" {if ($comments.email_admin_on_comment_deletion)}checked="checked"{/if}> {'deleted'|@translate}
</label>
</li>
@@ -281,13 +312,12 @@ jQuery(document).ready(function () {
{if isset($sizes)}
{footer_script}
-var labelMaxWidth = "{'Maximum width'|@translate}";
-var labelWidth = "{'Width'|@translate}";
+(function(){
+ var labelMaxWidth = "{'Maximum width'|@translate}",
+ labelWidth = "{'Width'|@translate}",
+ labelMaxHeight = "{'Maximum height'|@translate}",
+ labelHeight = "{'Height'|@translate}";
-var labelMaxHeight = "{'Maximum height'|@translate}";
-var labelHeight = "{'Height'|@translate}";
-{literal}
-jQuery(document).ready(function(){
function toggleResizeFields(size) {
var checkbox = jQuery("#original_resize");
var needToggle = jQuery("#sizeEdit-original");
@@ -301,7 +331,9 @@ jQuery(document).ready(function(){
}
toggleResizeFields("original");
- jQuery("#original_resize").click(function () {toggleResizeFields("original")});
+ jQuery("#original_resize").click(function () {
+ toggleResizeFields("original");
+ });
jQuery("a[id^='sizeEditOpen-']").click(function(){
var sizeName = jQuery(this).attr("id").split("-")[1];
@@ -329,9 +361,8 @@ jQuery(document).ready(function(){
jQuery(this).css("visibility", "hidden");
return false;
});
-
-});
-{/literal}{/footer_script}
+}());
+{/footer_script}
{html_style}{literal}
.sizeEnable {width:50px;}
@@ -345,7 +376,15 @@ jQuery(document).ready(function(){
<fieldset id="sizesConf">
<legend>{'Original Size'|@translate}</legend>
-
+{if $is_gd}
+ <div>
+ {'Resize after upload disabled due to the use of GD as graphic library'|@translate}
+ <input type="checkbox" name="original_resize" id="original_resize" disabled="disabled" style="visibility: hidden">
+ <input type="hidden" name="original_resize_maxwidth" value="{$sizes.original_resize_maxwidth}">
+ <input type="hidden" name="original_resize_maxheight" value="{$sizes.original_resize_maxheight}">
+ <input type="hidden" name="original_resize_quality" value="{$sizes.original_resize_quality}">
+ </div>
+{else}
<div>
<label for="original_resize">
<input type="checkbox" name="original_resize" id="original_resize" {if ($sizes.original_resize)}checked="checked"{/if}>
@@ -376,105 +415,108 @@ jQuery(document).ready(function(){
</td>
</tr>
</table>
-
+{/if}
</fieldset>
<fieldset id="multiSizesConf">
<legend>{'Multiple Size'|@translate}</legend>
-<div class="showDetails">
- <a href="#" id="showDetails"{if $show_details or isset($ferrors)} style="display:none"{/if}>{'show details'|@translate}</a>
-</div>
+ <div class="showDetails">
+ <a href="#" id="showDetails"{if isset($ferrors)} style="display:none"{/if}>{'show details'|@translate}</a>
+ </div>
-<table style="margin:0">
-{foreach from=$derivatives item=d key=type}
- <tr>
- <td>
- <label>
- <span class="sizeEnable">
- {if $d.must_enable}
- &#x2714;
- {else}
- <input type="checkbox" name="d[{$type}][enabled]" {if $d.enabled}checked="checked"{/if}>
- {/if}
- </span>
- {$type|@translate}
- </label>
- </td>
+ <table style="margin:0">
+ {foreach from=$derivatives item=d key=type}
+ <tr>
+ <td>
+ <label>
+ <span class="sizeEnable">
+ {if $d.must_enable}
+ &#x2714;
+ {else}
+ <input type="checkbox" name="d[{$type}][enabled]" {if $d.enabled}checked="checked"{/if}>
+ {/if}
+ </span>
+ {$type|@translate}
+ </label>
+ </td>
- <td>
- <span class="sizeDetails"{if isset($ferrors)} style="display:inline"{/if}>{$d.w} x {$d.h} {'pixels'|@translate}{if $d.crop}, {'Crop'|@translate|lower}{/if}</span>
- </td>
+ <td>
+ <span class="sizeDetails"{if isset($ferrors)} style="display:inline"{/if}>{$d.w} x {$d.h} {'pixels'|@translate}{if $d.crop}, {'Crop'|@translate|lower}{/if}</span>
+ </td>
- <td>
- <span class="sizeDetails"{if isset($ferrors) and !isset($ferrors.$type)} style="display:inline"{/if}>
- <a href="#" id="sizeEditOpen-{$type}" class="sizeEditOpen">{'edit'|@translate}</a>
- </span>
- </td>
- </tr>
-
- <tr id="sizeEdit-{$type}" class="sizeEdit" {if isset($ferrors.$type)} style="display:block"{/if}>
- <td colspan="3">
- <table class="sizeEditForm">
- {if !$d.must_square}
- <tr>
- <td colspan="2">
- <label>
- <input type="checkbox" class="cropToggle" name="d[{$type}][crop]" {if $d.crop}checked="checked"{/if}>
- {'Crop'|@translate}
- </label>
- </td>
- </tr>
- {/if}
+ <td>
+ <span class="sizeDetails"{if isset($ferrors) and !isset($ferrors.$type)} style="display:inline"{/if}>
+ <a href="#" id="sizeEditOpen-{$type}" class="sizeEditOpen">{'edit'|@translate}</a>
+ </span>
+ </td>
+ </tr>
- <tr>
- <td class="sizeEditWidth">{if $d.must_square or $d.crop}{'Width'|@translate}{else}{'Maximum width'|@translate}{/if}</td>
+ <tr id="sizeEdit-{$type}" class="sizeEdit" {if isset($ferrors.$type)} style="display:block"{/if}>
+ <td colspan="3">
+ <table class="sizeEditForm">
+ {if !$d.must_square}
+ <tr>
+ <td colspan="2">
+ <label>
+ <input type="checkbox" class="cropToggle" name="d[{$type}][crop]" {if $d.crop}checked="checked"{/if}>
+ {'Crop'|@translate}
+ </label>
+ </td>
+ </tr>
+ {/if}
+
+ <tr>
+ <td class="sizeEditWidth">{if $d.must_square or $d.crop}{'Width'|@translate}{else}{'Maximum width'|@translate}{/if}</td>
+ <td>
+ <input type="text" name="d[{$type}][w]" maxlength="4" size="4" value="{$d.w}"{if isset($ferrors.$type.w)} class="dError"{/if}>
+ {'pixels'|@translate}
+ {if isset($ferrors.$type.w)}<span class="dErrorDesc" title="{$ferrors.$type.w}">!</span>{/if}
+ </td>
+ </tr>
+
+ {if !$d.must_square}
+ <tr>
+ <td class="sizeEditHeight">{if $d.crop}{'Height'|@translate}{else}{'Maximum height'|@translate}{/if}</td>
+ <td>
+ <input type="text" name="d[{$type}][h]" maxlength="4" size="4" value="{$d.h}"{if isset($ferrors.$type.h)} class="dError"{/if}>
+ {'pixels'|@translate}
+ {if isset($ferrors.$type.h)}<span class="dErrorDesc" title="{$ferrors.$type.h}">!</span>{/if}
+ </td>
+ </tr>
+ {/if}
+ <tr>
+ <td>{'Sharpen'|@translate}</td>
<td>
- <input type="text" name="d[{$type}][w]" maxlength="4" size="4" value="{$d.w}"{if isset($ferrors.$type.w)} class="dError"{/if}>
- {'pixels'|@translate}
- {if isset($ferrors.$type.w)}<span class="dErrorDesc" title="{$ferrors.$type.w}">!</span>{/if}
+ <input type="text" name="d[{$type}][sharpen]" maxlength="4" size="4" value="{$d.sharpen}"{if isset($ferrors.$type.sharpen)} class="dError"{/if}>
+ %
+ {if isset($ferrors.$type.sharpen)}<span class="dErrorDesc" title="{$ferrors.$type.sharpen}">!</span>{/if}
</td>
- </tr>
+ </tr>
+ </table> {* #sizeEdit *}
+ </td>
+ </tr>
+ {/foreach}
+ </table>
- {if !$d.must_square}
- <tr>
- <td class="sizeEditHeight">{if $d.crop}{'Height'|@translate}{else}{'Maximum height'|@translate}{/if}</td>
- <td>
- <input type="text" name="d[{$type}][h]" maxlength="4" size="4" value="{$d.h}"{if isset($ferrors.$type.h)} class="dError"{/if}>
- {'pixels'|@translate}
- {if isset($ferrors.$type.h)}<span class="dErrorDesc" title="{$ferrors.$type.h}">!</span>{/if}
- </td>
- </tr>
- {/if}
- <tr>
- <td>{'Sharpen'|@translate}</td>
- <td>
- <input type="text" name="d[{$type}][sharpen]" maxlength="4" size="4" value="{$d.sharpen}"{if isset($ferrors.$type.sharpen)} class="dError"{/if}>
- %
- {if isset($ferrors.$type.sharpen)}<span class="dErrorDesc" title="{$ferrors.$type.sharpen}">!</span>{/if}
- </td>
- </tr>
- </table> {* #sizeEdit *}
- </td>
- </tr>
-{/foreach}
-</table>
-
-<p style="margin:10px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
- {'Image Quality'|@translate}
- <input type="text" name="resize_quality" value="{$resize_quality}" size="3" maxlength="3"{if isset($ferrors.resize_quality)} class="dError"{/if}> %
- {if isset($ferrors.resize_quality)}<span class="dErrorDesc" title="{$ferrors.resize_quality}">!</span>{/if}
-</p>
-<p style="margin:10px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
- <a href="{$F_ACTION}&action=restore_settings" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'Reset to default values'|@translate}</a>
-</p>
+ <p style="margin:10px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
+ {'Image Quality'|@translate}
+ <input type="text" name="resize_quality" value="{$resize_quality}" size="3" maxlength="3"{if isset($ferrors.resize_quality)} class="dError"{/if}> %
+ {if isset($ferrors.resize_quality)}<span class="dErrorDesc" title="{$ferrors.resize_quality}">!</span>{/if}
+ </p>
+ <p style="margin:10px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
+ <a href="{$F_ACTION}&action=restore_settings" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'Reset to default values'|@translate}</a>
+ </p>
{if !empty($custom_derivatives)}
-<fieldset class="sizeDetails"><legend>{'custom'|@translate}</legend><table style="margin:0">
-{foreach from=$custom_derivatives item=time key=custom}
-<tr><td><label><input type="checkbox" name="delete_custom_derivative_{$custom}"> {'Delete'|@translate} {$custom} ({'Last hit'|@translate}: {$time})</label></td></tr>
-{/foreach}
-</table></fieldset>
+ <fieldset class="sizeDetails">
+ <legend>{'custom'|@translate}</legend>
+ <table style="margin:0">
+ {foreach from=$custom_derivatives item=time key=custom}
+ <tr><td><label><input type="checkbox" name="delete_custom_derivative_{$custom}"> {'Delete'|@translate} {$custom} ({'Last hit'|@translate}: {$time})</label></td></tr>
+ {/foreach}
+ </table>
+ </fieldset>
{/if}
</fieldset>
@@ -482,13 +524,12 @@ jQuery(document).ready(function(){
{if isset($watermark)}
-{footer_script}{literal}
-jQuery(document).ready(function() {
-
+{footer_script}
+(function(){
function onWatermarkChange() {
var val = jQuery("#wSelect").val();
if (val.length) {
- jQuery("#wImg").attr('src', {/literal}'{$ROOT_URL}'{literal}+val).show();
+ jQuery("#wImg").attr('src', '{$ROOT_URL}'+val).show();
}
else {
jQuery("#wImg").hide();
@@ -516,22 +557,24 @@ jQuery(document).ready(function() {
jQuery("#addWatermark, #selectWatermark").toggle();
return false;
});
-});
-{/literal}{/footer_script}
+}());
+{/footer_script}
-<fieldset id="watermarkConf">
+<fieldset id="watermarkConf" class="no-border">
<legend></legend>
<ul>
<li>
<span id="selectWatermark"{if isset($ferrors.watermarkImage)} style="display:none"{/if}><label>{'Select a file'|@translate}</label>
<select name="w[file]" id="wSelect">
- {html_options options=$watermark_files selected=$watermark.file}
+ {html_options options=$watermark_files selected=$watermark.file}
</select>
{'... or '|@translate}<a href="#" class="addWatermarkOpen">{'add a new watermark'|@translate}</a>
- <br><img id="wImg"></img></span>{* #selectWatermark *}
+ <br>
+ <img id="wImg"></img></span>{* #selectWatermark *}
<span id="addWatermark"{if isset($ferrors.watermarkImage)} style="display:inline"{/if}>
{'add a new watermark'|@translate} {'... or '|@translate}<a href="#" class="addWatermarkOpen">{'Select a file'|@translate}</a>
- <br><input type="file" size="60" id="watermarkImage" name="watermarkImage"{if isset($ferrors.watermarkImage)} class="dError"{/if}> (png)
+ <br>
+ <input type="file" size="60" id="watermarkImage" name="watermarkImage"{if isset($ferrors.watermarkImage)} class="dError"{/if}> (png)
{if isset($ferrors.watermarkImage)}<span class="dErrorDesc" title="{$ferrors.watermarkImage|@htmlspecialchars}">!</span>{/if}
</span>{* #addWatermark *}
</li>
@@ -547,7 +590,7 @@ jQuery(document).ready(function() {
<li>
<label>
{'Apply watermark if height is bigger than'|@translate}
- <input size="4" maxlength="4" type="text" name="w[minh]" value="{$watermark.minh}"{if isset($ferrors.watermark.minh)} class="dError"{/if}>
+ <input size="4" maxlength="4" type="text" name="w[minh]" value="{$watermark.minh}"{if isset($ferrors.watermark.minh)} class="dError"{/if}>
</label>
{'pixels'|@translate}
</li>
@@ -562,10 +605,11 @@ jQuery(document).ready(function() {
<label class="right">{'bottom right corner'|@translate} <input name="w[position]" type="radio" value="bottomright"{if $watermark.position eq 'bottomright'} checked="checked"{/if}></label>
<label><input name="w[position]" type="radio" value="bottomleft"{if $watermark.position eq 'bottomleft'} checked="checked"{/if}> {'bottom left corner'|@translate}</label>
</div>
+
<label style="display:block;margin-top:10px;font-weight:normal;"><input name="w[position]" type="radio" value="custom"{if $watermark.position eq 'custom'} checked="checked"{/if}> {'custom'|@translate}</label>
<div id="positionCustomDetails">
<label>{'X Position'|@translate}
- <input size="3" maxlength="3" type="text" name="w[xpos]" value="{$watermark.xpos}"{if isset($ferrors.watermark.xpos)} class="dError"{/if}>%
+ <input size="3" maxlength="3" type="text" name="w[xpos]" value="{$watermark.xpos}"{if isset($ferrors.watermark.xpos)} class="dError"{/if}>%
{if isset($ferrors.watermark.xpos)}<span class="dErrorDesc" title="{$ferrors.watermark.xpos}">!</span>{/if}
</label>
@@ -600,10 +644,10 @@ jQuery(document).ready(function() {
<li>
<label>
<input type="checkbox" name="menubar_filter_icon" {if ($display.menubar_filter_icon)}checked="checked"{/if}>
- {'display only recently posted photos'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
+ {'Activate icon "%s"'|@translate:('display only recently posted photos'|@translate|@ucfirst)}
</label>
- </li>
-
+ </li>
+
<li>
<label>
<input type="checkbox" name="index_new_icon" {if ($display.index_new_icon)}checked="checked"{/if}>
@@ -614,38 +658,38 @@ jQuery(document).ready(function() {
<li>
<label>
<input type="checkbox" name="index_sort_order_input" {if ($display.index_sort_order_input)}checked="checked"{/if}>
- {'Sort order'|@translate|@string_format:$pwg->l10n('Activate icon "%s"')}
+ {'Activate icon "%s"'|@translate:('Sort order'|@translate)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="index_flat_icon" {if ($display.index_flat_icon)}checked="checked"{/if}>
- {'display all photos in all sub-albums'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
+ {'Activate icon "%s"'|@translate:('display all photos in all sub-albums'|@translate|@ucfirst)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="index_posted_date_icon" {if ($display.index_posted_date_icon)}checked="checked"{/if}>
- {'display a calendar by posted date'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
+ {'Activate icon "%s"'|@translate:('display a calendar by posted date'|@translate|@ucfirst)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="index_created_date_icon" {if ($display.index_created_date_icon)}checked="checked"{/if}>
- {'display a calendar by creation date'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
+ {'Activate icon "%s"'|@translate:('display a calendar by creation date'|@translate|@ucfirst)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="index_slideshow_icon" {if ($display.index_slideshow_icon)}checked="checked"{/if}>
- {'slideshow'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
+ {'Activate icon "%s"'|@translate:('slideshow'|@translate|@ucfirst)}
</label>
</li>
-
+
<li>
<label>
{'Number of albums per page'|@translate}
@@ -661,28 +705,28 @@ jQuery(document).ready(function() {
<li>
<label>
<input type="checkbox" name="picture_slideshow_icon" {if ($display.picture_slideshow_icon)}checked="checked"{/if}>
- {'slideshow'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
+ {'Activate icon "%s"'|@translate:('slideshow'|@translate|@ucfirst)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="picture_metadata_icon" {if ($display.picture_metadata_icon)}checked="checked"{/if}>
- {'Show file metadata'|@translate|@string_format:$pwg->l10n('Activate icon "%s"')}
+ {'Activate icon "%s"'|@translate:('Show file metadata'|@translate)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="picture_download_icon" {if ($display.picture_download_icon)}checked="checked"{/if}>
- {'Download this file'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
+ {'Activate icon "%s"'|@translate:('Download this file'|@translate|@ucfirst)}
</label>
</li>
<li>
<label>
<input type="checkbox" name="picture_favorite_icon" {if ($display.picture_favorite_icon)}checked="checked"{/if}>
- {'add this photo to your favorites'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
+ {'Activate icon "%s"'|@translate:('add this photo to your favorites'|@translate|@ucfirst)}
</label>
</li>
@@ -699,7 +743,7 @@ jQuery(document).ready(function() {
{'Activate Navigation Thumbnails'|@translate}
</label>
</li>
-
+
<li>
<label>
<input type="checkbox" name="picture_menu" {if ($display.picture_menu)}checked="checked"{/if}>
@@ -792,6 +836,8 @@ jQuery(document).ready(function() {
</fieldset>
{/if}
+</div> <!-- configContent -->
+
{if !isset($default)}
<p class="formButtons">
<input type="submit" name="submit" value="{'Save Settings'|@translate}">
@@ -799,8 +845,8 @@ jQuery(document).ready(function() {
</form>
{/if}
-</div> <!-- configContent -->
-
{if isset($default)}
+<div id="configContent">
{$PROFILE_CONTENT}
+</div>
{/if}
diff --git a/admin/themes/default/template/element_set_ranks.tpl b/admin/themes/default/template/element_set_ranks.tpl
index be5019e24..dfdafdc2e 100644
--- a/admin/themes/default/template/element_set_ranks.tpl
+++ b/admin/themes/default/template/element_set_ranks.tpl
@@ -17,7 +17,7 @@ jQuery(document).ready(function() {
});
});
- jQuery('#image_order_rank').attr('checked', true);
+ jQuery('#image_order_rank').prop('checked', true);
checkOrderOptions();
}
});
@@ -43,7 +43,7 @@ jQuery('.thumbnail').tipTip({
<form action="{$F_ACTION}" method="post">
{if !empty($thumbnails)}
- <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"></p>
+ <p><input type="submit" value="{'Submit'|@translate}" name="submit"></p>
<fieldset>
<legend>{'Manual order'|@translate}</legend>
{if !empty($thumbnails)}
@@ -84,7 +84,7 @@ jQuery('.thumbnail').tipTip({
</div>
</fieldset>
<p>
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit">
+ <input type="submit" value="{'Submit'|@translate}" name="submit">
<label>
<input type="checkbox" name="image_order_subcats" id="image_order_subcats">
diff --git a/admin/themes/default/template/extend_for_templates.tpl b/admin/themes/default/template/extend_for_templates.tpl
index 07998128a..818096ba4 100644
--- a/admin/themes/default/template/extend_for_templates.tpl
+++ b/admin/themes/default/template/extend_for_templates.tpl
@@ -17,19 +17,19 @@
{$tpl.replacer}
</td>
<td>
- {html_options name=original[] output=$tpl.original_tpl values=$tpl.original_tpl selected=$tpl.selected_tpl}
+ {html_options name='original[]' output=$tpl.original_tpl values=$tpl.original_tpl selected=$tpl.selected_tpl}
</td>
<td>
- {html_options name=url[] output=$tpl.url_parameter values=$tpl.url_parameter selected=$tpl.selected_url}
+ {html_options name='url[]' output=$tpl.url_parameter values=$tpl.url_parameter selected=$tpl.selected_url}
</td>
<td>
- {html_options name=bound[] output=$tpl.bound_tpl values=$tpl.bound_tpl selected=$tpl.selected_bound}
+ {html_options name='bound[]' output=$tpl.bound_tpl values=$tpl.bound_tpl selected=$tpl.selected_bound}
</td>
</tr>
{/foreach}
</table>
<p>
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit">
+ <input type="submit" value="{'Submit'|@translate}" name="submit">
</p>
</form>
{/if}
diff --git a/admin/themes/default/template/group_list.tpl b/admin/themes/default/template/group_list.tpl
index c11b6369a..0d2d727d1 100644
--- a/admin/themes/default/template/group_list.tpl
+++ b/admin/themes/default/template/group_list.tpl
@@ -1,7 +1,21 @@
{footer_script}
{literal}
$(document).ready(function() {
+ /**
+ * Add group
+ */
+ jQuery("#addGroup").click(function() {
+ jQuery("#addGroupForm").toggle();
+ jQuery("input[name=groupname]").focus();
+ return false;
+ });
+
+ jQuery("#addGroupClose").click(function() {
+ jQuery("#addGroupForm").hide();
+ return false;
+ });
+ $('.groups input').change(function () { $(this).parent('p').toggleClass('group_select'); });
$(".grp_action").hide();
$("input.group_selection").click(function() {
@@ -16,10 +30,10 @@ $(document).ready(function() {
$("#permitAction").show();
$("#forbidAction").hide();
}
- $("p[group_id="+$(this).attr("value")+"]").each(function () {
+ $("p[group_id="+$(this).prop("value")+"]").each(function () {
$(this).toggle();
});
-
+
if (nbSelected<2) {
$("#two_to_select").show();
$("#two_atleast").hide();
@@ -32,8 +46,8 @@ $(document).ready(function() {
$("[id^=action_]").hide();
$("select[name=selectAction]").change(function () {
$("[id^=action_]").hide();
- $("#action_"+$(this).attr("value")).show();
- if ($(this).val() != -1) {
+ $("#action_"+$(this).prop("value")).show();
+ if ($(this).val() != -1 ) {
$("#applyActionBlock").show();
}
else {
@@ -51,38 +65,44 @@ $(document).ready(function() {
<h2>{'Group management'|@translate}</h2>
</div>
-<form method="post" name="add_user" action="{$F_ADD_ACTION}" class="properties">
+<p class="showCreateAlbum" id="showAddGroup">
+ <a class="icon-plus-circled" href="#" id="addGroup">{'Add group'|translate}</a>
+</p>
+
+<form method="post" style="display:none" id="addGroupForm" name="add_user" action="{$F_ADD_ACTION}" class="properties">
<fieldset>
<legend>{'Add group'|@translate}</legend>
- <span class="property">
- <label for="groupname">{'Group name'|@translate}</label>
- </span>
- <input type="text" id="groupname" name="groupname" maxlength="50" size="20">
- <input type="submit" name="submit_add" value="{'Add'|@translate}">
- <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
+
+ <p>
+ <strong>{'Group name'|translate}</strong><br>
+ <input type="text" name="groupname" maxlength="50" size="20">
+ </p>
+
+ <p class="actionButtons">
+ <input class="submit" name="submit_add" type="submit" value="{'Add'|translate}">
+ <a href="#" id="addGroupClose">{'Cancel'|@translate}</a>
+ </p>
+
+ <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
</fieldset>
</form>
+
<form method="post" name="add_user" action="{$F_ADD_ACTION}" class="properties">
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
-
- <table class="table2">
- <tr class="throw">
- <th></th>
- <th>{'Group name'|@translate}</th>
- <th>{'Members'|@translate}</th>
- </tr>
+
+ <ul class="groups">
{if not empty($groups)}
{foreach from=$groups item=group name=group_loop}
- <tr class="{if $smarty.foreach.group_loop.index is odd}row1{else}row2{/if}">
- <td><input class="group_selection" name="group_selection[]" type="checkbox" value="{$group.ID}"></td>
- <td>{$group.NAME}<i><small>{$group.IS_DEFAULT}</small></i></td>
- <td>{if $group.MEMBERS>0}<a href="{$group.U_MEMBERS}" title="{'Manage the members'|@translate}">{$group.MEMBERS}</a><br>{$group.L_MEMBERS}{else}{$group.MEMBERS}{/if}</td>
- </tr>
+ <li>
+ <label><p>{$group.NAME}<i><small>{$group.IS_DEFAULT}</small></i><input class="group_selection" name="group_selection[]" type="checkbox" value="{$group.ID}"></p></label>
+ <p class="list_user">{if $group.MEMBERS>0}{$group.MEMBERS}<br>{$group.L_MEMBERS}{else}{$group.MEMBERS}{/if}</p>
+ <a class="icon-lock group_perm" href="{$group.U_PERM}" title="{'Permissions'|@translate}">{'Permissions'|translate}</a>
+ </li>
{/foreach}
{/if}
- </table>
-
+ </ul>
+
<fieldset id="action">
<legend>{'Action'|@translate}</legend>
<div id="forbidAction">{'No group selected, no action possible.'|@translate}</div>
@@ -95,8 +115,6 @@ $(document).ready(function() {
<option value="delete">{'Delete'|@translate}</option>
<option value="merge">{'Merge selected groups'|@translate}</option>
<option value="duplicate">{'Duplicate'|@translate}</option>
- <option value="manage_members">{'Manage the members'|@translate}</option>
- <option value="manage_pemissions">{'Manage Permissions'|@translate}</option>
<option value="toggle_default">{'Toggle \'default group\' property'|@translate}</option>
{if !empty($element_set_groupe_plugins_actions)}
{foreach from=$element_set_groupe_plugins_actions item=action}
@@ -142,28 +160,6 @@ $(document).ready(function() {
{/if}
</div>
- <!-- manage_members -->
- <div id="action_manage_members" class="bulkAction">
- {if not empty($groups)}
- {foreach from=$groups item=group}
- <p group_id="{$group.ID}" class="grp_action">
- {$group.NAME} > {if $group.NB_MEMBERS!=0}<a href="{$group.U_MEMBERS}" title="{'Manage the members'|@translate}">{'Manage the members'|@translate}</a>{else}{'No members to manage'|@translate}{/if}
- </p>
- {/foreach}
- {/if}
- </div>
-
- <!-- manage_pemissions -->
- <div id="action_manage_pemissions" class="bulkAction">
- {if not empty($groups)}
- {foreach from=$groups item=group}
- <p group_id="{$group.ID}" class="grp_action">
- {$group.NAME} > <a href="{$group.U_PERM}" title="{'Permissions'|@translate}">{'Manage Permissions'|@translate}</a>
- </p>
- {/foreach}
- {/if}
- </div>
-
<!-- toggle_default -->
<div id="action_toggle_default" class="bulkAction">
{if not empty($groups)}
@@ -174,8 +170,8 @@ $(document).ready(function() {
{/foreach}
{/if}
</div>
-
-
+
+
<!-- plugins -->
{if !empty($element_set_groupe_plugins_actions)}
{foreach from=$element_set_groupe_plugins_actions item=action}
@@ -184,7 +180,7 @@ $(document).ready(function() {
</div>
{/foreach}
{/if}
-
+
<p id="applyActionBlock" style="display:none" class="actionButtons">
<input id="applyAction" class="submit" type="submit" value="{'Apply action'|@translate}" name="submit"> <span id="applyOnDetails"></span></p>
</div> <!-- #permitAction -->
diff --git a/admin/themes/default/template/header.tpl b/admin/themes/default/template/header.tpl
index f8fff5750..c95b759ad 100644
--- a/admin/themes/default/template/header.tpl
+++ b/admin/themes/default/template/header.tpl
@@ -19,6 +19,7 @@
{/if}
{if !empty($theme.local_head)}{include file=$theme.local_head load_css=$theme.load_css}{/if}
{/foreach}
+{combine_css path="admin/themes/default/fontello/css/fontello.css"}
<!-- BEGIN get_combined_scripts -->
{get_combined_scripts load='header'}
@@ -53,17 +54,17 @@
<div id="pwgHead">
<h1>
<a href="{$U_RETURN}" title="{'Visit Gallery'|@translate}">
- <img src="{$ROOT_URL}admin/themes/{$theme.id}/icon/home.png" alt="{'Home'|@translate}">
- {$GALLERY_TITLE}
+ <span class="icon-home" style="font-size:larger"></span>
+ {$GALLERY_TITLE}
</a>
</h1>
<div id="headActions">
- {'Hello'|@translate} {$USERNAME} :
- <a href="{$U_RETURN}">{'Visit Gallery'|@translate}</a> |
- <a href="{$U_CHANGE_THEME}" title="{'Switch to clear or dark colors for administration'|@translate}">{'Change Admin Colors'|@translate}</a> |
- <a href="{$U_FAQ}" title="{'Instructions to use Piwigo'|@translate}">{'Help Me'|@translate}</a> |
- <a href="{$U_LOGOUT}">{'Logout'|@translate}</a>
+ {'Hello'|@translate} {$USERNAME} |
+ <a class="icon-eye" href="{$U_RETURN}">{'Visit Gallery'|@translate}</a> |
+ <a class="icon-brush" href="{$U_CHANGE_THEME}" title="{'Switch to clear or dark colors for administration'|@translate}">{'Change Admin Colors'|@translate}</a> |
+ <a class="icon-help-circled" href="{$U_FAQ}" title="{'Instructions to use Piwigo'|@translate}">{'Help Me'|@translate}</a> |
+ <a class="icon-logout" href="{$U_LOGOUT}">{'Logout'|@translate}</a>
</div>
</div>
diff --git a/admin/themes/default/template/history.tpl b/admin/themes/default/template/history.tpl
index 4cc5e93c6..3fe4e738d 100644
--- a/admin/themes/default/template/history.tpl
+++ b/admin/themes/default/template/history.tpl
@@ -6,9 +6,7 @@
pwg_initialization_datepicker("#end_day", "#end_month", "#end_year", "#end_linked_date", null, "#start_linked_date", null);
{/literal}{/footer_script}
-<div class="titrePage">
- <h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
-</div>
+<h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
<form class="filter" method="post" name="filter" action="{$F_ACTION}">
<fieldset>
@@ -83,7 +81,7 @@
</select>
</label>
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
+ <input type="submit" name="submit" value="{'Submit'|@translate}">
</fieldset>
</form>
@@ -107,6 +105,7 @@
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
<table class="table2" id="detailedStats">
+<thead>
<tr class="throw">
<th>{'Date'|@translate}</th>
<th>{'Time'|@translate}</th>
@@ -115,24 +114,69 @@
<th>{'Element'|@translate}</th>
<th>{'Element type'|@translate}</th>
<th>{'Section'|@translate}</th>
- <th>{'Album'|@translate}</th>
- <th>{'Tags'|@translate}</th>
+ <th>{'Album'|@translate} / {'Tags'|@translate}</th>
</tr>
-{if !empty($search_results) }
+</thead>
+{if !empty($search_results)}
{foreach from=$search_results item=detail name=res_loop}
<tr class="{if $smarty.foreach.res_loop.index is odd}row1{else}row2{/if}">
<td class="hour">{$detail.DATE}</td>
<td class="hour">{$detail.TIME}</td>
<td>{$detail.USER}</td>
- <td>{$detail.IP}</td>
+ <td class="IP">{$detail.IP}</td>
<td>{$detail.IMAGE}</td>
<td>{$detail.TYPE}</td>
<td>{$detail.SECTION}</td>
- <td>{$detail.CATEGORY}</td>
- <td>{$detail.TAGS}</td>
+ <td>{$detail.CATEGORY}{$detail.TAGS}</td>
</tr>
{/foreach}
{/if}
</table>
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
+
+{combine_script id='jquery.geoip' load='async' path='admin/themes/default/js/jquery.geoip.js'}
+
+{footer_script}{literal}
+jQuery(document).ready( function() {
+ jQuery(".IP").one( "mouseenter", function(){
+ var that = $(this);
+ that
+ .data("isOver", true)
+ .one("mouseleave", function() {
+ that.removeData("isOver");
+ });
+ GeoIp.get( that.text(), function(data) {
+ if (!data.fullName) return;
+
+ var content = data.fullName;
+ if (data.latitude && data.region_name) {
+ content += '<br><a class="ipGeoOpen" data-lat="'+data.latitude+'" data-lon="'+data.longitude+'"';
+ content += ' href="#">show on a Google Map</a>';
+ }
+
+ that.tipTip( {
+ content: content,
+ keepAlive: true,
+ defaultPosition: "right",
+ maxWidth: 320,
+ } );
+ if (that.data("isOver"))
+ that.trigger("mouseenter");
+ });
+ } );
+
+ jQuery(document).on('click', '.ipGeoOpen', function() {
+ var lat = jQuery(this).data("lat");
+ var lon = jQuery(this).data("lon");
+ var parent = jQuery(this).parent();
+ jQuery(this).remove();
+
+ var append = '<br><img width=300 height=220 src="http://maps.googleapis.com/maps/api/staticmap';
+ append += '?sensor=false&size=300x220&zoom=6&markers=size:tiny%7C' + lat + ',' + lon + '">';
+
+ jQuery(parent).append(append);
+ return false;
+ });
+});
+{/literal}{/footer_script} \ No newline at end of file
diff --git a/admin/themes/default/template/include/add_album.inc.tpl b/admin/themes/default/template/include/add_album.inc.tpl
index 1fe8cea21..08ada07a4 100644
--- a/admin/themes/default/template/include/add_album.inc.tpl
+++ b/admin/themes/default/template/include/add_album.inc.tpl
@@ -1,81 +1,70 @@
{footer_script}{literal}
jQuery(document).ready(function(){
- function fillCategoryListbox(selectId, selectedValue) {
- jQuery.getJSON(
- "ws.php?format=json&method=pwg.categories.getList",
- {
- recursive: true,
- fullname: true,
- format: "json",
- },
- function(data) {
- jQuery.each(
- data.result.categories,
- function(i,category) {
- var selected = null;
- if (category.id == selectedValue) {
- selected = "selected";
- }
-
- jQuery("<option/>")
- .attr("value", category.id)
- .attr("selected", selected)
- .text(category.name)
- .appendTo("#"+selectId)
- ;
- }
- );
- }
- );
- }
-
jQuery(".addAlbumOpen").colorbox({
- inline:true,
- href:"#addAlbumForm",
- onComplete:function(){
+ inline: true,
+ href: "#addAlbumForm",
+ onComplete: function() {
+ var $albumSelect = jQuery("#albumSelect");
+
jQuery("input[name=category_name]").focus();
+
+ jQuery("#category_parent").html('<option value="0">------------</option>')
+ .append($albumSelect.html())
+ .val($albumSelect.val() || 0);
}
});
- jQuery("#addAlbumForm form").submit(function(){
+ jQuery("#addAlbumForm form").submit(function() {
jQuery("#categoryNameError").text("");
+
+ var parent_id = jQuery("select[name=category_parent] option:selected").val(),
+ name = jQuery("input[name=category_name]").val();
jQuery.ajax({
- url: "ws.php?format=json&method=pwg.categories.add",
+ url: "ws.php",
+ dataType: 'json',
data: {
- parent: jQuery("select[name=category_parent] option:selected").val(),
- name: jQuery("input[name=category_name]").val(),
+ format: 'json',
+ method: 'pwg.categories.add',
+ parent: parent_id,
+ name: name
},
beforeSend: function() {
jQuery("#albumCreationLoading").show();
},
- success:function(html) {
+ success: function(data) {
jQuery("#albumCreationLoading").hide();
-
- var newAlbum = jQuery.parseJSON(html).result.id;
jQuery(".addAlbumOpen").colorbox.close();
- jQuery("#albumSelect").find("option").remove();
- fillCategoryListbox("albumSelect", newAlbum);
-
- /* we refresh the album creation form, in case the user wants to create another album */
- jQuery("#category_parent").find("option").remove();
-
- jQuery("<option/>")
- .attr("value", 0)
- .text("------------")
- .appendTo("#category_parent")
- ;
+ var newAlbum = data.result.id,
+ newAlbum_name = '';
+
+ if (parent_id!=0) {
+ newAlbum_name = jQuery("#category_parent").find("option[value="+ parent_id +"]").text() +' / ';
+ }
+ newAlbum_name+= name;
+
+ var new_option = jQuery("<option/>")
+ .attr("value", newAlbum)
+ .attr("selected", "selected")
+ .text(newAlbum_name);
- fillCategoryListbox("category_parent", newAlbum);
+ var $albumSelect = jQuery("#albumSelect");
+ $albumSelect.find("option").removeAttr('selected');
+
+ if (parent_id==0) {
+ $albumSelect.prepend(new_option);
+ }
+ else {
+ $albumSelect.find("option[value="+ parent_id +"]").after(new_option);
+ }
jQuery("#addAlbumForm form input[name=category_name]").val('');
-
jQuery("#albumSelection").show();
return true;
},
- error:function(XMLHttpRequest, textStatus, errorThrows) {
+ error: function(XMLHttpRequest, textStatus, errorThrows) {
jQuery("#albumCreationLoading").hide();
jQuery("#categoryNameError").text(errorThrows).css("color", "red");
}
@@ -90,13 +79,16 @@ jQuery(document).ready(function(){
<div id="addAlbumForm" style="text-align:left;padding:1em;">
<form>
{'Parent album'|@translate}<br>
- <select id ="category_parent" name="category_parent">
- <option value="0">------------</option>
- {html_options options=$category_parent_options selected=$category_parent_options_selected}
+ <select id="category_parent" name="category_parent">
</select>
-
- <br><br>{'Album name'|@translate}<br><input name="category_name" type="text" maxlength="255"> <span id="categoryNameError"></span>
- <br><br><br><input type="submit" value="{'Create'|@translate}"> <span id="albumCreationLoading" style="display:none"><img src="themes/default/images/ajax-loader-small.gif"></span>
+ <br><br>
+
+ {'Album name'|@translate}<br>
+ <input name="category_name" type="text" maxlength="255"> <span id="categoryNameError"></span>
+ <br><br><br>
+
+ <input type="submit" value="{'Create'|@translate}">
+ <span id="albumCreationLoading" style="display:none"><img src="themes/default/images/ajax-loader-small.gif"></span>
</form>
</div>
</div>
diff --git a/admin/themes/default/template/install.tpl b/admin/themes/default/template/install.tpl
index 58928fb45..6af851c8a 100644
--- a/admin/themes/default/template/install.tpl
+++ b/admin/themes/default/template/install.tpl
@@ -1,5 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-"http://www.w3.org/TR/html4/strict.dtd">
+<!DOCTYPE html>
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$T_CONTENT_ENCODING}">
@@ -25,7 +24,6 @@
{combine_script id='jquery' path='themes/default/js/jquery.min.js'}
{literal}
<script type="text/javascript">
-$(function() {
$(document).ready(function() {
$("a.externalLink").click(function() {
window.open($(this).attr("href"));
@@ -36,7 +34,6 @@ $(document).ready(function() {
$(".adminEmail").text($(this).val());
});
});
-
</script>
<style type="text/css">
@@ -44,13 +41,13 @@ body {
font-size:12px;
}
-.content {
- width: 800px;
- margin: auto;
- text-align: center;
- padding:0;
- background-color:transparent !important;
- border:none;
+#content {
+ width: 800px;
+ margin: auto;
+ text-align: center;
+ padding:0;
+ background-color:transparent !important;
+ border:none;
}
#theHeader {
@@ -226,7 +223,7 @@ jQuery().ready(function(){ldelim}
<tr>
<td style="width: 30%;" class="fieldname">{'Host'|@translate}</td>
<td><input type="text" name="dbhost" value="{$F_DB_HOST}"></td>
- <td class="fielddesc">{'localhost, sql.multimania.com, toto.freesurf.fr'|@translate}</td>
+ <td class="fielddesc">{'localhost or other, supplied by your host provider'|@translate}</td>
</tr>
<tr>
<td class="fieldname">{'User'|@translate}</td>
@@ -256,12 +253,12 @@ jQuery().ready(function(){ldelim}
<table class="table2">
<tr>
- <td style="width: 30%;" class="fieldname">{'Webmaster login'|@translate}</td>
+ <td style="width: 30%;" class="fieldname">{'Username'|@translate}</td>
<td><input type="text" name="admin_name" value="{$F_ADMIN}"></td>
<td class="fielddesc">{'It will be shown to the visitors. It is necessary for website administration'|@translate}</td>
</tr>
<tr>
- <td class="fieldname">{'Webmaster password'|@translate}</td>
+ <td class="fieldname">{'Password'|@translate}</td>
<td><input type="password" name="admin_pass1" value=""></td>
<td class="fielddesc">{'Keep it confidential, it enables you to access administration panel'|@translate}</td>
</tr>
@@ -271,7 +268,7 @@ jQuery().ready(function(){ldelim}
<td class="fielddesc">{'verification'|@translate}</td>
</tr>
<tr>
- <td class="fieldname">{'Webmaster mail address'|@translate}</td>
+ <td class="fieldname">{'Email address'|@translate}</td>
<td><input type="text" name="admin_mail" id="admin_mail" value="{$F_ADMIN_EMAIL}"></td>
<td class="fielddesc">{'Visitors will be able to contact site administrator with this mail'|@translate}</td>
</tr>
@@ -280,7 +277,7 @@ jQuery().ready(function(){ldelim}
<td colspan="2">
<label>
<input type="checkbox" name="newsletter_subscribe"{if $F_NEWSLETTER_SUBSCRIBE} checked="checked"{/if}>
- <span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</span>
+ <span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate:$EMAIL}</span>
</label>
<br>
<label>
diff --git a/admin/themes/default/template/intro.tpl b/admin/themes/default/template/intro.tpl
index fc460c115..a3c56c214 100644
--- a/admin/themes/default/template/intro.tpl
+++ b/admin/themes/default/template/intro.tpl
@@ -29,7 +29,7 @@ jQuery().ready(function(){
if (ext_update)
jQuery(".warnings ul").append('<li>'+ext_need_update_msg+'</li>');
}
- });
+ });
});
{/literal}
{/footer_script}
@@ -42,7 +42,7 @@ jQuery().ready(function(){
<li><a href="{$PHPWG_URL}" class="externalLink">Piwigo</a> {$PWG_VERSION}</li>
<li><a href="{$U_CHECK_UPGRADE}">{'Check for upgrade'|@translate}</a></li>
{if isset($SUBSCRIBE_BASE_URL)}
- <li><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" class="externalLink cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</a></li>
+ <li><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" class="externalLink cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate:$EMAIL}</a></li>
{/if}
</ul>
</dd>
@@ -74,10 +74,7 @@ jQuery().ready(function(){
<li>{$DB_GROUPS}</li>
{if isset($DB_COMMENTS)}
<li>
- {$DB_COMMENTS}
- {if isset($unvalidated)}
- (<a href="{$unvalidated.URL}">{$unvalidated.INFO}</a>)
- {/if}
+ {$DB_COMMENTS}{if $NB_PENDING_COMMENTS > 0} (<a href="{$U_COMMENTS}">{'%d waiting for validation'|translate:$NB_PENDING_COMMENTS}</a>){/if}
</li>
{/if}
<li>{$DB_RATES}</li>
diff --git a/admin/themes/default/template/menubar.tpl b/admin/themes/default/template/menubar.tpl
index 4d65c0858..f3bd1f45b 100644
--- a/admin/themes/default/template/menubar.tpl
+++ b/admin/themes/default/template/menubar.tpl
@@ -38,7 +38,7 @@ jQuery(document).ready(function(){
<strong>{'Hide'|@translate} <input type="checkbox" name="hide_{$block.reg->get_id()}" {if $block.pos<0}checked="checked"{/if}></strong>
</span>
- <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="button drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}">
+ <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}">
<strong>{$block.reg->get_name()|@translate}</strong> ({$block.reg->get_id()})
</p>
diff --git a/admin/themes/default/template/notification_by_mail.tpl b/admin/themes/default/template/notification_by_mail.tpl
index 69acaaca5..0be49bdd1 100644
--- a/admin/themes/default/template/notification_by_mail.tpl
+++ b/admin/themes/default/template/notification_by_mail.tpl
@@ -4,12 +4,12 @@
jQuery(document).ready(function(){
jQuery("#checkAllLink").click(function () {
- jQuery("#notification_by_mail input[type=checkbox]").attr('checked', true);
+ jQuery("#notification_by_mail input[type=checkbox]").prop('checked', true);
return false;
});
jQuery("#uncheckAllLink").click(function () {
- jQuery("#notification_by_mail input[type=checkbox]").attr('checked', false);
+ jQuery("#notification_by_mail input[type=checkbox]").prop('checked', false);
return false;
});
@@ -24,7 +24,7 @@ jQuery(document).ready(function(){
{if isset($REPOST_SUBMIT_NAME)}
<fieldset>
<div class="infos">
- <input class="submit" type="submit" value="{'Continue processing treatment'|@translate}" name="{$REPOST_SUBMIT_NAME}">
+ <input type="submit" value="{'Continue processing treatment'|@translate}" name="{$REPOST_SUBMIT_NAME}">
</div>
</fieldset>
{/if}
@@ -72,8 +72,8 @@ jQuery(document).ready(function(){
</fieldset>
<p>
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="param_submit">
- <input class="submit" type="reset" value="{'Reset'|@translate}" name="param_reset">
+ <input type="submit" value="{'Submit'|@translate}" name="param_submit">
+ <input type="reset" value="{'Reset'|@translate}" name="param_reset">
</p>
{/if}{* isset $param*}
@@ -98,7 +98,7 @@ jQuery(document).ready(function(){
<table class="table2">
<tr class="throw">
<th>{'User'|@translate}</th>
- <th>{'email'|@translate}</th>
+ <th>{'Email'|@translate}</th>
<th>{'Last send'|@translate}</th>
<th>{'To send ?'|@translate}</th>
</tr>
@@ -128,7 +128,7 @@ jQuery(document).ready(function(){
</fieldset>
<p>
- <input class="submit" type="submit" value="{'Send'|@translate}" name="send_submit">
+ <input type="submit" value="{'Send'|@translate}" name="send_submit">
</p>
{/if}
{/if}{* isset $send*}
diff --git a/admin/themes/default/template/photos_add_direct.tpl b/admin/themes/default/template/photos_add_direct.tpl
index 6794e0407..c63f9dec7 100644
--- a/admin/themes/default/template/photos_add_direct.tpl
+++ b/admin/themes/default/template/photos_add_direct.tpl
@@ -2,7 +2,7 @@
{combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js' }
{combine_script id='jquery.uploadify' load='footer' require='jquery' path='admin/include/uploadify/jquery.uploadify.v3.0.0.min.js' }
{combine_script id='jquery.ui.progressbar' load='footer'}
-{combine_css path="admin/themes/default/uploadify.jGrowl.css"}
+{combine_css path="themes/default/js/plugins/jquery.jgrowl.css"}
{combine_css path="admin/include/uploadify/uploadify.css"}
{/if}
@@ -127,7 +127,7 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
'auto' : false,
'multi' : true,
'fileTypeDesc' : 'Photo files',
- 'fileTypeExts' : '*.jpg;*.JPG;*.jpeg;*.JPEG;*.png;*.PNG;*.gif;*.GIF',
+ 'fileTypeExts' : '*.jpg;*.JPG;*.jpeg;*.JPEG;*.png;*.PNG;*.gif;*.GIF;{/literal}{if $tif_enabled}*.tif;*.TIF;*.tiff;*.TIFF{/if}{literal}',
'fileSizeLimit' : sizeLimit,
'progressData' : 'percentage',
requeueErrors : false,
@@ -200,7 +200,7 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
'level' : jQuery("select[name=level] option:selected").val(),
'upload_id' : upload_id,
'session_id' : session_id,
- 'pwg_token' : pwg_token,
+ 'pwg_token' : pwg_token
}
);
@@ -289,31 +289,35 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
<fieldset>
<legend>{'Select files'|@translate}</legend>
+
+ {if isset($original_resize_maxheight)}<p class="uploadInfo">{'The picture dimensions will be reduced to %dx%d pixels.'|@translate:$original_resize_maxwidth:$original_resize_maxheight}</p>{/if}
- <p id="uploadWarningsSummary">{$upload_max_filesize_shorthand}B. {$upload_file_types}. {if isset($max_upload_resolution)}{$max_upload_resolution}Mpx{/if} <a class="showInfo" title="{'Learn more'|@translate}">i</a></p>
+ <p id="uploadWarningsSummary">{$upload_max_filesize_shorthand}B. {$upload_file_types}. {if isset($max_upload_resolution)}{$max_upload_resolution}Mpx{/if} <a class="icon-info-circled-1 showInfo" title="{'Learn more'|@translate}"></a></p>
<p id="uploadWarnings">
-{'Maximum file size: %sB.'|@translate|@sprintf:$upload_max_filesize_shorthand}
-{'Allowed file types: %s.'|@translate|@sprintf:$upload_file_types}
+{'Maximum file size: %sB.'|@translate:$upload_max_filesize_shorthand}
+{'Allowed file types: %s.'|@translate:$upload_file_types}
{if isset($max_upload_resolution)}
-{'Approximate maximum resolution: %dM pixels (that\'s %dx%d pixels).'|@translate|@sprintf:$max_upload_resolution:$max_upload_width:$max_upload_height}
+{'Approximate maximum resolution: %dM pixels (that\'s %dx%d pixels).'|@translate:$max_upload_resolution:$max_upload_width:$max_upload_height}
{/if}
</p>
+
+
{if $upload_mode eq 'html'}
<div id="uploadBoxes"></div>
<div id="addUploadBox">
<a href="javascript:">{'+ Add an upload box'|@translate}</a>
</div>
- <p id="uploadModeInfos">{'You are using the Browser uploader. Try the <a href="%s">Flash uploader</a> instead.'|@translate|@sprintf:$switch_url}</p>
+ <p id="uploadModeInfos">{'You are using the Browser uploader. Try the <a href="%s">Flash uploader</a> instead.'|@translate:$switch_url}</p>
{elseif $upload_mode eq 'multiple'}
<div id="uploadify">You've got a problem with your JavaScript</div>
<div id="fileQueue" style="display:none"></div>
- <p id="uploadModeInfos">{'You are using the Flash uploader. Problems? Try the <a href="%s">Browser uploader</a> instead.'|@translate|@sprintf:$switch_url}</p>
+ <p id="uploadModeInfos">{'You are using the Flash uploader. Problems? Try the <a href="%s">Browser uploader</a> instead.'|@translate:$switch_url}</p>
{/if}
</fieldset>
@@ -341,7 +345,7 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
</form>
<div id="uploadProgress" style="display:none">
-{'Photo %s of %s'|@translate|@sprintf:'<span id="progressCurrent">1</span>':'<span id="progressMax">10</span>'}
+{'Photo %s of %s'|@translate:'<span id="progressCurrent">1</span>':'<span id="progressMax">10</span>'}
<br>
<div id="progressbar"></div>
</div>
diff --git a/admin/themes/default/template/picture_modify.tpl b/admin/themes/default/template/picture_modify.tpl
index 5d2238eea..9fbd81daf 100644
--- a/admin/themes/default/template/picture_modify.tpl
+++ b/admin/themes/default/template/picture_modify.tpl
@@ -11,6 +11,7 @@ jQuery(document).ready(function() {
});
{/literal}{/footer_script}
+{combine_css path='themes/default/js/plugins/jquery.tokeninput.css'}
{combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
{footer_script require='jquery.tokeninput'}
jQuery(document).ready(function() {ldelim}
@@ -23,7 +24,7 @@ jQuery(document).ready(function() {ldelim}
newText: ' ({'new'|@translate})',
animateDropdown: false,
preventDuplicates: true,
- allowCreation: true
+ allowFreeTagging: true
}
);
});
@@ -56,15 +57,15 @@ pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#da
<li>{$INTRO.id}</li>
</ul>
</td>
- <td style="vertical-align:top;">
- <ul style="padding-left:15px;margin:0;">
+ <td class="photoLinks">
+ <ul>
{if isset($U_JUMPTO) }
- <li><a href="{$U_JUMPTO}">{'jump to photo'|@translate} →</a></li>
+ <li><a class="icon-eye" href="{$U_JUMPTO}">{'jump to photo'|@translate} →</a></li>
{/if}
{if !url_is_remote($PATH)}
- <li><a href="{$U_SYNC}">{'Synchronize metadata'|@translate}</a></li>
+ <li><a class="icon-arrows-cw" href="{$U_SYNC}">{'Synchronize metadata'|@translate}</a></li>
- <li><a href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete photo'|@translate}</a></li>
+ <li><a class="icon-trash" href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete photo'|@translate}</a></li>
{/if}
</ul>
</td>
diff --git a/admin/themes/default/template/plugins_installed.tpl b/admin/themes/default/template/plugins_installed.tpl
index b10be0401..9864abd9d 100644
--- a/admin/themes/default/template/plugins_installed.tpl
+++ b/admin/themes/default/template/plugins_installed.tpl
@@ -162,7 +162,7 @@ jQuery(document).ready(function() {
{'Version'|@translate} {$plugin.VERSION}
{if not empty($author)}
- | {'By %s'|@translate|@sprintf:$author}
+ | {'By %s'|@translate:$author}
{/if}
{if not empty($plugin.VISIT_URL)}
@@ -183,7 +183,7 @@ jQuery(document).ready(function() {
<div id="{$plugin.ID}" class="pluginMiniBox {$plugin.STATE}">
<div class="pluginMiniBoxNameCell">
{$plugin.NAME}
- <a class="showInfo" title="{if !empty($author)}{'By %s'|@translate|@sprintf:$author} | {/if}{'Version'|@translate} {$version}<br/>{$plugin.DESC|@escape:'html'}">i</a>
+ <a class="icon-info-circled-1 showInfo" title="{if !empty($author)}{'By %s'|@translate:$author} | {/if}{'Version'|@translate} {$version}<br/>{$plugin.DESC|@escape:'html'}"></a>
</div>
<div class="pluginActions">
<div>
diff --git a/admin/themes/default/template/plugins_new.tpl b/admin/themes/default/template/plugins_new.tpl
index ad406fed0..3ccfcaeec 100644
--- a/admin/themes/default/template/plugins_new.tpl
+++ b/admin/themes/default/template/plugins_new.tpl
@@ -77,7 +77,7 @@ jQuery(document).ready(function(){
<td>
<em>{'Downloads'|@translate}: {$plugin.DOWNLOADS}</em>
{'Version'|@translate} {$plugin.VERSION}
- | {'By %s'|@translate|@sprintf:$plugin.AUTHOR}
+ | {'By %s'|@translate:$plugin.AUTHOR}
| <a class="externalLink" href="{$plugin.EXT_URL}">{'Visit plugin site'|@translate}</a>
</td>
</tr>
diff --git a/admin/themes/default/template/profile_content.tpl b/admin/themes/default/template/profile_content.tpl
index 33727f7aa..3c22dd386 100644
--- a/admin/themes/default/template/profile_content.tpl
+++ b/admin/themes/default/template/profile_content.tpl
@@ -50,7 +50,7 @@
{if not $SPECIAL_USER}
<li>
<span class="property">
- <label for="template">{'Interface theme'|@translate}</label>
+ <label for="template">{'Theme'|@translate}</label>
</span>
{html_options id=template name=theme options=$template_options selected=$template_selection}
</li>
diff --git a/admin/themes/default/template/tags.tpl b/admin/themes/default/template/tags.tpl
index 4f4542032..e54362637 100644
--- a/admin/themes/default/template/tags.tpl
+++ b/admin/themes/default/template/tags.tpl
@@ -1,26 +1,68 @@
{include file='include/tag_selection.inc.tpl'}
-{footer_script}{literal}
-jQuery(document).ready(function(){
- function displayDeletionWarnings() {
- jQuery(".warningDeletion").show();
- jQuery("input[name=destination_tag]:checked").parent("label").children(".warningDeletion").hide();
- }
+{html_style}
+.showInfo { text-indent:5px; }
+{/html_style}
+{footer_script require='jquery'}
+jQuery('.showInfo').tipTip({
+ 'delay' : 0,
+ 'fadeIn' : 200,
+ 'fadeOut' : 200,
+ 'maxWidth':'300px',
+ 'keepAlive':true,
+ 'activation':'click'
+});
+
+function displayDeletionWarnings() {
+ jQuery(".warningDeletion").show();
+ jQuery("input[name=destination_tag]:checked").parent("label").children(".warningDeletion").hide();
+}
+
+displayDeletionWarnings();
+
+jQuery("#mergeTags label").click(function() {
displayDeletionWarnings();
+});
- jQuery("#mergeTags label").click(function() {
- displayDeletionWarnings();
- });
+jQuery("input[name=merge]").click(function() {
+ if (jQuery("ul.tagSelection input[type=checkbox]:checked").length < 2) {
+ alert("{'Select at least two tags for merging'|@translate}");
+ return false;
+ }
+});
+
+$("#searchInput").on("keydown", function(e) {
+ var $this = $(this),
+ timer = $this.data("timer");
+
+ if (timer) {
+ clearTimeout(timer);
+ }
- jQuery("input[name=merge]").click(function() {
- if (jQuery("ul.tagSelection input[type=checkbox]:checked").length < 2) {
- alert("{/literal}{'Select at least two tags for merging'|@translate}{literal}");
- return false;
+ $this.data("timer", setTimeout(function() {
+ var val = $this.val();
+ if (!val) {
+ $(".tagSelection>li").show();
+ $("#filterIcon").css("visibility","hidden");
+ }
+ else {
+ $("#filterIcon").css("visibility","visible");
+ var regex = new RegExp( val.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), "i" );
+ $(".tagSelection>li").each(function() {
+ var $li = $(this),
+ text = $.trim( $("label", $li).text() );
+ $li.toggle(regex.test(text));
+ });
}
- });
+
+ }, 300) );
+
+ if (e.keyCode == 13) { // Enter
+ e.preventDefault();
+ }
});
-{/literal}{/footer_script}
+{/footer_script}
<div class="titrePage">
@@ -46,12 +88,12 @@ jQuery(document).ready(function(){
</table>
<p>
- <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
- <input class="submit" type="reset" value="{'Reset'|@translate}">
+ <input type="submit" name="edit_submit" value="{'Submit'|@translate}">
+ <input type="submit" name="edit_cancel" value="{'Cancel'|@translate}">
</p>
</fieldset>
{/if}
+
{if isset($DUPLIC_TAGS_LIST)}
<fieldset>
<legend>{'Edit tags'|@translate}</legend>
@@ -70,23 +112,28 @@ jQuery(document).ready(function(){
</table>
<p>
- <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
- <input class="submit" type="submit" name="duplic_submit" value="{'Submit'|@translate}">
- <input class="submit" type="reset" value="{'Reset'|@translate}">
+ <input type="submit" name="duplic_submit" value="{'Submit'|@translate}">
+ <input type="submit" name="duplic_cancel" value="{'Cancel'|@translate}">
</p>
</fieldset>
{/if}
{if isset($MERGE_TAGS_LIST)}
- <input type="hidden" name="merge_list" value="{$MERGE_TAGS_LIST}">
-
<fieldset id="mergeTags">
<legend>{'Merge tags'|@translate}</legend>
- {'Select the destination tag'|@translate}<br><br>
+ {'Select the destination tag'|@translate}
+
+ <p>
{foreach from=$tags item=tag name=tagloop}
<label><input type="radio" name="destination_tag" value="{$tag.ID}"{if $smarty.foreach.tagloop.index == 0} checked="checked"{/if}> {$tag.NAME}<span class="warningDeletion"> {'(this tag will be deleted)'|@translate}</span></label><br>
{/foreach}
- <br><input type="submit" name="confirm_merge" value="{'Confirm merge'|@translate}">
+ </p>
+
+ <p>
+ <input type="hidden" name="merge_list" value="{$MERGE_TAGS_LIST}">
+ <input type="submit" name="merge_submit" value="{'Confirm merge'|@translate}">
+ <input type="submit" name="merge_cancel" value="{'Cancel'|@translate}">
+ </p>
</fieldset>
{/if}
@@ -97,42 +144,40 @@ jQuery(document).ready(function(){
{'New tag'|@translate}
<input type="text" name="add_tag" size="50">
</label>
-
+
<p><input class="submit" type="submit" name="add" value="{'Submit'|@translate}"></p>
</fieldset>
<fieldset>
<legend>{'Tag selection'|@translate}</legend>
-{html_style}
-.showInfo{ldelim}position:static; display:inline-block; text-indent:6px}
-{/html_style}
-{footer_script}{literal}
-jQuery('.showInfo').tipTip({
- 'delay' : 0,
- 'fadeIn' : 200,
- 'fadeOut' : 200,
- 'maxWidth':'300px',
- 'keepAlive':true,
- 'activation':'click'
- });
-{/literal}{/footer_script}
-<ul class="tagSelection">
-{foreach from=$all_tags item=tag}
- <li>{capture name='showInfo'}<b>{$tag.name}</b> ({$pwg->l10n_dec('%d photo', '%d photos', $tag.counter)}) <br> <a href="{$tag.U_VIEW}">{'View in gallery'|@translate}</a> | <a href="{$tag.U_EDIT}">{'Manage photos'|@translate}</a>{if !empty($tag.alt_names)}<br>{$tag.alt_names}{/if}{/capture}
- <a class="showInfo" title="{$smarty.capture.showInfo|@htmlspecialchars}">i</a>
- <label>
- <input type="checkbox" name="tags[]" value="{$tag.id}"> {$tag.name}
- </label>
- </li>
-{/foreach}
-</ul>
+
+ {if count($all_tags)}
+ <div><label><span class="icon-filter" style="visibility:hidden" id="filterIcon"></span>{'Search'|@translate}: <input id="searchInput" type="text" size="12"></label></div>
+ {/if}
+
+ <ul class="tagSelection">
+ {foreach from=$all_tags item=tag}
+ <li>
+ {capture name='showInfo'}{strip}
+ <b>{$tag.name}</b> ({$tag.counter|@translate_dec:'%d photo':'%d photos'})<br>
+ <a href="{$tag.U_VIEW}">{'View in gallery'|@translate}</a> |
+ <a href="{$tag.U_EDIT}">{'Manage photos'|@translate}</a>
+ {if !empty($tag.alt_names)}<br>{$tag.alt_names}{/if}
+ {/strip}{/capture}
+ <a class="icon-info-circled-1 showInfo" title="{$smarty.capture.showInfo|@htmlspecialchars}"></a>
+ <label>
+ <input type="checkbox" name="tags[]" value="{$tag.id}"> {$tag.name}
+ </label>
+ </li>
+ {/foreach}
+ </ul>
<p>
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
- <input class="submit" type="submit" name="edit" value="{'Edit selected tags'|@translate}">
- <input class="submit" type="submit" name="duplicate" value="{'Duplicate selected tags'|@translate}">
- <input class="submit" type="submit" name="merge" value="{'Merge selected tags'|@translate}">
- <input class="submit" type="submit" name="delete" value="{'Delete selected tags'|@translate}" onclick="return confirm('{'Are you sure?'|@translate}');">
+ <input type="submit" name="edit" value="{'Edit selected tags'|@translate}">
+ <input type="submit" name="duplicate" value="{'Duplicate selected tags'|@translate}">
+ <input type="submit" name="merge" value="{'Merge selected tags'|@translate}">
+ <input type="submit" name="delete" value="{'Delete selected tags'|@translate}" onclick="return confirm('{'Are you sure?'|@translate}');">
</p>
</fieldset>
diff --git a/admin/themes/default/template/themes_installed.tpl b/admin/themes/default/template/themes_installed.tpl
index c1c5eb66b..47495df7c 100644
--- a/admin/themes/default/template/themes_installed.tpl
+++ b/admin/themes/default/template/themes_installed.tpl
@@ -1,8 +1,18 @@
{include file='include/colorbox.inc.tpl'}
+
{footer_script}{literal}
jQuery(document).ready(function() {
- $("a.preview-box").colorbox();
-});
+ $("a.preview-box").colorbox();
+
+ jQuery('.showInfo').tipTip({
+ 'delay' : 0,
+ 'fadeIn' : 200,
+ 'fadeOut' : 200,
+ 'maxWidth':'300px',
+ 'keepAlive':true,
+ 'activation':'click'
+ });
+});
{/literal}{/footer_script}
<div class="titrePage">
@@ -11,66 +21,80 @@ jQuery(document).ready(function() {
<div id="themesContent">
-<fieldset>
-<legend>{'Active Themes'|@translate}</legend>
-{if isset($active_themes)}
-<div class="themeBoxes">
-{foreach from=$active_themes item=theme}
- <div class="themeBox{if $theme.is_default} themeDefault{/if}">
- <div class="themeName">{$theme.name}{if $theme.is_default} <em>({'default'|@translate})</em>{/if} {if $theme.mobile} <em>({'Mobile'|@translate})</em>{/if}</div>
- <div class="themeShot"><a href="{$theme.screenshot}" class="preview-box" title="{$theme.name}"><img src="{$theme.screenshot}" alt=""></a></div>
- <div class="themeActions">
- <div>
-{if $theme.deactivable}
- <a href="{$deactivate_baseurl}{$theme.id}" class="tiptip" title="{'Forbid this theme to users'|@translate}">{'Deactivate'|@translate}</a>
-{else}
- <span title="{$theme.deactivate_tooltip}" class="tiptip">{'Deactivate'|@translate}</span>
-{/if}
-
-{if not $theme.is_default}
- | <a href="{$set_default_baseurl}{$theme.id}" class="tiptip" title="{'Set as default theme for unregistered and new users'|@translate}">{'Default'|@translate}</a>
-{/if}
-{if isset($theme.admin_uri)}
- <br><a href="{$theme.admin_uri}" class="tiptip" title="{'Configuration'|@translate}">{'Configuration'|@translate}</a>
-{/if}
- </div>
- </div> <!-- themeActions -->
- </div>
-{/foreach}
-</div> <!-- themeBoxes -->
+{assign var='field_name' value='null'} {* <!-- 'counter' for fieldset management --> *}
+{foreach from=$tpl_themes item=theme}
+
+{if $field_name != $theme.STATE}
+ {if $field_name != 'null'}
+ </div>
+ </fieldset>
+ {/if}
+
+ <fieldset>
+ <legend>
+ {if $theme.STATE == 'active'}
+ {'Active Themes'|@translate}
+ {else}
+ {'Inactive Themes'|@translate}
+ {/if}
+ </legend>
+ <div class="themeBoxes">
+ {assign var='field_name' value=$theme.STATE}
{/if}
-</fieldset>
-{if isset($inactive_themes)}
-<fieldset>
-<legend>{'Inactive Themes'|@translate}</legend>
-<div class="themeBoxes">
-{foreach from=$inactive_themes item=theme}
- <div class="themeBox">
- <div class="themeName">{$theme.name}{if $theme.mobile} <em>({'Mobile'|@translate})</em>{/if}</div>
- <div class="themeShot"><a href="{$theme.screenshot}" class="preview-box" title="{$theme.name}"><img src="{$theme.screenshot}" alt=""></a></div>
+ {if not empty($theme.AUTHOR)}
+ {if not empty($theme.AUTHOR_URL)}
+ {assign var='author' value="<a href='%s'>%s</a>"|@sprintf:$theme.AUTHOR_URL:$theme.AUTHOR}
+ {else}
+ {assign var='author' value='<u>'|cat:$theme.AUTHOR|cat:'</u>'}
+ {/if}
+ {/if}
+ {if not empty($theme.VISIT_URL)}
+ {assign var='version' value="<a class='externalLink' href='"|cat:$theme.VISIT_URL|cat:"'>"|cat:$theme.VERSION|cat:"</a>"}
+ {else}
+ {assign var='version' value=$theme.VERSION}
+ {/if}
+
+ <div class="themeBox{if $theme.IS_DEFAULT} themeDefault{/if}">
+ <div class="themeName">
+ {$theme.NAME} {if $theme.IS_DEFAULT}<em>({'default'|@translate})</em>{/if} {if $theme.IS_MOBILE}<em>({'Mobile'|@translate})</em>{/if}
+ <a class="icon-info-circled-1 showInfo" title="{if !empty($author)}{'By %s'|@translate:$author} | {/if}{'Version'|@translate} {$version}<br/>{$theme.DESC|@escape:'html'}"></a>
+ </div>
+ <div class="themeShot"><a href="{$theme.SCREENSHOT}" class="preview-box" title="{$theme.NAME}"><img src="{$theme.SCREENSHOT}" alt=""></a></div>
<div class="themeActions">
<div>
- {if $theme.activable}
- <a href="{$activate_baseurl}{$theme.id}" title="{'Make this theme available to users'|@translate}" class="tiptip">{'Activate'|@translate}</a>
+{if $theme.STATE == 'active'}
+ {if $theme.DEACTIVABLE}
+ <a href="{$deactivate_baseurl}{$theme.ID}" class="tiptip" title="{'Forbid this theme to users'|@translate}">{'Deactivate'|@translate}</a>
{else}
- <span title="{$theme.activate_tooltip}" class="tiptip">{'Activate'|@translate}</span>
+ <span title="{$theme.DEACTIVATE_TOOLTIP}" class="tiptip">{'Deactivate'|@translate}</span>
{/if}
+ {if not $theme.IS_DEFAULT}
+ | <a href="{$set_default_baseurl}{$theme.ID}" class="tiptip" title="{'Set as default theme for unregistered and new users'|@translate}">{'Default'|@translate}</a>
+ {/if}
+ {if $theme.ADMIN_URI}
+ <br><a href="{$theme.ADMIN_URI}" class="tiptip" title="{'Configuration'|@translate}">{'Configuration'|@translate}</a>
+ {/if}
+{else}
+ {if $theme.ACTIVABLE}
+ <a href="{$activate_baseurl}{$theme.ID}" title="{'Make this theme available to users'|@translate}" class="tiptip">{'Activate'|@translate}</a>
+ {else}
+ <span title="{$theme.ACTIVATE_TOOLTIP}" class="tiptip">{'Activate'|@translate}</span>
+ {/if}
|
-
- {if $theme.deletable}
- <a href="{$delete_baseurl}{$theme.id}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');" title="{'Delete this theme'|@translate}">{'Delete'|@translate}</a>
+ {if $theme.DELETABLE}
+ <a href="{$delete_baseurl}{$theme.ID}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');" title="{'Delete this theme'|@translate}">{'Delete'|@translate}</a>
{else}
- <span title="{$theme.delete_tooltip}" class="tiptip">{'Delete'|@translate}</span>
+ <span title="{$theme.DELETE_TOOLTIP}" class="tiptip">{'Delete'|@translate}</span>
{/if}
+{/if}
</div>
- </div>
-
+ </div> <!-- themeActions -->
</div>
+
{/foreach}
</div> <!-- themeBoxes -->
</fieldset>
-{/if}
</div> <!-- themesContent -->
diff --git a/admin/themes/default/template/updates_ext.tpl b/admin/themes/default/template/updates_ext.tpl
index 9946d824f..7d65c254a 100644
--- a/admin/themes/default/template/updates_ext.tpl
+++ b/admin/themes/default/template/updates_ext.tpl
@@ -1,6 +1,6 @@
{combine_script id='jquery.ajaxmanager' load='footer' require='jquery' path='themes/default/js/plugins/jquery.ajaxmanager.js'}
{combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js'}
-{combine_css path="admin/themes/default/uploadify.jGrowl.css"}
+{combine_css path="themes/default/js/plugins/jquery.jgrowl.css"}
{footer_script require='jquery.ui.effect-blind,jquery.ajaxmanager,jquery.jgrowl'}
var pwg_token = '{$PWG_TOKEN}';
@@ -180,7 +180,7 @@ checkFieldsets();
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/plus.gif" alt="" class="button_{$plugin.ID}">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/minus.gif" alt="" class="button_{$plugin.ID}" style="display:none;">
{'New Version'|@translate} : {$plugin.NEW_VERSION}
- | {'By %s'|@translate|@sprintf:$plugin.AUTHOR}
+ | {'By %s'|@translate:$plugin.AUTHOR}
</td>
</tr>
<tr>
@@ -222,7 +222,7 @@ checkFieldsets();
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/plus.gif" alt="" class="button_{$theme.ID}">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/minus.gif" alt="" class="button_{$theme.ID}" style="display:none;">
{'New Version'|@translate} : {$theme.NEW_VERSION}
- | {'By %s'|@translate|@sprintf:$theme.AUTHOR}
+ | {'By %s'|@translate:$theme.AUTHOR}
</td>
</tr>
<tr>
@@ -264,7 +264,7 @@ checkFieldsets();
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/plus.gif" alt="" class="button_{$language.ID}">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/minus.gif" alt="" class="button_{$language.ID}" style="display:none;">
{'New Version'|@translate} : {$language.NEW_VERSION}
- | {'By %s'|@translate|@sprintf:$language.AUTHOR}
+ | {'By %s'|@translate:$language.AUTHOR}
</td>
</tr>
<tr>
diff --git a/admin/themes/default/template/updates_pwg.tpl b/admin/themes/default/template/updates_pwg.tpl
index 5b1bf3238..8205d9f25 100644
--- a/admin/themes/default/template/updates_pwg.tpl
+++ b/admin/themes/default/template/updates_pwg.tpl
@@ -41,11 +41,11 @@ li { margin: 5px; }
<h4>{'Two updates are available'|@translate}:</h4>
<p>
<ul>
- <li><a href="admin.php?page=updates&amp;step=2&amp;to={$MINOR_VERSION}"><strong>{'Update to Piwigo %s'|@translate|@sprintf:$MINOR_VERSION}</strong></a>: {'This is a minor update, with only bug corrections.'|@translate}</li>
- <li><a href="admin.php?page=updates&amp;step=3&amp;to={$MAJOR_VERSION}"><strong>{'Update to Piwigo %s'|@translate|@sprintf:$MAJOR_VERSION}</strong></a>: {'This is a major update, with <a href="%s">new exciting features</a>.'|@translate|@sprintf:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}</li>
+ <li><a href="admin.php?page=updates&amp;step=2&amp;to={$MINOR_VERSION}"><strong>{'Update to Piwigo %s'|@translate:$MINOR_VERSION}</strong></a>: {'This is a minor update, with only bug corrections.'|@translate}</li>
+ <li><a href="admin.php?page=updates&amp;step=3&amp;to={$MAJOR_VERSION}"><strong>{'Update to Piwigo %s'|@translate:$MAJOR_VERSION}</strong></a>: {'This is a major update, with <a href="%s">new exciting features</a>.'|@translate:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}</li>
</ul>
</p>
-<p>{'You can update to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'|@translate|@sprintf:$MAJOR_VERSION:$MINOR_VERSION}</p>
+<p>{'You can update to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'|@translate:$MAJOR_VERSION:$MINOR_VERSION}</p>
{/if}
{if $STEP == 2}
@@ -54,7 +54,7 @@ li { margin: 5px; }
{'This is a minor update, with only bug corrections.'|@translate}
</p>
<form action="" method="post">
-<p><input type="submit" name="submit" value="{'Update to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}"></p>
+<p><input type="submit" name="submit" value="{'Update to Piwigo %s'|@translate:$UPGRADE_TO}"></p>
<p class="autoupdate_bar" style="display:none;">&nbsp; {'Update in progress...'|@translate}<br><img src="admin/themes/default/images/ajax-loader-bar.gif"></p>
<p><input type="hidden" name="upgrade_to" value="{$UPGRADE_TO}"></p>
</form>
@@ -63,7 +63,7 @@ li { margin: 5px; }
{if $STEP == 3}
<p>
{'A new version of Piwigo is available.'|@translate}<br>
- {'This is a major update, with <a href="%s">new exciting features</a>.'|@translate|@sprintf:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}
+ {'This is a major update, with <a href="%s">new exciting features</a>.'|@translate:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}
</p>
<form action="" method="post">
@@ -76,7 +76,7 @@ li { margin: 5px; }
{counter assign=i}
<fieldset>
- <legend>{'Update to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}</legend>
+ <legend>{'Update to Piwigo %s'|@translate:$UPGRADE_TO}</legend>
{if !empty($missing.plugins)}
<p><i>{'Following plugins may not be compatible with the new version of Piwigo:'|@translate}</i></p>
<p><ul>{foreach from=$missing.plugins item=plugin}<li><a href="{$plugin.uri}" class="externalLink">{$plugin.name}</a></li>{/foreach}</ul><br></p>
@@ -89,7 +89,7 @@ li { margin: 5px; }
{if !empty($missing.plugins) or !empty($missing.themes)}
<p><label><input type="checkbox" name="understand"> &nbsp;{'I decide to update anyway'|@translate}</label></p>
{/if}
- <p><input type="submit" name="submit" value="{'Update to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}" {if !empty($missing.plugins) or !empty($missing.themes)}disabled="disabled"{/if}>
+ <p><input type="submit" name="submit" value="{'Update to Piwigo %s'|@translate:$UPGRADE_TO}" {if !empty($missing.plugins) or !empty($missing.themes)}disabled="disabled"{/if}>
</p>
<p class="autoupdate_bar" style="display:none;">&nbsp; {'Update in progress...'|@translate}<br><img src="admin/themes/default/images/ajax-loader-bar.gif"></p>
</fieldset>
diff --git a/admin/themes/default/template/upgrade.tpl b/admin/themes/default/template/upgrade.tpl
index f859ed56e..f126d06a6 100644
--- a/admin/themes/default/template/upgrade.tpl
+++ b/admin/themes/default/template/upgrade.tpl
@@ -39,6 +39,7 @@ body {
#content {
min-height:0;
+ border:none;
}
#theHeader {
@@ -161,7 +162,7 @@ input[type="text"]:focus, input[type="password"]:focus, select:focus {
</tr>
</table>
-<p>{'This page proposes to upgrade your database corresponding to your old version of Piwigo to the current version. The upgrade assistant thinks you are currently running a <strong>release %s</strong> (or equivalent).'|@translate|@sprintf:$introduction.CURRENT_RELEASE}</p>
+<p>{'This page proposes to upgrade your database corresponding to your old version of Piwigo to the current version. The upgrade assistant thinks you are currently running a <strong>release %s</strong> (or equivalent).'|@translate:$introduction.CURRENT_RELEASE}</p>
{if isset($login)}
<p>{'Only administrator can run upgrade: please sign in below.'|@translate}</p>
{/if}
@@ -180,19 +181,19 @@ input[type="text"]:focus, input[type="password"]:focus, select:focus {
{/if}
</fieldset>
<p style="text-align: center;">
-<input class="submit" type="submit" name="submit" value="{'Upgrade from version %s to %s'|@translate|@sprintf:$introduction.CURRENT_RELEASE:$RELEASE}">
+<input class="submit" type="submit" name="submit" value="{'Upgrade from version %s to %s'|@translate:$introduction.CURRENT_RELEASE:$RELEASE}">
</p>
</form>
<!--
<p style="text-align: center;">
-<a href="{$introduction.RUN_UPGRADE_URL}">{'Upgrade from version %s to %s'|@translate|@sprintf:$introduction.CURRENT_RELEASE:$RELEASE}</a>
+<a href="{$introduction.RUN_UPGRADE_URL}">{'Upgrade from version %s to %s'|@translate:$introduction.CURRENT_RELEASE:$RELEASE}</a>
</p>
-->
{/if}
{if isset($upgrade)}
-<h2>{'Upgrade from version %s to %s'|@translate|@sprintf:$upgrade.VERSION:$RELEASE}</h2>
+<h2>{'Upgrade from version %s to %s'|@translate:$upgrade.VERSION:$RELEASE}</h2>
<fieldset>
<legend>{'Statistics'|@translate}</legend>
diff --git a/admin/themes/default/template/user_list.tpl b/admin/themes/default/template/user_list.tpl
index 5bb3f18ed..a491cae17 100644
--- a/admin/themes/default/template/user_list.tpl
+++ b/admin/themes/default/template/user_list.tpl
@@ -1,290 +1,1137 @@
+{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
+
+{combine_script id='jquery.dataTables' load='footer' path='themes/default/js/plugins/jquery.dataTables.js'}
+{combine_css path="themes/default/js/plugins/datatables/css/jquery.dataTables.css"}
+
+{combine_script id='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'}
+{combine_css path="themes/default/js/plugins/chosen.css"}
+
+{combine_script id='jquery.underscore' load='footer' path='themes/default/js/plugins/underscore.js'}
+
+{combine_script id='jquery.ui.slider' require='jquery.ui' load='footer' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'}
+{combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"}
+
+{footer_script}
+var selectedMessage_pattern = "{'%d of %d users selected'|translate|escape:javascript}";
+var selectedMessage_none = "{'No user selected of %d users'|translate|escape:javascript}";
+var selectedMessage_all = "{'All %d users are selected'|translate|escape:javascript}";
+var applyOnDetails_pattern = "{'on the %d selected users'|translate|escape:javascript}";
+var newUser_pattern = "&#x2714; {'User %s added'|translate|escape:javascript}";
+var registeredOn_pattern = "{'Registered on %s, %s.'|translate|escape:javascript}";
+var lastVisit_pattern = "{'Last visit on %s, %s.'|translate|escape:javascript}";
+var missingConfirm = "{'You need to confirm deletion'|translate|escape:javascript}";
+var missingUsername = "{'Please, enter a login'|translate|escape:javascript}";
+
+var allUsers = [{$all_users}];
+var selection = [{$selection}];
+var pwg_token = "{$PWG_TOKEN}";
+
+var protectedUsers = [{$protected_users}];
+var guestUser = {$guest_user};
+
+var truefalse = {
+ true:"{'Yes'|translate}",
+ false:"{'No'|translate}",
+};
+{/footer_script}
+
+{footer_script}{literal}
+jQuery(document).ready(function() {
+ /**
+ * Add user
+ */
+ jQuery("#addUser").click(function() {
+ jQuery("#addUserForm").toggle();
+ jQuery("#showAddUser .infos").hide();
+ jQuery("input[name=username]").focus();
+ return false;
+ });
+
+ jQuery("#addUserClose").click(function() {
+ jQuery("#addUserForm").hide();
+ return false;
+ });
+
+ jQuery("#addUserForm").submit(function() {
+ jQuery.ajax({
+ url: "ws.php?format=json&method=pwg.users.add",
+ type:"POST",
+ data: jQuery(this).serialize(),
+ beforeSend: function() {
+ jQuery("#addUserForm .errors").hide();
+
+ if (jQuery("input[name=username]").val() == "") {
+ jQuery("#addUserForm .errors").html('&#x2718; '+missingUsername).show();
+ return false;
+ }
+
+ jQuery("#addUserForm .loading").show();
+ },
+ success:function(data) {
+ oTable.fnDraw();
+ jQuery("#addUserForm .loading").hide();
+
+ var data = jQuery.parseJSON(data);
+ if (data.stat == 'ok') {
+ jQuery("#addUserForm input[type=text], #addUserForm input[type=password]").val("");
+
+ var new_user = data.result.users[0];
+ allUsers.push(parseInt(new_user.id));
+ jQuery("#showAddUser .infos").html(sprintf(newUser_pattern, new_user.username)).show();
+ checkSelection();
+
+ jQuery("#addUserForm").hide();
+ }
+ else {
+ jQuery("#addUserForm .errors").html('&#x2718; '+data.message).show();
+ }
+ },
+ error:function(XMLHttpRequest, textStatus, errorThrows) {
+ jQuery("#addUserForm .loading").hide();
+ }
+ });
+
+ return false;
+ });
+
+ /**
+ * Table with users
+ */
+ /**
+ * find the key from a value in the startStopValues array
+ */
+ function getSliderKeyFromValue(value, values) {
+ for (var key in values) {
+ if (values[key] >= value) {
+ return key;
+ }
+ }
+ return 0;
+ }
+
+ var recent_period_values = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,25,30,40,50,60,80,99];
+
+ function getRecentPeriodInfoFromIdx(idx) {
+ return sprintf(
+ "{/literal}{'%d days'|@translate}{literal}",
+ recent_period_values[idx]
+ );
+ }
+
+ var nb_image_page_values = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,35,40,45,50,60,70,80,90,100,200,300,500,999];
+
+ function getNbImagePageInfoFromIdx(idx) {
+ return sprintf(
+ "{/literal}{'%d photos per page'|@translate}{literal}",
+ nb_image_page_values[idx]
+ );
+ }
+
+ /* nb_image_page slider */
+ var nb_image_page_init = getSliderKeyFromValue(jQuery('#action_nb_image_page input[name=nb_image_page]').val(), nb_image_page_values);
+
+ jQuery('#action_nb_image_page .nb_image_page_infos').html(getNbImagePageInfoFromIdx(nb_image_page_init));
+
+ jQuery('#action_nb_image_page .nb_image_page').slider({
+ range: "min",
+ min: 0,
+ max: nb_image_page_values.length - 1,
+ value: nb_image_page_init,
+ slide: function( event, ui ) {
+ jQuery('#action_nb_image_page .nb_image_page_infos').html(getNbImagePageInfoFromIdx(ui.value));
+ },
+ stop: function( event, ui ) {
+ jQuery('#action_nb_image_page input[name=nb_image_page]').val(nb_image_page_values[ui.value]).trigger('change');
+ }
+ });
+
+ /* recent_period slider */
+ var recent_period_init = getSliderKeyFromValue(jQuery('#action_recent_period input[name=recent_period]').val(), recent_period_values);
+ jQuery('#action_recent_period .recent_period_infos').html(getRecentPeriodInfoFromIdx(recent_period_init));
+
+ jQuery('#action_recent_period .recent_period').slider({
+ range: "min",
+ min: 0,
+ max: recent_period_values.length - 1,
+ value: recent_period_init,
+ slide: function( event, ui ) {
+ jQuery('#action_recent_period .recent_period_infos').html(getRecentPeriodInfoFromIdx(ui.value));
+ },
+ stop: function( event, ui ) {
+ jQuery('#action_recent_period input[name=recent_period]').val(recent_period_values[ui.value]).trigger('change');
+ }
+ });
+
+ /* Formating function for row details */
+ function fnFormatDetails(oTable, nTr) {
+ var userId = oTable.fnGetData(nTr)[0];
+ console.log("userId = "+userId);
+ var sOut = null;
+
+ jQuery.ajax({
+ url: "ws.php?format=json&method=pwg.users.getList",
+ type:"POST",
+ data: {
+ user_id: userId,
+ display: "all",
+ },
+ success:function(data) {
+ jQuery("#user"+userId+" .loading").hide();
+
+ var data = jQuery.parseJSON(data);
+ if (data.stat == 'ok') {
+ var user = data.result.users[0];
+
+ /* Prepare data for template */
+ user.statusOptions = [];
+ jQuery("#action select[name=status] option").each(function() {
+ var option = {value:jQuery(this).val(), label:jQuery(this).html(), isSelected:false};
+
+ if (user.status == jQuery(this).val()) {
+ option.isSelected = true;
+ }
+
+ user.statusOptions.push(option);
+ });
+
+ user.levelOptions = [];
+ jQuery("#action select[name=level] option").each(function() {
+ var option = {value:jQuery(this).val(), label:jQuery(this).html(), isSelected:false};
+
+ if (user.level == jQuery(this).val()) {
+ option.isSelected = true;
+ }
+
+ user.levelOptions.push(option);
+ });
+
+ user.groupOptions = [];
+ jQuery("#action select[name=associate] option").each(function() {
+ var option = {value:jQuery(this).val(), label:jQuery(this).html(), isSelected:false};
+
+ if (user.groups.indexOf( parseInt(jQuery(this).val()) ) != -1) {
+ option.isSelected = true;
+ }
+
+ user.groupOptions.push(option);
+ });
+
+ user.themeOptions = [];
+ jQuery("#action select[name=theme] option").each(function() {
+ var option = {value:jQuery(this).val(), label:jQuery(this).html(), isSelected:false};
+
+ if (user.theme == jQuery(this).val()) {
+ option.isSelected = true;
+ }
+
+ user.themeOptions.push(option);
+ });
+
+ user.languageOptions = [];
+ jQuery("#action select[name=language] option").each(function() {
+ var option = {value:jQuery(this).val(), label:jQuery(this).html(), isSelected:false};
+
+ if (user.language == jQuery(this).val()) {
+ option.isSelected = true;
+ }
+
+ user.languageOptions.push(option);
+ });
+
+ user.isGuest = (parseInt(userId) == guestUser);
+ user.isProtected = (protectedUsers.indexOf(parseInt(userId)) != -1);
+
+ user.registeredOn_string = sprintf(
+ registeredOn_pattern,
+ user.registration_date_string,
+ user.registration_date_since
+ );
+
+ user.lastVisit_string = "";
+ if (typeof user.last_visit != 'undefined') {
+ user.lastVisit_string = sprintf(lastVisit_pattern, user.last_visit_string, user.last_visit_since);
+ }
+
+ user.updateString = sprintf(
+ "{/literal}{'User %s updated'|translate|escape:javascript}{literal}",
+ user.username
+ );
+
+ user.email = user.email || '';
+
+ jQuery("#action select[name=status] option").each(function() {
+ if (user.status == jQuery(this).val()) {
+ user.statusLabel = jQuery(this).html();
+ }
+ });
+
+ /* Render the underscore template */
+ _.templateSettings.variable = "user";
+
+ var template = _.template(
+ jQuery("script.userDetails").html()
+ );
+
+ jQuery("#user"+userId).append(template(user));
+
+ jQuery(".chzn-select").chosen();
+
+ /* nb_image_page slider */
+ var nb_image_page_init = getSliderKeyFromValue(jQuery('#user'+userId+' input[name=nb_image_page]').val(), nb_image_page_values);
+
+ jQuery('#user'+userId+' .nb_image_page_infos').html(getNbImagePageInfoFromIdx(nb_image_page_init));
+
+ jQuery('#user'+userId+' .nb_image_page').slider({
+ range: "min",
+ min: 0,
+ max: nb_image_page_values.length - 1,
+ value: nb_image_page_init,
+ slide: function( event, ui ) {
+ jQuery('#user'+userId+' .nb_image_page_infos').html(getNbImagePageInfoFromIdx(ui.value));
+ },
+ stop: function( event, ui ) {
+ jQuery('#user'+userId+' input[name=nb_image_page]').val(nb_image_page_values[ui.value]).trigger('change');
+ }
+ });
+
+ /* recent_period slider */
+ var recent_period_init = getSliderKeyFromValue(jQuery('#user'+userId+' input[name=recent_period]').val(), recent_period_values);
+ jQuery('#user'+userId+' .recent_period_infos').html(getRecentPeriodInfoFromIdx(recent_period_init));
+
+ jQuery('#user'+userId+' .recent_period').slider({
+ range: "min",
+ min: 0,
+ max: recent_period_values.length - 1,
+ value: recent_period_init,
+ slide: function( event, ui ) {
+ jQuery('#user'+userId+' .recent_period_infos').html(getRecentPeriodInfoFromIdx(ui.value));
+ },
+ stop: function( event, ui ) {
+ jQuery('#user'+userId+' input[name=recent_period]').val(recent_period_values[ui.value]).trigger('change');
+ }
+ });
+ }
+ else {
+ console.log('error loading user details');
+ }
+ },
+ error:function(XMLHttpRequest, textStatus, errorThrows) {
+ console.log('technical error loading user details');
+ }
+ });
+
+ return '<div id="user'+userId+'" class="userProperties"><img class="loading" src="themes/default/images/ajax-loader-small.gif"></div>';
+ }
+
+ /* change password */
+ jQuery(document).on('click', '.changePasswordOpen', function() {
+ var userId = jQuery(this).parentsUntil('form').parent().find('input[name=user_id]').val();
+
+ jQuery(this).hide();
+ jQuery('#user'+userId+' .changePasswordDone').hide();
+ jQuery('#user'+userId+' .changePassword').show();
+ jQuery('#user'+userId+' .changePassword input[type=text]').focus();
+
+ return false;
+ });
+
+ jQuery(document).on('click', '.changePassword a.updatePassword', function() {
+ var userId = jQuery(this).parentsUntil('form').parent().find('input[name=user_id]').val();
+
+ jQuery('#user'+userId+' .changePassword a .text').hide();
+ jQuery('#user'+userId+' .changePassword a img').show();
+
+ jQuery.ajax({
+ url: "ws.php?format=json&method=pwg.users.setInfo",
+ type:"POST",
+ data: {
+ user_id:userId,
+ password: jQuery('#user'+userId+' .changePassword input[type=text]').val()
+ },
+ beforeSend: function() {
+ jQuery('#user'+userId+' .changePassword input[type=text]').val("");
+ },
+ success:function(data) {
+ jQuery('#user'+userId+' .changePassword a .text').show();
+ jQuery('#user'+userId+' .changePassword a img').hide();
+ jQuery('#user'+userId+' .changePassword').hide();
+ jQuery('#user'+userId+' .changePasswordOpen').show();
+ jQuery('#user'+userId+' .changePasswordDone').show();
+ },
+ error:function(XMLHttpRequest, textStatus, errorThrows) {
+ }
+ });
+
+ return false;
+ });
+
+ jQuery(document).on('click', '.changePassword a.cancel', function() {
+ var userId = jQuery(this).parentsUntil('form').parent().find('input[name=user_id]').val();
+
+ jQuery('#user'+userId+' .changePassword').hide();
+ jQuery('#user'+userId+' .changePasswordOpen').show();
+
+ return false;
+ });
+
+ /* change username */
+ jQuery(document).on('click', '.changeUsernameOpen a', function() {
+ var userId = jQuery(this).parentsUntil('form').parent().find('input[name=user_id]').val();
+ var username = jQuery('#user'+userId+' .username').html();
+
+ jQuery('#user'+userId+' .changeUsernameOpen').hide();
+ jQuery('#user'+userId+' .changeUsername').show();
+ jQuery('#user'+userId+' .changeUsername input[type=text]').val(username).focus();
+
+ return false;
+ });
+
+ jQuery(document).on('click', 'a.updateUsername', function() {
+ var userId = jQuery(this).parentsUntil('form').parent().find('input[name=user_id]').val();
+
+ jQuery('#user'+userId+' .changeUsername a .text').hide();
+ jQuery('#user'+userId+' .changeUsername a img').show();
+
+ jQuery.ajax({
+ url: "ws.php?format=json&method=pwg.users.setInfo",
+ type:"POST",
+ data: {
+ user_id:userId,
+ username: jQuery('#user'+userId+' .changeUsername input[type=text]').val()
+ },
+ success:function(data) {
+ jQuery('#user'+userId+' .changeUsername a .text').show();
+ jQuery('#user'+userId+' .changeUsername a img').hide();
+ jQuery('#user'+userId+' .changeUsername').hide();
+ jQuery('#user'+userId+' .changeUsernameOpen').show();
+
+ var data = jQuery.parseJSON(data);
+ jQuery('#user'+userId+' .username').html(data.result.users[0].username);
+ },
+ error:function(XMLHttpRequest, textStatus, errorThrows) {
+ }
+ });
+
+ return false;
+ });
+
+ jQuery(document).on('click', '.changeUsername a.cancel', function() {
+ var userId = jQuery(this).parentsUntil('form').parent().find('input[name=user_id]').val();
+
+ jQuery('#user'+userId+' .changeUsername').hide();
+ jQuery('#user'+userId+' .changeUsernameOpen').show();
+
+ return false;
+ });
+
+ /* display the "save" button when a field changes */
+ jQuery(document).on('change', '.userProperties input, .userProperties select', function() {
+ var userId = jQuery(this).parentsUntil('form').parent().find('input[name=user_id]').val();
+
+ jQuery('#user'+userId+' input[type=submit]').show();
+ jQuery('#user'+userId+' .propertiesUpdateDone').hide();
+ });
+
+ /* delete user */
+ jQuery(document).on('click', '.userDelete a', function() {
+ if (!confirm("{/literal}{'Are you sure?'|translate|escape:javascript}{literal}")) {
+ return false;
+ }
+
+ var userId = jQuery(this).data('user_id');
+ var username = jQuery('#user'+userId+' .username').html();
+
+ jQuery.ajax({
+ url: "ws.php?format=json&method=pwg.users.delete",
+ type:"POST",
+ data: {
+ user_id:userId,
+ pwg_token:pwg_token
+ },
+ beforeSend: function() {
+ jQuery('#user'+userId+' .userDelete .loading').show();
+ },
+ success:function(data) {
+ oTable.fnDraw();
+ jQuery('#showAddUser .infos').html('&#x2714; User '+username+' deleted').show();
+ },
+ error:function(XMLHttpRequest, textStatus, errorThrows) {
+ jQuery('#user'+userId+' .userDelete .loading').hide();
+ }
+ });
+
+ return false;
+ });
+
+ jQuery(document).on('click', '.userProperties input[type=submit]', function() {
+ var userId = jQuery(this).data('user_id');
+
+ var formData = jQuery('#user'+userId+' form').serialize();
+
+ if (jQuery('#user'+userId+' form select[name="group_id[]"] option:selected').length == 0) {
+ formData += '&group_id=-1';
+ }
+
+ if (!jQuery('#user'+userId+' form input[name=enabled_high]').is(':checked')) {
+ formData += '&enabled_high=false';
+ }
+
+ if (!jQuery('#user'+userId+' form input[name=expand]').is(':checked')) {
+ formData += '&expand=false';
+ }
+
+ if (!jQuery('#user'+userId+' form input[name=show_nb_hits]').is(':checked')) {
+ formData += '&show_nb_hits=false';
+ }
+
+ if (!jQuery('#user'+userId+' form input[name=show_nb_comments]').is(':checked')) {
+ formData += '&show_nb_comments=false';
+ }
+
+ jQuery.ajax({
+ url: "ws.php?format=json&method=pwg.users.setInfo",
+ type:"POST",
+ data: formData,
+ beforeSend: function() {
+ jQuery('#user'+userId+' .submitWait').show();
+ },
+ success:function(data) {
+ jQuery('#user'+userId+' .submitWait').hide();
+ jQuery('#user'+userId+' input[type=submit]').hide();
+ jQuery('#user'+userId+' .propertiesUpdateDone').show();
+ },
+ error:function(XMLHttpRequest, textStatus, errorThrows) {
+ jQuery('#user'+userId+' .submitWait').hide();
+ }
+ });
+
+ return false;
+ });
+
+ /* Add event listener for opening and closing details
+ * Note that the indicator for showing which row is open is not controlled by DataTables,
+ * rather it is done here
+ */
+ jQuery(document).on('click', '#userList tbody td .openUserDetails', function() {
+ var nTr = this.parentNode.parentNode;
+ if (jQuery(this).hasClass('icon-cancel-circled')) {
+ /* This row is already open - close it */
+ jQuery(this)
+ .removeClass('icon-cancel-circled')
+ .addClass('icon-pencil')
+ .attr('title', "{/literal}{'Open user details'|translate|escape:'javascript'}{literal}")
+ .html("{/literal}{'edit'|translate|escape:'javascript'}{literal}")
+ ;
+
+ oTable.fnClose( nTr );
+ }
+ else {
+ /* Open this row */
+ jQuery(this)
+ .removeClass('icon-pencil')
+ .addClass('icon-cancel-circled')
+ .attr('title', "{/literal}{'Close user details'|translate|escape:'javascript'}{literal}")
+ .html("{/literal}{'close'|translate|escape:'javascript'}{literal}")
+ ;
+
+ oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
+ }
+ });
+
+
+ /* first column must be prefixed with the open/close icon */
+ var aoColumns = [
+ {
+ 'bVisible':false
+ },
+ {
+ "mRender": function(data, type, full) {
+ return '<label><input type="checkbox" data-user_id="'+full[0]+'"> '+data+'</label> <a title="{/literal}{'Open user details'|translate|escape:'javascript'}{literal}" class="icon-pencil openUserDetails">{/literal}{'edit'|translate}{literal}</a>';
+ }
+ }
+ ];
+
+ for (i=2; i<jQuery("#userList thead tr th").length; i++) {
+ aoColumns.push(null);
+ }
+
+ var oTable = jQuery('#userList').dataTable({
+ "iDisplayLength": 10,
+ "bDeferRender": true,
+ "bProcessing": true,
+ "bServerSide": true,
+ "sServerMethod": "POST",
+ "sAjaxSource": "admin/user_list_backend.php",
+ "oLanguage": {
+ "sProcessing": "{/literal}{'Loading...'|translate|escape:'javascript'}{literal}",
+ "sLengthMenu": sprintf("{/literal}{'Show %s users'|translate|escape:'javascript'}{literal}", '_MENU_'),
+ "sZeroRecords": "{/literal}{'No matching user found'|translate|escape:'javascript'}{literal}",
+ "sInfo": sprintf("{/literal}{'Showing %s to %s of %s users'|translate|escape:'javascript'}{literal}", '_START_', '_END_', '_TOTAL_'),
+ "sInfoEmpty": "{/literal}{'No matching user found'|translate|escape:'javascript'}{literal}",
+ "sInfoFiltered": sprintf("{/literal}{'(filtered from %s total users)'|translate|escape:'javascript'}{literal}", '_MAX_'),
+ "sSearch": '<span class="icon-search"></span>'+"{/literal}{'Search'|translate|escape:'javascript'}{literal}",
+ "sLoadingRecords": "{/literal}{'Loading...'|translate|escape:'javascript'}{literal}",
+ "oPaginate": {
+ "sFirst": "{/literal}{'First'|translate|escape:'javascript'}{literal}",
+ "sPrevious": '← '+"{/literal}{'Previous'|translate|escape:'javascript'}{literal}",
+ "sNext": "{/literal}{'Next'|translate|escape:'javascript'}{literal}"+' →',
+ "sLast": "{/literal}{'Last'|translate|escape:'javascript'}{literal}",
+ }
+ },
+ "fnDrawCallback": function( oSettings ) {
+ jQuery("#userList input[type=checkbox]").each(function() {
+ var user_id = jQuery(this).data("user_id");
+ jQuery(this).prop('checked', (selection.indexOf(user_id) != -1));
+ });
+ },
+ "aoColumns": aoColumns
+ });
+
+ /**
+ * Selection management
+ */
+ function checkSelection() {
+ if (selection.length > 0) {
+ jQuery("#forbidAction").hide();
+ jQuery("#permitAction").show();
+
+ jQuery("#applyOnDetails").text(
+ sprintf(
+ applyOnDetails_pattern,
+ selection.length
+ )
+ );
+
+ if (selection.length == allUsers.length) {
+ jQuery("#selectedMessage").text(
+ sprintf(
+ selectedMessage_all,
+ allUsers.length
+ )
+ );
+ }
+ else {
+ jQuery("#selectedMessage").text(
+ sprintf(
+ selectedMessage_pattern,
+ selection.length,
+ allUsers.length
+ )
+ );
+ }
+ }
+ else {
+ jQuery("#forbidAction").show();
+ jQuery("#permitAction").hide();
+
+ jQuery("#selectedMessage").text(
+ sprintf(
+ selectedMessage_none,
+ allUsers.length
+ )
+ );
+ }
+
+ jQuery("#applyActionBlock .infos").hide();
+ }
+
+ jQuery(document).on('change', '#userList input[type=checkbox]', function() {
+ var user_id = jQuery(this).data("user_id");
+
+ array_delete(selection, user_id);
+
+ if (jQuery(this).is(":checked")) {
+ selection.push(user_id);
+ }
+
+ checkSelection();
+ });
+
+ jQuery("#selectAll").click(function () {
+ selection = allUsers;
+ jQuery("#userList input[type=checkbox]").prop('checked', true);
+ checkSelection();
+ return false;
+ });
+
+ jQuery("#selectNone").click(function () {
+ selection = [];
+ jQuery("#userList input[type=checkbox]").prop('checked', false);
+ checkSelection();
+ return false;
+ });
+
+ jQuery("#selectInvert").click(function () {
+ var newSelection = [];
+ for(var i in allUsers)
+ {
+ if (selection.indexOf(allUsers[i]) == -1) {
+ newSelection.push(allUsers[i]);
+ }
+ }
+ selection = newSelection;
+
+ jQuery("#userList input[type=checkbox]").each(function() {
+ var user_id = jQuery(this).data("user_id");
+ jQuery(this).prop('checked', (selection.indexOf(user_id) != -1));
+ });
+
+ checkSelection();
+ return false;
+ });
+
+ /**
+ * Action management
+ */
+ jQuery("[id^=action_]").hide();
+
+ jQuery("select[name=selectAction]").change(function () {
+ jQuery("#applyActionBlock .infos").hide();
+
+ jQuery("[id^=action_]").hide();
+
+ jQuery("#action_"+$(this).prop("value")).show();
+
+ if (jQuery(this).val() != -1) {
+ jQuery("#applyActionBlock").show();
+ }
+ else {
+ jQuery("#applyActionBlock").hide();
+ }
+ });
+
+ jQuery("#permitAction input, #permitAction select").click(function() {
+ jQuery("#applyActionBlock .infos").hide();
+ });
+
+ jQuery("#applyAction").click(function() {
+ var action = jQuery("select[name=selectAction]").prop("value");
+ var method = 'pwg.users.setInfo';
+ var data = {
+ user_id: selection
+ };
+
+ switch (action) {
+ case 'delete':
+ if (!jQuery("input[name=confirm_deletion]").is(':checked')) {
+ alert(missingConfirm);
+ return false;
+ }
+ method = 'pwg.users.delete';
+ data.pwg_token = pwg_token;
+ break;
+ case 'group_associate':
+ method = 'pwg.groups.addUser';
+ data.group_id = jQuery("select[name=associate]").prop("value");
+ break;
+ case 'group_dissociate':
+ method = 'pwg.groups.deleteUser';
+ data.group_id = jQuery("select[name=dissociate]").prop("value");
+ break;
+ case 'status':
+ data.status = jQuery("select[name=status]").prop("value");
+ break;
+ case 'enabled_high':
+ data.enabled_high = jQuery("input[name=enabled_high]:checked").val();
+ break;
+ case 'level':
+ data.level = jQuery("select[name=level]").val();
+ break;
+ case 'nb_image_page':
+ data.nb_image_page = jQuery("input[name=nb_image_page]").val();
+ break;
+ case 'theme':
+ data.theme = jQuery("select[name=theme]").val();
+ break;
+ case 'language':
+ data.language = jQuery("select[name=language]").val();
+ break;
+ case 'recent_period':
+ data.recent_period = jQuery("input[name=recent_period]").val();
+ break;
+ case 'expand':
+ data.expand = jQuery("input[name=expand]:checked").val();
+ break;
+ case 'show_nb_comments':
+ data.show_nb_comments = jQuery("input[name=show_nb_comments]:checked").val();
+ break;
+ case 'show_nb_hits':
+ data.show_nb_hits = jQuery("input[name=show_nb_hits]:checked").val();
+ break;
+ default:
+ alert("Unexpected action");
+ return false;
+ }
+
+ jQuery.ajax({
+ url: "ws.php?format=json&method="+method,
+ type:"POST",
+ data: data,
+ beforeSend: function() {
+ jQuery("#applyActionLoading").show();
+ },
+ success:function(data) {
+ oTable.fnDraw();
+ jQuery("#applyActionLoading").hide();
+ jQuery("#applyActionBlock .infos").show();
+
+ if (action == 'delete') {
+ var allUsers_new = [];
+ for(var i in allUsers)
+ {
+ if (selection.indexOf(allUsers[i]) == -1) {
+ allUsers_new.push(allUsers[i]);
+ }
+ }
+ allUsers = allUsers_new;
+ console.log('allUsers_new.length = '+allUsers_new.length);
+ selection = [];
+ checkSelection();
+ }
+ },
+ error:function(XMLHttpRequest, textStatus, errorThrows) {
+ jQuery("#applyActionLoading").hide();
+ }
+ });
+
+ return false;
+ });
+
+});
+{/literal}{/footer_script}
+
+{html_style}{literal}
+.dataTables_wrapper, .dataTables_info {clear:none;}
+table.dataTable {clear:right;padding-top:10px;}
+.dataTable td img {margin-bottom: -6px;margin-left: -6px;}
+.paginate_enabled_previous, .paginate_enabled_previous:hover, .paginate_disabled_previous, .paginate_enabled_next, .paginate_enabled_next:hover, .paginate_disabled_next {background:none;}
+.paginate_enabled_previous, .paginate_enabled_next {color:#005E89 !important;}
+.paginate_enabled_previous:hover, .paginate_enabled_next:hover {color:#D54E21 !important; text-decoration:underline !important;}
+
+.paginate_disabled_next, .paginate_enabled_next {padding-right:3px;}
+.bulkAction {margin-top:10px;}
+#addUserForm p {margin-left:0;}
+#applyActionBlock .actionButtons {margin-left:0;}
+span.infos, span.errors {background-image:none; padding:2px 5px; margin:0;border-radius:5px;}
+
+.userStats {margin-top:10px;}
+.recent_period_infos {margin-left:10px;}
+.nb_image_page, .recent_period {width:340px;margin-top:5px;}
+#action_recent_period .recent_period {display:inline-block;}
+{/literal}{/html_style}
+
<div class="titrePage">
<h2>{'User list'|@translate}</h2>
</div>
-<form class="filter" method="post" name="add_user" action="{$F_ADD_ACTION}">
+<p class="showCreateAlbum" id="showAddUser">
+ <a href="#" id="addUser" class="icon-plus-circled">{'Add a user'|translate}</a>
+ <span class="infos" style="display:none"></span>
+</p>
+
+<form id="addUserForm" style="display:none" method="post" name="add_user" action="{$F_ADD_ACTION}">
<fieldset>
<legend>{'Add a user'|@translate}</legend>
- <label>{'Username'|@translate} <input type="text" name="login" maxlength="50" size="20"></label>
- {if $Double_Password}
- <label>{'Password'|@translate} <input type="password" name="password"></label>
- <label>{'Confirm Password'|@translate} <input type="password" name="password_conf" id="password_conf"></label>
- {else}
- <label>{'Password'|@translate} <input type="text" name="password"></label>
- {/if}
- <label>{'Email address'|@translate} <input type="text" name="email"></label>
- <label>{'Send connection settings by email'|@translate} <input type="checkbox" name="send_password_by_mail" value="1" checked="checked"></label>
- <label>&nbsp; <input class="submit" type="submit" name="submit_add" value="{'Submit'|@translate}"></label>
- </fieldset>
-</form>
-
-<form class="filter" method="get" name="filter" action="{$F_FILTER_ACTION}">
-<fieldset>
- <legend>{'Filter'|@translate}</legend>
- <input type="hidden" name="page" value="user_list">
-
- <label>{'Username'|@translate} <input type="text" name="username" value="{$F_USERNAME}"></label>
-
- <label>
- {'status'|@translate}
- {html_options name=status options=$status_options selected=$status_selected}
- </label>
-
- <label>
- {'Group'|@translate}
- {html_options name=group options=$group_options selected=$group_selected}
- </label>
- <label>
- {'Sort by'|@translate}
- {html_options name=order_by options=$order_options selected=$order_selected}
- </label>
+ <p>
+ <strong>{'Username'|translate}</strong><br>
+ <input type="text" name="username" maxlength="50" size="20">
+ </p>
- <label>
- {'Sort order'|@translate}
- {html_options name=direction options=$direction_options selected=$direction_selected}
- </label>
+ <p>
+ <strong>{'Password'|translate}</strong><br>
+ <input type="{if $Double_Password}password{else}text{/if}" name="password">
+ </p>
+
+{if $Double_Password}
+ <p>
+ <strong>{'Confirm Password'|@translate}</strong><br>
+ <input type="password" name="password_confirm">
+ </p>
+{/if}
- <label>
- &nbsp;
- <input class="submit" type="submit" value="{'Submit'|@translate}">
- </label>
+ <p>
+ <strong>{'Email address'|@translate}</strong><br>
+ <input type="text" name="email">
+ </p>
-</fieldset>
+ <p>
+ <label><input type="checkbox" name="send_password_by_mail"> <strong>{'Send connection settings by email'|@translate}</strong></label>
+ </p>
+ <p class="actionButtons">
+ <input class="submit" name="submit_add" type="submit" value="{'Submit'|@translate}">
+ <a href="#" id="addUserClose">{'Cancel'|@translate}</a>
+ <span class="loading" style="display:none"><img src="themes/default/images/ajax-loader-small.gif"></span>
+ <span class="errors" style="display:none"></span>
+ </p>
+ </fieldset>
</form>
<form method="post" name="preferences" action="">
-{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
-
-<table class="table2" width="97%">
+<table id="userList">
<thead>
- <tr class="throw">
- <td>&nbsp;</td>
- <td>{'Username'|@translate}</td>
- <td>{'User status'|@translate}</td>
- <td>{'Email address'|@translate}</td>
- <td>{'Groups'|@translate}</td>
- <td>{'Properties'|@translate}</td>
- {if not empty($plugin_user_list_column_titles)}
- {foreach from=$plugin_user_list_column_titles item=title}
- <td>{$title}</td>
- {/foreach}
- {/if}
- <td>{'Actions'|@translate}</td>
+ <tr>
+ <th>id</th>
+ <th>{'Username'|@translate}</th>
+ <th>{'Status'|@translate}</th>
+ <th>{'Email address'|@translate}</th>
+ <th>{'registration date'|@translate}</th>
</tr>
</thead>
-
- {foreach from=$users item=user name=users_loop}
- <tr class="{if $smarty.foreach.users_loop.index is odd}row1{else}row2{/if}">
- <td><input type="checkbox" name="selection[]" value="{$user.ID}" {$user.CHECKED} id="selection-{$user.ID}"></td>
- <td><label for="selection-{$user.ID}">{$user.USERNAME}</label></td>
- <td>{$user.STATUS}</td>
- <td>{$user.EMAIL}</td>
- <td>{$user.GROUPS}</td>
- <td>{$user.PROPERTIES}</td>
- {foreach from=$user.plugin_columns item=data}
- <td>{$data}</td>
- {/foreach}
- <td style="text-align:center;">
- <a href="{$user.U_PERM}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/permissions.png" style="border:none" alt="{'Permissions'|@translate}" title="{'Permissions'|@translate}"></a>
- <a href="{$user.U_PROFILE}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png" style="border:none" alt="{'Profile'|@translate}" title="{'Profile'|@translate}"></a>
- {foreach from=$user.plugin_actions item=data}
- {$data}
- {/foreach}
- </td>
- </tr>
- {/foreach}
</table>
-{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
+<div style="clear:right"></div>
-{* delete the selected users ? *}
-<fieldset>
- <legend>{'Deletions'|@translate}</legend>
- <label><input type="checkbox" name="confirm_deletion" value="1"> {'confirm'|@translate}</label>
- <input class="submit" type="submit" value="{'Delete selected users'|@translate}" name="delete">
-</fieldset>
-
-<fieldset>
- <legend>{'Status'|@translate}</legend>
-
- <table>
- <tr>
- <td>{'Status'|@translate}</td>
- <td>
- <label><input type="radio" name="status_action" value="leave" checked="checked"> {'leave'|@translate}</label>
- <label><input type="radio" name="status_action" value="set" id="status_action_set"> {'set to'|@translate}</label>
- <select onchange="document.getElementById('status_action_set').checked = true;" name="status" size="1">
- {html_options options=$pref_status_options selected=$pref_status_selected}
- </select>
- </td>
- </tr>
- </table>
-</fieldset>
+<p class="checkActions">
+ {'Select:'|@translate}
+ <a href="#" id="selectAll">{'All'|@translate}</a>,
+ <a href="#" id="selectNone">{'None'|@translate}</a>,
+ <a href="#" id="selectInvert">{'Invert'|@translate}</a>
-{* form to set properties for many users at once *}
-<fieldset>
- <legend>{'Groups'|@translate}</legend>
+ <span id="selectedMessage"></span>
+</p>
-<table>
+<fieldset id="action">
+ <legend>{'Action'|@translate}</legend>
- <tr>
- <td>{'associate to group'|@translate}</td>
- <td>
- {html_options name=associate options=$association_options selected=$associate_selected}
- </td>
- </tr>
+ <div id="forbidAction"{if count($selection) != 0} style="display:none"{/if}>{'No user selected, no action possible.'|@translate}</div>
+ <div id="permitAction"{if count($selection) == 0} style="display:none"{/if}>
- <tr>
- <td>{'dissociate from group'|@translate}</td>
- <td>
- {html_options name=dissociate options=$association_options selected=$dissociate_selected}
- </td>
- </tr>
+ <select name="selectAction">
+ <option value="-1">{'Choose an action'|@translate}</option>
+ <option disabled="disabled">------------------</option>
+ <option value="delete" class="icon-trash">{'Delete selected users'|@translate}</option>
+ <option value="status">{'Status'|@translate}</option>
+ <option value="group_associate">{'associate to group'|translate}</option>
+ <option value="group_dissociate">{'dissociate from group'|@translate}</option>
+ <option value="enabled_high">{'High definition enabled'|@translate}</option>
+ <option value="level">{'Privacy level'|@translate}</option>
+ <option value="nb_image_page">{'Number of photos per page'|@translate}</option>
+ <option value="theme">{'Theme'|@translate}</option>
+ <option value="language">{'Language'|@translate}</option>
+ <option value="recent_period">{'Recent period'|@translate}</option>
+ <option value="expand">{'Expand all albums'|@translate}</option>
+{if $ACTIVATE_COMMENTS}
+ <option value="show_nb_comments">{'Show number of comments'|@translate}</option>
+{/if}
+ <option value="show_nb_hits">{'Show number of hits'|@translate}</option>
+ </select>
-</table>
+ {* delete *}
+ <div id="action_delete" class="bulkAction">
+ <p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p>
+ </div>
-</fieldset>
+ {* status *}
+ <div id="action_status" class="bulkAction">
+ <select name="status">
+ {html_options options=$pref_status_options selected=$pref_status_selected}
+ </select>
+ </div>
-{* Properties *}
-<fieldset>
- <legend>{'Properties'|@translate}</legend>
+ {* group_associate *}
+ <div id="action_group_associate" class="bulkAction">
+ {html_options name=associate options=$association_options selected=$associate_selected}
+ </div>
- <table>
+ {* group_dissociate *}
+ <div id="action_group_dissociate" class="bulkAction">
+ {html_options name=dissociate options=$association_options selected=$dissociate_selected}
+ </div>
- <tr>
- <td>{'High definition enabled'|@translate}</td>
- <td>
- <label><input type="radio" name="enabled_high" value="leave" checked="checked"> {'leave'|@translate}</label>
- / {'set to'|@translate}
- <label><input type="radio" name="enabled_high" value="true">{'Yes'|@translate}</label>
- <label><input type="radio" name="enabled_high" value="false">{'No'|@translate}</label>
- </td>
- </tr>
+ {* enabled_high *}
+ <div id="action_enabled_high" class="bulkAction">
+ <label><input type="radio" name="enabled_high" value="true">{'Yes'|@translate}</label>
+ <label><input type="radio" name="enabled_high" value="false" checked="checked">{'No'|@translate}</label>
+ </div>
- <tr>
- <td>{'Privacy level'|@translate}</td>
- <td>
- <label><input type="radio" name="level_action" value="leave" checked="checked">{'leave'|@translate}</label>
- <label><input type="radio" name="level_action" value="set" id="level_action_set">{'set to'|@translate}</label>
- <select onchange="document.getElementById('level_action_set').checked = true;" name="level" size="1">
- {html_options options=$level_options selected=$level_selected}
- </select>
- </td>
- </tr>
- </table>
+ {* level *}
+ <div id="action_level" class="bulkAction">
+ <select name="level" size="1">
+ {html_options options=$level_options selected=$level_selected}
+ </select>
+ </div>
-</fieldset>
+ {* nb_image_page *}
+ <div id="action_nb_image_page" class="bulkAction">
+ <strong class="nb_image_page_infos"></strong>
+ <div class="nb_image_page"></div>
+ <input type="hidden" name="nb_image_page" value="{$NB_IMAGE_PAGE}">
+ </div>
-{* preference *}
-<fieldset>
- <legend>{'Preferences'|@translate}</legend>
-
-<table>
- <tr>
- <td>{'Number of photos per page'|@translate}</td>
- <td>
- <label><input type="radio" name="nb_image_page_action" value="leave" checked="checked"> {'leave'|@translate}</label>
- <label><input type="radio" name="nb_image_page_action" value="set" id="nb_image_page_action_set"> {'set to'|@translate}</label>
- <input onmousedown="document.getElementById('nb_image_page_action_set').checked = true;"
- size="4" maxlength="3" type="text" name="nb_image_page" value="{$NB_IMAGE_PAGE}">
- </td>
- </tr>
-
- <tr>
- <td>{'Interface theme'|@translate}</td>
- <td>
- <label><input type="radio" name="theme_action" value="leave" checked="checked"> {'leave'|@translate}</label>
- <label><input type="radio" name="theme_action" value="set" id="theme_action_set"> {'set to'|@translate}</label>
- <select onchange="document.getElementById('theme_action_set').checked = true;" name="theme" size="1">
+ {* theme *}
+ <div id="action_theme" class="bulkAction">
+ <select name="theme" size="1">
{html_options options=$theme_options selected=$theme_selected}
</select>
- </td>
- </tr>
-
- <tr>
- <td>{'Language'|@translate}</td>
- <td>
- <label><input type="radio" name="language_action" value="leave" checked="checked"> {'leave'|@translate}</label>
- <label><input type="radio" name="language_action" value="set" id="language_action_set"> {'set to'|@translate}</label>
- <select onchange="document.getElementById('language_action_set').checked = true;" name="language" size="1">
+ </div>
+
+ {* language *}
+ <div id="action_language" class="bulkAction">
+ <select name="language" size="1">
{html_options options=$language_options selected=$language_selected}
</select>
- </td>
- </tr>
-
- <tr>
- <td>{'Recent period'|@translate}</td>
- <td>
- <label><input type="radio" name="recent_period_action" value="leave" checked="checked"> {'leave'|@translate}</label>
- <label><input type="radio" name="recent_period_action" value="set" id="recent_period_action_set"> {'set to'|@translate}</label>
- <input onmousedown="document.getElementById('recent_period_action_set').checked = true;"
- type="text" size="3" maxlength="2" name="recent_period" value="{$RECENT_PERIOD}">
- </td>
- </tr>
-
- <tr>
- <td>{'Expand all albums'|@translate}</td>
- <td>
- <label><input type="radio" name="expand" value="leave" checked="checked"> {'leave'|@translate}</label>
- / {'set to'|@translate}
+ </div>
+
+ {* recent_period *}
+ <div id="action_recent_period" class="bulkAction">
+ <div class="recent_period"></div>
+ <span class="recent_period_infos"></span>
+ <input type="hidden" name="recent_period" value="{$RECENT_PERIOD}">
+ </div>
+
+ {* expand *}
+ <div id="action_expand" class="bulkAction">
<label><input type="radio" name="expand" value="true">{'Yes'|@translate}</label>
- <label><input type="radio" name="expand" value="false">{'No'|@translate}</label>
- </td>
- </tr>
+ <label><input type="radio" name="expand" value="false" checked="checked">{'No'|@translate}</label>
+ </div>
-{if $ACTIVATE_COMMENTS}
- <tr>
- <td>{'Show number of comments'|@translate}</td>
- <td>
- <label><input type="radio" name="show_nb_comments" value="leave" checked="checked"> {'leave'|@translate}</label>
- / {'set to'|@translate}
+ {* show_nb_comments *}
+ <div id="action_show_nb_comments" class="bulkAction">
<label><input type="radio" name="show_nb_comments" value="true">{'Yes'|@translate}</label>
- <label><input type="radio" name="show_nb_comments" value="false">{'No'|@translate}</label>
- </td>
- </tr>
-{/if}
+ <label><input type="radio" name="show_nb_comments" value="false" checked="checked">{'No'|@translate}</label>
+ </div>
- <tr>
- <td>{'Show number of hits'|@translate}</td>
- <td>
- <label><input type="radio" name="show_nb_hits" value="leave" checked="checked"> {'leave'|@translate}</label>
- / {'set to'|@translate}
+ {* show_nb_hits *}
+ <div id="action_show_nb_hits" class="bulkAction">
<label><input type="radio" name="show_nb_hits" value="true">{'Yes'|@translate}</label>
- <label><input type="radio" name="show_nb_hits" value="false">{'No'|@translate}</label>
- </td>
- </tr>
+ <label><input type="radio" name="show_nb_hits" value="false" checked="checked">{'No'|@translate}</label>
+ </div>
-</table>
+ <p id="applyActionBlock" style="display:none" class="actionButtons">
+ <input id="applyAction" class="submit" type="submit" value="{'Apply action'|@translate}" name="submit"> <span id="applyOnDetails"></span>
+ <span id="applyActionLoading" style="display:none"><img src="themes/default/images/ajax-loader-small.gif"></span>
+ <span class="infos" style="display:none">&#x2714; {'Users modified'|translate}</span>
+ </p>
+ </div> {* #permitAction *}
</fieldset>
-<p>
- {'target'|@translate}
- <label><input type="radio" name="target" value="all"> {'all'|@translate}</label>
- <label><input type="radio" name="target" value="selection" checked="checked"> {'selection'|@translate}</label>
-</p>
+</form>
-<p>
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="pref_submit">
- <input class="submit" type="reset" value="{'Reset'|@translate}" name="pref_reset">
-</p>
+{* Underscore Template Definition *}
+<script type="text/template" class="userDetails">
+<form>
+ <div class="userActions">
+<% if (!user.isGuest) { %>
+ <span class="changePasswordDone infos" style="display:none">&#x2714; {'Password updated'|translate}</span>
+ <span class="changePassword" style="display:none">{'New password'|translate} <input type="text"> <a href="#" class="buttonLike updatePassword"><img src="themes/default/images/ajax-loader-small.gif" style="margin-bottom:-1px;margin-left:1px;display:none;"><span class="text">{'Submit'|translate}</span></a> <a href="#" class="cancel">{'Cancel'|translate}</a></span>
+ <a class="icon-key changePasswordOpen" href="#">{'Change password'|translate}</a>
+ <br>
+<% } %>
-</form>
+ <a target="_blank" href="admin.php?page=user_perm&amp;user_id=<%- user.id %>" class="icon-lock">{'Permissions'|translate}</a>
+
+<% if (!user.isProtected) { %>
+ <br><span class="userDelete"><img class="loading" src="themes/default/images/ajax-loader-small.gif" style="display:none;"><a href="#" class="icon-trash" data-user_id="<%- user.id %>">{'Delete'|translate}</a></span>
+<% } %>
+
+ </div>
+
+ <span class="changeUsernameOpen"><strong class="username"><%- user.username %></strong>
+
+<% if (!user.isGuest) { %>
+ <a href="#" class="icon-pencil">{'Change username'|translate}</a></span>
+ <span class="changeUsername" style="display:none">
+ <input type="text"> <a href="#" class="buttonLike updateUsername"><img src="themes/default/images/ajax-loader-small.gif" style="margin-bottom:-1px;margin-left:1px;display:none;"><span class="text">{'Submit'|translate}</span></a> <a href="#" class="cancel">{'Cancel'|translate}</a>
+<% } %>
+
+ </span>
+
+ <div class="userStats"><%- user.registeredOn_string %><br><%- user.lastVisit_string %></div>
-<script type="text/javascript">// <![CDATA[{literal}
-jQuery("form:last").submit( function() {
- if ( jQuery("input[name=target][value=selection]:checked", this).length > 0 )
- if ( jQuery("input[name='selection[]']:checked", this).length == 0)
- {
- alert( {/literal}"{'Select at least one user'|@translate|escape:javascript}"{literal} );
- return false;
- }
- return true;
-}
-);{/literal}
-// ]]>
+ <div class="userPropertiesContainer">
+ <input type="hidden" name="user_id" value="<%- user.id %>">
+ <div class="userPropertiesSet">
+ <div class="userPropertiesSetTitle">{'Properties'|translate}</div>
+
+ <div class="userProperty"><strong>{'Email address'|translate}</strong>
+ <br>
+<% if (!user.isGuest) { %>
+ <input name="email" type="text" value="<%- user.email %>">
+<% } else { %>
+ {'N/A'|translate}
+<% } %>
+ </div>
+
+ <div class="userProperty"><strong>{'Status'|translate}</strong>
+ <br>
+<% if (!user.isProtected) { %>
+ <select name="status">
+ <% _.each( user.statusOptions, function( option ){ %>
+ <option value="<%- option.value%>" <% if (option.isSelected) { %>selected="selected"<% } %>><%- option.label %></option>
+ <% }); %>
+ </select>
+<% } else { %>
+ <%- user.statusLabel %>
+<% } %>
+ </div>
+
+ <div class="userProperty"><strong>{'Privacy level'|translate}</strong>
+ <br>
+ <select name="level">
+<% _.each( user.levelOptions, function( option ){ %>
+ <option value="<%- option.value%>" <% if (option.isSelected) { %>selected="selected"<% } %>><%- option.label %></option>
+<% }); %>
+ </select>
+ </div>
+
+ <div class="userProperty"><label><input type="checkbox" name="enabled_high"<% if (user.enabled_high == 'true') { %> checked="checked"<% } %>> <strong>{'High definition enabled'|translate}</strong></label></div>
+
+ <div class="userProperty"><strong>{'Groups'|translate}</strong><br>
+ <select multiple class="chzn-select" style="width:340px;" name="group_id[]">
+<% _.each( user.groupOptions, function( option ){ %>
+ <option value="<%- option.value%>" <% if (option.isSelected) { %>selected="selected"<% } %>><%- option.label %></option>
+<% }); %>
+ </select>
+ </div>
+ </div>
+
+ <div class="userPropertiesSet userPrefs">
+ <div class="userPropertiesSetTitle">{'Preferences'|translate}</div>
+
+ <div class="userProperty"><strong class="nb_image_page_infos"></strong>
+ <div class="nb_image_page"></div>
+ <input type="hidden" name="nb_image_page" value="<%- user.nb_image_page %>">
+ </div>
+
+ <div class="userProperty"><strong>{'Theme'|translate}</strong><br>
+ <select name="theme">
+<% _.each( user.themeOptions, function( option ){ %>
+ <option value="<%- option.value%>" <% if (option.isSelected) { %>selected="selected"<% } %>><%- option.label %></option>
+<% }); %>
+ </select>
+ </div>
+
+ <div class="userProperty"><strong>{'Language'|translate}</strong><br>
+ <select name="language">
+<% _.each( user.languageOptions, function( option ){ %>
+ <option value="<%- option.value%>" <% if (option.isSelected) { %>selected="selected"<% } %>><%- option.label %></option>
+<% }); %>
+ </select>
+ </div>
+
+ <div class="userProperty"><strong>{'Recent period'|translate}</strong> <span class="recent_period_infos"></span>
+ <div class="recent_period"></div>
+ <input type="hidden" name="recent_period" value="<%- user.recent_period %>">
+ </div>
+
+ <div class="userProperty"><label><input type="checkbox" name="expand"<% if (user.expand == 'true') { %> checked="checked"<% }%>> <strong>{'Expand all albums'|translate}</strong></label></div>
+
+ <div class="userProperty"><label><input type="checkbox" name="show_nb_comments"<% if (user.show_nb_comments == 'true') { %> checked="checked"<% }%>> <strong>{'Show number of comments'|translate}</strong></label></div>
+
+ <div class="userProperty"><label><input type="checkbox" name="show_nb_hits"<% if (user.show_nb_hits == 'true') { %> checked="checked"<% }%>> <strong>{'Show number of hits'|translate}</strong></label></div>
+
+ </div>
+
+ <div style="clear:both"></div>
+ </div> {* userPropertiesContainer *}
+
+ <span class="infos propertiesUpdateDone" style="display:none">&#x2714; <%- user.updateString %></span>
+
+ <input type="submit" value="{'Update user'|translate|escape:html}" style="display:none;" data-user_id="<%- user.id %>">
+ <img class="submitWait" src="themes/default/images/ajax-loader-small.gif" style="display:none">
+</form>
</script>
-