Initial commit: Backup der Webseiten

- zoesch.de
- blitzkiste.net
- gruene-hassberge (norbert.zoesch.de)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Felix Zösch
2025-12-13 01:17:15 +01:00
commit 07c290a453
4607 changed files with 1202735 additions and 0 deletions

View File

@@ -0,0 +1,194 @@
{footer_script}
jQuery.fn.lightAccordion = function(options) {
var settings = $.extend({
header: 'dt',
content: 'dd',
active: 0
}, options);
return this.each(function() {
var self = jQuery(this);
var contents = self.find(settings.content),
headers = self.find(settings.header);
contents.not(contents[settings.active]).hide();
self.on('click', settings.header, function() {
var content = jQuery(this).next(settings.content);
content.slideDown();
contents.not(content).slideUp();
});
});
};
$('#menubar').lightAccordion({
active: {$ACTIVE_MENU}
});
/* in case we have several infos/errors/warnings display bullets */
jQuery(document).ready(function() {
var eiw = ["infos","erros","warnings", "messages"];
for (var i = 0; i < eiw.length; i++) {
var boxType = eiw[i];
if (jQuery("."+boxType+" ul li").length > 1) {
jQuery("."+boxType+" ul li").css("list-style-type", "square");
jQuery("."+boxType+" .eiw-icon").css("margin-right", "20px");
}
}
});
{/footer_script}
<div id="menubar">
<div id="adminHome"><a href="{$U_ADMIN}"><i class="icon-television"></i> {'Dashboard'|@translate}</a></div>
<dl>
<dt><i class="icon-picture"> </i><span>{'Photos'|@translate}&nbsp;</span></dt>
<dd>
<ul>
<li><a href="{$U_ADD_PHOTOS}"><i class="icon-plus-circled"></i>{'Add'|@translate}</a></li>
<li><a href="{$U_RATING}"><i class="icon-star"></i>{'Rating'|@translate}</a></li>
<li><a href="{$U_TAGS}"><i class="icon-tags"></i>{'Tags'|@translate}</a></li>
<li><a href="{$U_RECENT_SET}"><i class="icon-clock"></i>{'Recent photos'|@translate}</a></li>
<li><a href="{$U_BATCH}"><i class="icon-pencil"></i>{'Batch Manager'|@translate}</a></li>
{if $NB_PHOTOS_IN_CADDIE > 0}
<li><a href="{$U_CADDIE}"><i class="icon-flag"></i>{'Caddie'|@translate}<span class="adminMenubarCounter">{$NB_PHOTOS_IN_CADDIE}</span></a></li>
{/if}
{if $NB_ORPHANS > 0}
<li><a href="{$U_ORPHANS}"><i class="icon-heart-broken"></i>{'Orphans'|@translate}<span class="adminMenubarCounter">{$NB_ORPHANS}</span></a></li>
{/if}
</ul>
</dd>
</dl>
<dl>
<dt><i class="icon-sitemap"> </i><span>{'Albums'|@translate}&nbsp;</span></dt>
<dd>
<ul>
<li><a href="{$U_CATEGORIES}"><i class="icon-folder-open"></i>{'Manage'|@translate}</a></li>
<li><a href="{$U_CAT_OPTIONS}"><i class="icon-pencil"></i>{'Properties'|@translate}</a></li>
</ul>
</dd>
</dl>
<dl>
<dt><i class="icon-users"> </i><span>{'Users'|@translate}&nbsp;</span></dt>
<dd>
<ul>
<li><a href="{$U_USERS}"><i class="icon-user-add"></i>{'Manage'|@translate}</a></li>
<li><a href="{$U_GROUPS}"><i class="icon-group"></i>{'Groups'|@translate}</a></li>
<li><a href="{$U_NOTIFICATION_BY_MAIL}"><i class="icon-mail-1"></i>{'Notification'|@translate}</a></li>
</ul>
</dd>
</dl>
<dl>
<dt><i class="icon-puzzle"> </i><span>{'Plugins'|@translate}&nbsp;</span></dt>
<dd>
<ul>
<li><a href="{$U_PLUGINS}"><i class="icon-equalizer"></i>{'Manage'|@translate}</a></li>
</ul>
{if !empty($plugin_menu_items)}
<div id="pluginsMenuSeparator"></div>
<ul class="scroll">
{foreach from=$plugin_menu_items item=menu_item}
<li><a href="{$menu_item.URL}">{$menu_item.NAME}</a></li>
{/foreach}
</ul>
{/if}
</dd>
</dl>
<dl>
<dt><i class="icon-wrench"> </i><span>{'Tools'|@translate}&nbsp;</span></dt>
<dd>
<ul>
{if $ENABLE_SYNCHRONIZATION}
<li><a href="{$U_CAT_UPDATE}"><i class="icon-exchange"></i>{'Synchronize'|@translate}</a></li>
<li><a href="{$U_SITE_MANAGER}"><i class="icon-flow-branch"></i>{'Site manager'|@translate}</a></li>
{/if}
<li><a href="{$U_HISTORY_STAT}"><i class="icon-signal"></i>{'History'|@translate}</a></li>
<li><a href="{$U_MAINTENANCE}"><i class="icon-tools"></i>{'Maintenance'|@translate}</a></li>
{if isset($U_COMMENTS)}
<li><a href="{$U_COMMENTS}"><i class="icon-chat"></i>{'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}"><i class="icon-arrows-cw"></i>{'Updates'|@translate}</a></li>
</ul>
</dd>
</dl>
<dl>
<dt><i class="icon-cog"> </i><span>{'Configuration'|@translate}&nbsp;</span></dt>
<dd>
<ul>
<li><a href="{$U_CONFIG_GENERAL}"><i class="icon-cog-alt"></i>{'Options'|@translate}</a></li>
<li><a href="{$U_CONFIG_MENUBAR}"><i class="icon-menu"></i>{'Menu Management'|@translate}</a></li>
<li><a href="{$U_CONFIG_EXTENTS}"><i class="icon-code"></i>{'Templates'|@translate}</a></li>
<li><a href="{$U_CONFIG_LANGUAGES}"><i class="icon-language"></i>{'Languages'|@translate}</a></li>
<li><a href="{$U_CONFIG_THEMES}"><i class="icon-brush"></i>{'Themes'|@translate}</a></li>
</ul>
</dd>
</dl>
</div> <!-- menubar -->
<div id="content" class="content">
{if isset($TABSHEET)}
{$TABSHEET}
{/if}
{if isset($U_HELP)}
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
<ul class="HelpActions">
<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}
<div class="eiw">
{if isset($errors)}
<div class="errors">
<i class="eiw-icon icon-cancel"></i>
<ul>
{foreach from=$errors item=error}
<li>{$error}</li>
{/foreach}
</ul>
</div>
{/if}
{if isset($infos)}
<div class="infos">
<i class="eiw-icon icon-ok"></i>
<ul>
{foreach from=$infos item=info}
<li>{$info}</li>
{/foreach}
</ul>
</div>
{/if}
{if isset($warnings)}
<div class="warnings">
<i class="eiw-icon icon-attention"></i>
<ul>
{foreach from=$warnings item=warning}
<li>{$warning}</li>
{/foreach}
</ul>
</div>
{/if}
{if isset($messages)}
<div class="messages">
<i class="eiw-icon icon-info-circled-1"></i>
<ul>
{foreach from=$messages item=message}
<li>{$message}</li>
{/foreach}
</ul>
</div>
{/if}
</div> {* .eiw *}
{$ADMIN_CONTENT}
</div>

View File

@@ -0,0 +1,128 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
{footer_script}
jQuery(document).ready(function() {
jQuery("input[name=who]").change(function () {
checkWhoOptions();
});
checkWhoOptions();
function checkWhoOptions() {
var option = jQuery("input[name=who]:checked").val();
jQuery(".who_option").hide();
jQuery(".who_" + option).show();
}
jQuery(".who_option select").selectize({
plugins: ['remove_button']
});
jQuery("form#categoryNotify").submit(function(e) {
var who_selected = false;
var who_option = jQuery("input[name=who]:checked").val();
if (jQuery(".who_" + who_option + " select").length > 0) {
if (jQuery(".who_" + who_option + " select option:selected").length > 0) {
who_selected = true;
}
}
if (!who_selected) {
jQuery(".actionButtons .errors").show();
e.preventDefault();
}
else {
jQuery(".actionButtons .errors").hide();
console.log("form can be submited");
}
});
});
{/footer_script}
{html_style}
.who_option {
margin-top:5px;
}
span.errors {
background-image:none;
padding:2px 5px;
margin:0;
border-radius:5px;
}
{/html_style}
<div class="titrePage">
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<form action="{$F_ACTION}" method="post" id="categoryNotify">
<fieldset id="emailCatInfo">
<legend>{'Send mail to users'|@translate}</legend>
<p>
<strong>{'Recipients'|@translate}</strong>
<label class="font-checkbox">
<span class="icon-dot-circled"></span>
<input type="radio" name="who" value="group" checked="checked">
{'Group'|translate}
</label>
<label class="font-checkbox">
<span class="icon-dot-circled"></span>
<input type="radio" name="who" value="users">
{'Users'|translate}
</label>
</p>
<p class="who_option who_group">
{if isset($group_mail_options)}
<select name="group" placeholder="{'Type in a search term'|translate}" style="width:524px;">
{html_options options=$group_mail_options}
</select>
{elseif isset($no_group_in_gallery) and $no_group_in_gallery}
{'There is no group in this gallery.'|@translate} <a href="admin.php?page=group_list" class="externalLink">{'Group management'|@translate}</a>
{else}
{'No group is permitted to see this private album'|@translate}.
<a href="{$permission_url}" class="externalLink">{'Permission management'|@translate}</a>
{/if}
</p>
<p class="who_option who_users">
{if isset($user_options)}
<select name="users[]" multiple placeholder="{'Type in a search term'|translate}" style="width:524px;">
{html_options options=$user_options selected=$user_options_selected}
</select>
{else}
{'No user is permitted to see this private album'|@translate}.
<a href="{$permission_url}" class="externalLink">{'Permission management'|@translate}</a>
{/if}
</p>
<p>
<strong>{'Complementary mail content'|@translate}</strong>
<br>
<textarea cols="50" rows="5" name="mail_content" id="mail_content" class="description">{$MAIL_CONTENT}</textarea>
</p>
{if isset($auth_key_duration)}
<p>
{'Each email sent will contain its own automatic authentication key on links, valid for %s.'|translate:$auth_key_duration}
<br>{'For security reason, authentication keys do not work for administrators.'|translate}
</p>
{/if}
<p class="actionButtons">
<button name="submitEmail" type="submit" class="buttonLike">
<i class="icon-mail"></i> {'Send'|translate}
</button>
<span class="errors" style="display:none">&#x2718; {'No recipient selected'|translate}</span>
</p>
</fieldset>
</form>

View File

@@ -0,0 +1,731 @@
{include file='include/datepicker.inc.tpl' load_mode='async'}
{include file='include/colorbox.inc.tpl' load_mode='async'}
{include file='include/add_album.inc.tpl' load_mode='async'}
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{combine_script id='jquery.ui.slider' require='jquery.ui' load='async' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'}
{combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"}
{combine_script id='doubleSlider' load='async' require='jquery.ui.slider' path='admin/themes/default/js/doubleSlider.js'}
{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
{combine_script id='jquery.progressBar' load='async' path='themes/default/js/plugins/jquery.progressbar.min.js'}
{combine_script id='jquery.ajaxmanager' load='async' path='themes/default/js/plugins/jquery.ajaxmanager.js'}
{combine_script id='batchManagerGlobal' load='async' require='jquery,datepicker,jquery.colorbox,addAlbum,doubleSlider' path='admin/themes/default/js/batchManagerGlobal.js'}
{footer_script}
var lang = {
Cancel: '{'Cancel'|translate|escape:'javascript'}',
deleteProgressMessage: "{'Deletion in progress'|translate|escape:'javascript'}",
AreYouSure: "{'Are you sure?'|translate|escape:'javascript'}"
};
jQuery(document).ready(function() {
{* <!-- TAGS --> *}
var tagsCache = new TagsCache({
serverKey: '{$CACHE_KEYS.tags}',
serverId: '{$CACHE_KEYS._hash}',
rootUrl: '{$ROOT_URL}'
});
tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: {
'Add': '{'Create'|translate}'
}});
{* <!-- CATEGORIES --> *}
window.categoriesCache = new CategoriesCache({
serverKey: '{$CACHE_KEYS.categories}',
serverId: '{$CACHE_KEYS._hash}',
rootUrl: '{$ROOT_URL}'
});
var associated_categories = {$associated_categories|@json_encode};
categoriesCache.selectize(jQuery('[data-selectize=categories]'), {
filter: function(categories, options) {
if (this.name == 'dissociate') {
var filtered = jQuery.grep(categories, function(cat) {
return !!associated_categories[cat.id];
});
if (filtered.length > 0) {
options.default = filtered[0].id;
}
return filtered;
}
else {
return categories;
}
}
});
});
var nb_thumbs_page = {$nb_thumbs_page};
var nb_thumbs_set = {$nb_thumbs_set};
var applyOnDetails_pattern = "{'on the %d selected photos'|@translate}";
var all_elements = [{if !empty($all_elements)}{','|@implode:$all_elements}{/if}];
var selectedMessage_pattern = "{'%d of %d photos selected'|@translate}";
var selectedMessage_none = "{'No photo selected, %d photos in current set'|@translate}";
var selectedMessage_all = "{'All %d photos are selected'|@translate}";
$(document).ready(function() {
function checkPermitAction() {
var nbSelected = 0;
if ($("input[name=setSelected]").is(':checked')) {
nbSelected = nb_thumbs_set;
}
else {
nbSelected = $(".thumbnails input[type=checkbox]").filter(':checked').length;
}
if (nbSelected == 0) {
$("#permitAction").hide();
$("#forbidAction").show();
}
else {
$("#permitAction").show();
$("#forbidAction").hide();
}
$("#applyOnDetails").text(
sprintf(
applyOnDetails_pattern,
nbSelected
)
);
// display the number of currently selected photos in the "Selection" fieldset
if (nbSelected == 0) {
$("#selectedMessage").text(
sprintf(
selectedMessage_none,
nb_thumbs_set
)
);
}
else if (nbSelected == nb_thumbs_set) {
$("#selectedMessage").text(
sprintf(
selectedMessage_all,
nb_thumbs_set
)
);
}
else {
$("#selectedMessage").text(
sprintf(
selectedMessage_pattern,
nbSelected,
nb_thumbs_set
)
);
}
}
$("[id^=action_]").hide();
$("select[name=selectAction]").change(function () {
$("[id^=action_]").hide();
var action = $(this).prop("value");
if (action == 'move') {
action = 'associate';
}
$("#action_"+action).show();
if ($(this).val() != -1) {
$("#applyActionBlock").show();
}
else {
$("#applyActionBlock").hide();
}
});
$(".wrap1 label").click(function (event) {
$("input[name=setSelected]").prop('checked', false);
var li = $(this).closest("li");
var checkbox = $(this).children("input[type=checkbox]");
checkbox.triggerHandler("shclick",event);
if ($(checkbox).is(':checked')) {
$(li).addClass("thumbSelected");
}
else {
$(li).removeClass('thumbSelected');
}
checkPermitAction();
});
$("#selectAll").click(function () {
$("input[name=setSelected]").prop('checked', false);
selectPageThumbnails();
checkPermitAction();
return false;
});
function selectPageThumbnails() {
$(".thumbnails label").each(function() {
var checkbox = $(this).children("input[type=checkbox]");
$(checkbox).prop('checked', true).trigger("change");
$(this).closest("li").addClass("thumbSelected");
});
}
$("#selectNone").click(function () {
$("input[name=setSelected]").prop('checked', false);
$(".thumbnails label").each(function() {
var checkbox = $(this).children("input[type=checkbox]");
if (jQuery(checkbox).is(':checked')) {
$(checkbox).prop('checked', false).trigger("change");
}
$(this).closest("li").removeClass("thumbSelected");
});
checkPermitAction();
return false;
});
$("#selectInvert").click(function () {
$("input[name=setSelected]").prop('checked', false);
$(".thumbnails label").each(function() {
var checkbox = $(this).children("input[type=checkbox]");
$(checkbox).prop('checked', !$(checkbox).is(':checked')).trigger("change");
if ($(checkbox).is(':checked')) {
$(this).closest("li").addClass("thumbSelected");
}
else {
$(this).closest("li").removeClass('thumbSelected');
}
});
checkPermitAction();
return false;
});
$("#selectSet").click(function () {
selectPageThumbnails();
$("input[name=setSelected]").prop('checked', true);
checkPermitAction();
return false;
});
jQuery('#applyAction').click(function() {
var action = jQuery('[name="selectAction"]').val();
if (action == 'delete_derivatives') {
var d_count = $('#action_delete_derivatives input[type=checkbox]').filter(':checked').length
, e_count = $('input[name="setSelected"]').is(':checked') ? nb_thumbs_set : $('.thumbnails input[type=checkbox]').filter(':checked').length;
if (d_count*e_count > 500)
return confirm(lang.AreYouSure);
}
if (action != 'generate_derivatives'
|| derivatives.finished() )
{
return true;
}
jQuery('.bulkAction').hide();
var queuedManager = jQuery.manageAjax.create('queued', {
queue: true,
cacheResponse: false,
maxRequests: 1
});
derivatives.elements = [];
if (jQuery('input[name="setSelected"]').is(':checked'))
derivatives.elements = all_elements;
else
jQuery('.thumbnails input[type=checkbox]').each(function() {
if (jQuery(this).is(':checked')) {
derivatives.elements.push(jQuery(this).val());
}
});
jQuery('#applyActionBlock').hide();
jQuery('select[name="selectAction"]').hide();
jQuery('#regenerationMsg').show();
progress();
getDerivativeUrls();
return false;
});
checkPermitAction();
jQuery("select[name=filter_prefilter]").change(function() {
jQuery("#empty_caddie").toggle(jQuery(this).val() == "caddie");
jQuery("#duplicates_options").toggle(jQuery(this).val() == "duplicates");
jQuery("#delete_orphans").toggle(jQuery(this).val() == "no_album");
});
});
{*<!-- sliders config -->*}
var sliders = {
widths: {
values: [{$dimensions.widths}],
selected: {
min: {$dimensions.selected.min_width},
max: {$dimensions.selected.max_width},
},
text: '{'between %d and %d pixels'|translate|escape:'javascript'}'
},
heights: {
values: [{$dimensions.heights}],
selected: {
min: {$dimensions.selected.min_height},
max: {$dimensions.selected.max_height},
},
text: '{'between %d and %d pixels'|translate|escape:'javascript'}'
},
ratios: {
values: [{$dimensions.ratios}],
selected: {
min: {$dimensions.selected.min_ratio},
max: {$dimensions.selected.max_ratio},
},
text: '{'between %.2f and %.2f'|translate|escape:'javascript'}'
},
filesizes: {
values: [{$filesize.list}],
selected: {
min: {$filesize.selected.min},
max: {$filesize.selected.max},
},
text: '{'between %s and %s MB'|translate|escape:'javascript'}'
}
};
{/footer_script}
<div id="batchManagerGlobal">
<h2>{'Batch Manager'|@translate}</h2>
<form action="{$F_ACTION}" method="post">
<input type="hidden" name="start" value="{$START}">
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
<fieldset>
<legend><i class="icon-filter"></i>{'Filter'|@translate}</legend>
<ul id="filterList">
<li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}>
<a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a>
<input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}>
{'Predefined filter'|@translate}
<select name="filter_prefilter">
{foreach from=$prefilters item=prefilter}
{assign 'optionClass' ''}
{if $prefilter.ID eq 'no_album'}{assign 'optionClass' 'icon-heart-broken'}{/if}
{if $prefilter.ID eq 'caddie'}{assign 'optionClass' 'icon-flag'}{/if}
<option value="{$prefilter.ID}" class="{$optionClass}" {if isset($filter.prefilter) && $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option>
{/foreach}
</select>
<a id="empty_caddie" href="admin.php?page=batch_manager&amp;action=empty_caddie" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'caddie'}display:none{/if}">{'Empty caddie'|translate}</a>
{if $NB_ORPHANS > 0}
<a id="delete_orphans" href="#" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'no_album'}display:none{/if}" class="icon-trash">{'Delete %d orphan photos'|translate:$NB_ORPHANS}</a>
{/if}
<span id="orphans_deletion" style="display:none">
<img class="loading" src="themes/default/images/ajax-loader-small.gif">
<span id="orphans_deleted">0</span>% -
<span id="orphans_to_delete" data-origin="{$NB_ORPHANS}">{$NB_ORPHANS}</span>
{'orphans to delete'|translate}
</span>
<span id="orphans_deletion_error" class="errors" style="display:none"></span>
<span id="duplicates_options" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'duplicates'}display:none{/if}">
{'based on'|translate}
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_filename" {if isset($filter.duplicates_filename)}checked="checked"{/if}> {'file name'|translate}</label>
<label class="font-checkbox" title="md5sum"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_checksum" {if isset($filter.duplicates_checksum)}checked="checked"{/if}> {'checksum'|translate}</label>
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_date" {if isset($filter.duplicates_date) or (isset($filter.prefilter) and $filter.prefilter ne 'duplicates')}checked="checked"{/if}> {'date & time'|translate}</label>
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_dimensions" {if isset($filter.duplicates_dimensions)}checked="checked"{/if}> {'width & height'|translate}</label>
</span>
</li>
<li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}>
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
<input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}>
{'Album'|@translate}
<select data-selectize="categories" data-value="{$filter_category_selected|@json_encode|escape:html}"
data-default="first" name="filter_category" style="width:600px"></select>
<label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label>
</li>
<li id="filter_tags" {if !isset($filter.tags)}style="display:none"{/if}>
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
<input type="checkbox" name="filter_tags_use" class="useFilterCheckbox" {if isset($filter.tags)}checked="checked"{/if}>
{'Tags'|@translate}
<select data-selectize="tags" data-value="{$filter_tags|@json_encode|escape:html}"
placeholder="{'Type in a search term'|translate}"
name="filter_tags[]" multiple style="width:600px;"></select>
<label><span><input type="radio" name="tag_mode" value="AND" {if !isset($filter.tag_mode) or $filter.tag_mode eq 'AND'}checked="checked"{/if}> {'All tags'|@translate}</span></label>
<label><span><input type="radio" name="tag_mode" value="OR" {if isset($filter.tag_mode) and $filter.tag_mode eq 'OR'}checked="checked"{/if}> {'Any tag'|@translate}</span></label>
</li>
<li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}>
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
<input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}>
{'Privacy level'|@translate}
<select name="filter_level" size="1">
{html_options options=$filter_level_options selected=$filter_level_options_selected}
</select>
<label><input type="checkbox" name="filter_level_include_lower" {if isset($filter.level_include_lower)}checked="checked"{/if}> {'include photos with lower privacy level'|@translate}</label>
</li>
<li id="filter_dimension" {if !isset($filter.dimension)}style="display:none"{/if}>
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
<input type="checkbox" name="filter_dimension_use" class="useFilterCheckbox" {if isset($filter.dimension)}checked="checked"{/if}>
{'Dimensions'|translate}
<blockquote>
<div data-slider="widths">
{'Width'|translate} <span class="slider-info">{'between %d and %d pixels'|translate:$dimensions.selected.min_width:$dimensions.selected.max_width}</span>
| <a class="slider-choice" data-min="{$dimensions.bounds.min_width}" data-max="{$dimensions.bounds.max_width}">{'Reset'|translate}</a>
<div class="slider-slider"></div>
<input type="hidden" data-input="min" name="filter_dimension_min_width" value="{$dimensions.selected.min_width}">
<input type="hidden" data-input="max" name="filter_dimension_max_width" value="{$dimensions.selected.max_width}">
</div>
<div data-slider="heights">
{'Height'|translate} <span class="slider-info">{'between %d and %d pixels'|translate:$dimensions.selected.min_height:$dimensions.selected.max_height}</span>
| <a class="slider-choice" data-min="{$dimensions.bounds.min_height}" data-max="{$dimensions.bounds.max_height}">{'Reset'|translate}</a>
<div class="slider-slider"></div>
<input type="hidden" data-input="min" name="filter_dimension_min_height" value="{$dimensions.selected.min_height}">
<input type="hidden" data-input="max" name="filter_dimension_max_height" value="{$dimensions.selected.max_height}">
</div>
<div data-slider="ratios">
{'Ratio'|translate} ({'Width'|@translate}/{'Height'|@translate}) <span class="slider-info">{'between %.2f and %.2f'|translate:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span>
{if isset($dimensions.ratio_portrait)}| <a class="slider-choice" data-min="{$dimensions.ratio_portrait.min}" data-max="{$dimensions.ratio_portrait.max}">{'Portrait'|translate}</a>{/if}
{if isset($dimensions.ratio_square)}| <a class="slider-choice" data-min="{$dimensions.ratio_square.min}" data-max="{$dimensions.ratio_square.max}">{'square'|translate}</a>{/if}
{if isset($dimensions.ratio_landscape)}| <a class="slider-choice" data-min="{$dimensions.ratio_landscape.min}" data-max="{$dimensions.ratio_landscape.max}">{'Landscape'|translate}</a>{/if}
{if isset($dimensions.ratio_panorama)}| <a class="slider-choice" data-min="{$dimensions.ratio_panorama.min}" data-max="{$dimensions.ratio_panorama.max}">{'Panorama'|translate}</a>{/if}
| <a class="slider-choice" data-min="{$dimensions.bounds.min_ratio}" data-max="{$dimensions.bounds.max_ratio}">{'Reset'|translate}</a>
<div class="slider-slider"></div>
<input type="hidden" data-input="min" name="filter_dimension_min_ratio" value="{$dimensions.selected.min_ratio}">
<input type="hidden" data-input="max" name="filter_dimension_max_ratio" value="{$dimensions.selected.max_ratio}">
</div>
</blockquote>
</li>
<li id="filter_search"{if !isset($filter.search)} style="display:none"{/if}>
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
<input type="checkbox" name="filter_search_use" class="useFilterCheckbox"{if isset($filter.search)} checked="checked"{/if}>
{'Search'|@translate}
<input name="q" size=40 value="{$filter.search.q|stripslashes|htmlspecialchars}">
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
<a href="admin/popuphelp.php?page=quick_search" onclick="popuphelp(this.href);return false;" title="{'Help'|@translate}"><span class="icon-help-circled"></span></a>
{if (isset($no_search_results))}
<div>{'No results for'|@translate} :
<em><strong>
{foreach $no_search_results as $res}
{if !$res@first} &mdash; {/if}
{$res}
{/foreach}
</strong></em>
</div>
{/if}
</li>
<li id="filter_filesize" {if !isset($filter.filesize)}style="display:none"{/if}>
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
<input type="checkbox" name="filter_filesize_use" class="useFilterCheckbox" {if isset($filter.filesize)}checked="checked"{/if}>
{'Filesize'|translate}
<blockquote>
<div data-slider="filesizes">
<span class="slider-info">{'between %s and %s MB'|translate:$filesize.selected.min:$filesize.selected.max}</span>
| <a class="slider-choice" data-min="{$filesize.bounds.min}" data-max="{$filesize.bounds.max}">{'Reset'|translate}</a>
<div class="slider-slider"></div>
<input type="hidden" data-input="min" name="filter_filesize_min" value="{$filesize.selected.min}">
<input type="hidden" data-input="max" name="filter_filesize_max" value="{$filesize.selected.max}">
</div>
</blockquote>
</li>
</ul>
<p class="actionButtons">
<select id="addFilter">
<option value="-1">{'Add a filter'|@translate}</option>
<option disabled="disabled">------------------</option>
<option value="filter_prefilter" {if isset($filter.prefilter)}disabled="disabled"{/if}>{'Predefined filter'|@translate}</option>
<option value="filter_category" {if isset($filter.category)}disabled="disabled"{/if}>{'Album'|@translate}</option>
<option value="filter_tags" {if isset($filter.tags)}disabled="disabled"{/if}>{'Tags'|@translate}</option>
<option value="filter_level" {if isset($filter.level)}disabled="disabled"{/if}>{'Privacy level'|@translate}</option>
<option value="filter_dimension" {if isset($filter.dimension)}disabled="disabled"{/if}>{'Dimensions'|@translate}</option>
<option value="filter_filesize" {if isset($filter.filesize)}disabled="disabled"{/if}>{'Filesize'|@translate}</option>
<option value="filter_search"{if isset($filter.search)} disabled="disabled"{/if}>{'Search'|@translate}</option>
</select>
<a id="removeFilters" class="icon-cancel">{'Remove all filters'|@translate}</a>
</p>
<p class="actionButtons" id="applyFilterBlock">
<button id="applyFilter" name="submitFilter" type="submit" class="buttonLike">
<i class="icon-arrows-cw"></i> {'Refresh photo set'|@translate}
</button>
</p>
</fieldset>
<fieldset>
<legend><i class="icon-check"></i>{'Selection'|@translate}</legend>
{if !empty($thumbnails)}
<p id="checkActions">
{'Select:'|@translate}
{if $nb_thumbs_set > $nb_thumbs_page}
<a href="#" id="selectAll">{'The whole page'|@translate}</a>,
<a href="#" id="selectSet">{'The whole set'|@translate}</a>,
{else}
<a href="#" id="selectAll">{'All'|@translate}</a>,
{/if}
<a href="#" id="selectNone">{'None'|@translate}</a>,
<a href="#" id="selectInvert">{'Invert'|@translate}</a>
<span id="selectedMessage"></span>
<input type="checkbox" name="setSelected" style="display:none" {if count($selection) == $nb_thumbs_set}checked="checked"{/if}>
</p>
<ul class="thumbnails">
{html_style}
UL.thumbnails SPAN.wrap2{ldelim}
width: {$thumb_params->max_width()+2}px;
}
UL.thumbnails SPAN.wrap2 {ldelim}
height: {$thumb_params->max_height()+25}px;
}
{/html_style}
{foreach from=$thumbnails item=thumbnail}
{assign var='isSelected' value=$thumbnail.id|@in_array:$selection}
<li{if $isSelected} class="thumbSelected"{/if}>
<span class="wrap1">
<label class="font-checkbox">
<span class="icon-check"></span><input type="checkbox" name="selection[]" value="{$thumbnail.id}" {if $isSelected}checked="checked"{/if}>
<span class="wrap2">
<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">{'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>
</label>
</span>
</li>
{/foreach}
</ul>
{if !empty($navbar) }
<div style="clear:both;">
<div style="float:left">
{include file='navigation_bar.tpl'|@get_extent:'navbar'}
</div>
<div style="float:right;margin-top:10px;">{'display'|@translate}
<a href="{$U_DISPLAY}&amp;display=20">20</a>
&middot; <a href="{$U_DISPLAY}&amp;display=50">50</a>
&middot; <a href="{$U_DISPLAY}&amp;display=100">100</a>
&middot; <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
{'photos per page'|@translate}
</div>
</div>
{/if}
{else}
<div>{'No photo in the current set.'|@translate}</div>
{/if}
</fieldset>
<fieldset id="action">
<legend><i class="icon-cog"></i>{'Action'|@translate}</legend>
<div id="forbidAction"{if count($selection) != 0} style="display:none"{/if}>{'No photo selected, no action possible.'|@translate}</div>
<div id="permitAction"{if count($selection) == 0} style="display:none"{/if}>
<select name="selectAction">
<option value="-1">{'Choose an action'|@translate}</option>
<option disabled="disabled">------------------</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($associated_categories)}
<option value="dissociate">{'Dissociate from album'|@translate}</option>
{/if}
<option value="add_tags">{'Add tags'|@translate}</option>
{if !empty($associated_tags)}
<option value="del_tags">{'remove tags'|@translate}</option>
{/if}
<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" 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>
{else}
<option value="add_to_caddie">{'Add to caddie'|@translate}</option>
{/if}
<option value="delete_derivatives">{'Delete multiple size images'|@translate}</option>
<option value="generate_derivatives">{'Generate multiple size images'|@translate}</option>
{if !empty($element_set_global_plugins_actions)}
{foreach from=$element_set_global_plugins_actions item=action}
<option value="{$action.ID}">{$action.NAME}</option>
{/foreach}
{/if}
</select>
<!-- delete -->
<div id="action_delete" class="bulkAction">
<p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label><span class="errors" style="display:none">{"You need to confirm deletion"|translate}</span></p>
</div>
<!-- associate -->{* also used for "move" action *}
<div id="action_associate" class="bulkAction">
<select data-selectize="categories" data-default="first" name="associate" style="width:600px"></select>
<br>{'... or '|@translate}
<a href="#" data-add-album="associate" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a>
</div>
<!-- dissociate -->
<div id="action_dissociate" class="bulkAction">
<select data-selectize="categories" placeholder="{'Type in a search term'|translate}"
name="dissociate" style="width:600px"></select>
</div>
<!-- add_tags -->
<div id="action_add_tags" class="bulkAction">
<select data-selectize="tags" data-create="true" placeholder="{'Type in a search term'|translate}"
name="add_tags[]" multiple style="width:400px;"></select>
</div>
<!-- del_tags -->
<div id="action_del_tags" class="bulkAction">
{if !empty($associated_tags)}
<select data-selectize="tags" name="del_tags[]" multiple style="width:400px;"
placeholder="{'Type in a search term'|translate}">
{foreach from=$associated_tags item=tag}
<option value="{$tag.id}">{$tag.name}</option>
{/foreach}
</select>
{/if}
</div>
<!-- author -->
<div id="action_author" class="bulkAction">
<label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br>
<input type="text" class="large" name="author" placeholder="{'Type here the author name'|@translate}">
</div>
<!-- title -->
<div id="action_title" class="bulkAction">
<label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br>
<input type="text" class="large" name="title" placeholder="{'Type here the title'|@translate}">
</div>
<!-- date_creation -->
<div id="action_date_creation" class="bulkAction">
<label><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br>
<div id="set_date_creation">
<input type="hidden" name="date_creation" value="{$DATE_CREATION}">
<label>
<i class="icon-calendar"></i>
<input type="text" data-datepicker="date_creation" readonly>
</label>
</div>
</div>
<!-- level -->
<div id="action_level" class="bulkAction">
<select name="level" size="1">
{html_options options=$level_options selected=$level_options_selected}
</select>
</div>
<!-- metadata -->
<div id="action_metadata" class="bulkAction">
</div>
<!-- generate derivatives -->
<div id="action_generate_derivatives" class="bulkAction">
<a href="javascript:selectGenerateDerivAll()">{'All'|@translate}</a>,
<a href="javascript:selectGenerateDerivNone()">{'None'|@translate}</a>
<br>
{foreach from=$generate_derivatives_types key=type item=disp}
<label><input type="checkbox" name="generate_derivatives_type[]" value="{$type}"> {$disp}</label>
{/foreach}
</div>
<!-- delete derivatives -->
<div id="action_delete_derivatives" class="bulkAction">
<a href="javascript:selectDelDerivAll()">{'All'|@translate}</a>,
<a href="javascript:selectDelDerivNone()">{'None'|@translate}</a>
<br>
{foreach from=$del_derivatives_types key=type item=disp}
<label><input type="checkbox" name="del_derivatives_type[]" value="{$type}"> {$disp}</label>
{/foreach}
</div>
<!-- progress bar -->
<div id="regenerationMsg" class="bulkAction" style="display:none">
<p id="regenerationText" style="margin-bottom:10px;">{'Generate multiple size images'|@translate}</p>
<span class="progressBar" id="progressBar"></span>
<input type="hidden" name="regenerateSuccess" value="0">
<input type="hidden" name="regenerateError" value="0">
</div>
<!-- plugins -->
{if !empty($element_set_global_plugins_actions)}
{foreach from=$element_set_global_plugins_actions item=action}
<div id="action_{$action.ID}" class="bulkAction">
{if !empty($action.CONTENT)}{$action.CONTENT}{/if}
</div>
{/foreach}
{/if}
<p id="applyActionBlock" style="display:none" class="actionButtons">
<button id="applyAction" name="submit" type="submit" class="buttonLike">
<i class="icon-cog-alt"></i> {'Apply action'|translate}
</button>
<span id="applyOnDetails"></span>
</p>
</div> <!-- #permitAction -->
</fieldset>
</form>
</div> <!-- #batchManagerGlobal -->

View File

@@ -0,0 +1,123 @@
{include file='include/autosize.inc.tpl'}
{include file='include/datepicker.inc.tpl'}
{include file='include/colorbox.inc.tpl'}
{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
{footer_script}
(function(){
{* <!-- TAGS --> *}
var tagsCache = new TagsCache({
serverKey: '{$CACHE_KEYS.tags}',
serverId: '{$CACHE_KEYS._hash}',
rootUrl: '{$ROOT_URL}'
});
tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: {
'Add': '{'Create'|translate}'
}});
{* <!-- DATEPICKER --> *}
jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}
jQuery('[data-datepicker]').pwgDatepicker({
showTimepicker: true,
cancelButton: '{'Cancel'|translate}'
});
});
{* <!-- THUMBNAILS --> *}
jQuery("a.preview-box").colorbox( {
photo: true
});
}());
{/footer_script}
<h2>{'Batch Manager'|@translate}</h2>
<form action="{$F_ACTION}" method="POST">
<fieldset>
<legend>{'Display options'|@translate}</legend>
<p>{'photos per page'|@translate} :
<a href="{$U_ELEMENTS_PAGE}&amp;display=5">5</a>
| <a href="{$U_ELEMENTS_PAGE}&amp;display=10">10</a>
| <a href="{$U_ELEMENTS_PAGE}&amp;display=50">50</a>
</p>
</fieldset>
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
{if !empty($elements) }
<div><input type="hidden" name="element_ids" value="{$ELEMENT_IDS}"></div>
{foreach from=$elements item=element}
<fieldset class="elementEdit">
<legend>{$element.LEGEND}</legend>
<span class="thumb">
<a href="{$element.FILE_SRC}" class="preview-box icon-zoom-in" title="{$element.LEGEND|@htmlspecialchars}"><img src="{$element.TN_SRC}" alt=""></a>
<a href="{$element.U_EDIT}" class="icon-pencil">{'Edit'|@translate}</a>
</span>
<table>
<tr>
<td><strong>{'Title'|@translate}</strong></td>
<td><input type="text" class="large" name="name-{$element.id}" value="{$element.NAME}"></td>
</tr>
<tr>
<td><strong>{'Author'|@translate}</strong></td>
<td><input type="text" class="large" name="author-{$element.id}" value="{$element.AUTHOR}"></td>
</tr>
<tr>
<td><strong>{'Creation date'|@translate}</strong></td>
<td>
<input type="hidden" name="date_creation-{$element.id}" value="{$element.DATE_CREATION}">
<label>
<i class="icon-calendar"></i>
<input type="text" data-datepicker="date_creation-{$element.id}" data-datepicker-unset="date_creation_unset-{$element.id}" readonly>
</label>
<a href="#" class="icon-cancel-circled" id="date_creation_unset-{$element.id}">{'unset'|translate}</a>
</td>
</tr>
<tr>
<td><strong>{'Who can see this photo?'|@translate}</strong></td>
<td>
<select name="level-{$element.id}">
{html_options options=$level_options selected=$element.LEVEL}
</select>
</td>
</tr>
<tr>
<td><strong>{'Tags'|@translate}</strong></td>
<td>
<select data-selectize="tags" data-value="{$element.TAGS|@json_encode|escape:html}"
placeholder="{'Type in a search term'|translate}"
data-create="true" name="tags-{$element.id}[]" multiple style="width:500px;"></select>
</td>
</tr>
<tr>
<td><strong>{'Description'|@translate}</strong></td>
<td><textarea cols="50" rows="5" name="description-{$element.id}" id="description-{$element.id}" class="description">{$element.DESCRIPTION}</textarea></td>
</tr>
</table>
</fieldset>
{/foreach}
{if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
<p>
<input type="submit" value="{'Submit'|@translate}" name="submit">
<input type="reset" value="{'Reset'|@translate}">
</p>
{/if}
</form>

View File

@@ -0,0 +1,157 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{footer_script require='jquery.ui.sortable'}{literal}
jQuery(document).ready(function(){
jQuery(".drag_button").show();
jQuery(".categoryLi").css("cursor","move");
jQuery(".categoryUl").sortable({
axis: "y",
opacity: 0.8,
update : function() {
jQuery("#manualOrder").show();
jQuery("#notManualOrder").hide();
jQuery("#formAutoOrder").hide();
jQuery("#formCreateAlbum").hide();
}
});
jQuery("#categoryOrdering").submit(function(){
ar = jQuery('.categoryUl').sortable('toArray');
for(i=0;i<ar.length;i++) {
cat = ar[i].split('cat_');
document.getElementsByName('catOrd[' + cat[1] + ']')[0].value = i;
}
});
jQuery("input[name=order_type]").click(function () {
jQuery("#automatic_order_params").hide();
if (jQuery("input[name=order_type]:checked").val() == "automatic") {
jQuery("#automatic_order_params").show();
}
});
jQuery("#addAlbumOpen").click(function(){
jQuery("#formCreateAlbum").toggle();
jQuery("input[name=virtual_name]").focus();
jQuery("#formAutoOrder").hide();
});
jQuery("#addAlbumClose").click(function(){
jQuery("#formCreateAlbum").hide();
});
jQuery("#autoOrderOpen").click(function(){
jQuery("#formAutoOrder").toggle();
jQuery("#formCreateAlbum").hide();
});
jQuery("#autoOrderClose").click(function(){
jQuery("#formAutoOrder").hide();
});
jQuery("#cancelManualOrder").click(function(){
jQuery(".categoryUl").sortable("cancel");
jQuery("#manualOrder").hide();
jQuery("#notManualOrder").show();
});
});
{/literal}{/footer_script}
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Album list management'|@translate}</h2>
<p class="showCreateAlbum" id="notManualOrder">
<a href="#" id="addAlbumOpen" class="icon-plus-circled">{'create a new album'|@translate}</a>
{if count($categories)}<span class="userSeparator">&middot;</span><a href="#" id="autoOrderOpen" class="icon-sort-number-up">{'apply automatic sort order'|@translate}</a>{/if}
{if ($PARENT_EDIT)}<span class="userSeparator">&middot;</span><a href="{$PARENT_EDIT}" class="icon-pencil"></span>{'edit'|@translate}</a>{/if}
</p>
<form id="formCreateAlbum" action="{$F_ACTION}" method="post" style="display:none;">
<fieldset class="with-border">
<legend>{'create a new album'|@translate}</legend>
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
<p>
<strong>{'Album name'|@translate}</strong><br>
<input type="text" name="virtual_name" maxlength="255">
</p>
<p class="actionButtons">
<button name="submitAdd" type="submit" class="buttonLike">
<i class="icon-plus-circled"></i> {'Create'|translate}
</button>
<a href="#" id="addAlbumClose" class="icon-cancel-circled">{'Cancel'|@translate}</a>
</p>
</fieldset>
</form>
{if count($categories)}
<form id="formAutoOrder" action="{$F_ACTION}" method="post" style="display:none;">
<fieldset class="with-border">
<legend>{'Automatic sort order'|@translate}</legend>
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
<p><strong>{'Sort order'|@translate}</strong>
{foreach from=$sort_orders key=sort_code item=sort_label}
<br>
<label class="font-checkbox">
<span class="icon-dot-circled"></span>
<input type="radio" value="{$sort_code}" name="order_by" {if $sort_code eq $sort_order_checked}checked="checked"{/if}> {$sort_label}
</label>
{/foreach}
</p>
<p>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="recursive"> <strong>{'Apply to sub-albums'|@translate}</strong>
</label>
</p>
<p class="actionButtons">
<button name="submitAutoOrder" type="submit" class="buttonLike">
<i class="icon-floppy"></i> {'Save order'|translate}
</button>
<a href="#" id="autoOrderClose" class="icon-cancel-circled">{'Cancel'|@translate}</a>
</p>
</fieldset>
</form>
{/if}
<form id="categoryOrdering" action="{$F_ACTION}" method="post">
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
<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>
{if count($categories)}
<ul class="categoryUl">
{foreach from=$categories item=category}
<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="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>
<input type="hidden" name="catOrd[{$category.ID}]" value="{$category.RANK}">
<p class="albumActions">
<a href="{$category.U_EDIT}"><span class="icon-pencil"></span>{'Edit'|@translate}</a>
<span class="userSeparator">&middot;</span><a href="{$category.U_CHILDREN}"><span class="icon-sitemap"></span>{'manage sub-albums'|@translate}</a>
{if isset($category.U_SYNC) }
<span class="userSeparator">&middot;</span><a href="{$category.U_SYNC}"><span class="icon-exchange"></span>{'Synchronize'|@translate}</a>
{/if}
{if isset($category.U_DELETE) }
<span class="userSeparator">&middot;</span><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)}
<span class="userSeparator">&middot;</span><a href="{$category.U_JUMPTO}">{'jump to album'|@translate} →</a>
{/if}
</p>
</li>
{/foreach}
</ul>
{/if}
</form>

View File

@@ -0,0 +1,307 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{include file='include/colorbox.inc.tpl'}
{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
{footer_script}
{* <!-- CATEGORIES --> *}
var categoriesCache = new CategoriesCache({
serverKey: '{$CACHE_KEYS.categories}',
serverId: '{$CACHE_KEYS._hash}',
rootUrl: '{$ROOT_URL}'
});
categoriesCache.selectize(jQuery('[data-selectize=categories]'), {
default: 0,
filter: function(categories, options) {
// remove itself and children
var filtered = jQuery.grep(categories, function(cat) {
return !(/\b{$CAT_ID}\b/.test(cat.uppercats));
});
filtered.push({
id: 0,
fullname: '------------',
global_rank: 0
});
return filtered;
}
});
jQuery(document).ready(function() {
jQuery(document).on('click', '.refreshRepresentative', function(e) {
var $this = jQuery(this);
var method = 'pwg.categories.refreshRepresentative';
jQuery.ajax({
url: "ws.php?format=json&method="+method,
type:"POST",
data: {
category_id: $this.data("category_id")
},
success:function(data) {
var data = jQuery.parseJSON(data);
if (data.stat == 'ok') {
jQuery(".albumThumbnailImage")
.attr('href', data.result.url)
.find("img").attr('src', data.result.src)
.end().show();
jQuery(".albumThumbnailRandom").hide();
}
else {
alert("error on "+method);
}
},
error:function(XMLHttpRequest, textStatus, errorThrows) {
alert("serious error on "+method);
}
});
e.preventDefault();
});
jQuery(document).on('click', '.deleteRepresentative', function(e) {
var $this = jQuery(this);
var method = 'pwg.categories.deleteRepresentative';
jQuery.ajax({
url: "ws.php?format=json&method="+method,
type:"POST",
data: {
category_id: $this.data("category_id")
},
success:function(data) {
var data = jQuery.parseJSON(data);
if (data.stat == 'ok') {
jQuery(".albumThumbnailImage").hide();
jQuery(".albumThumbnailRandom").show();
}
else {
alert("error on "+method);
}
},
error:function(XMLHttpRequest, textStatus, errorThrows) {
alert("serious error on "+method);
}
});
e.preventDefault();
});
jQuery(".deleteAlbum").click(function() {
jQuery.colorbox({
inline:true,
title:"{'delete album'|translate|escape:javascript}",
href:".delete_popin"
});
return false;
});
function set_photo_deletion_mode() {
if (jQuery("input[name=photo_deletion_mode]").length > 0) {
var $photo_deletion_mode = jQuery("input[name=photo_deletion_mode]:checked").val();
jQuery("#deleteConfirm").data("photo_deletion_mode", $photo_deletion_mode);
}
}
set_photo_deletion_mode();
jQuery("input[name=photo_deletion_mode]").change(function() {
set_photo_deletion_mode();
});
jQuery("#deleteConfirm").click(function() {
if (jQuery("input[name=photo_deletion_mode]").length > 0) {
var $href = jQuery(this).attr("href");
jQuery(this).attr("href", $href+"&photo_deletion_mode="+jQuery(this).data("photo_deletion_mode"));
}
});
jQuery(document).on('click', '.close-delete_popin', function(e) {
jQuery('.delete_popin').colorbox.close();
e.preventDefault();
});
});
{/footer_script}
{html_style}
.delete_popin {
padding:20px 30px;
}
.delete_popin p {
margin:0;
}
.delete_popin ul {
padding:0;
margin:30px 0;
}
.delete_popin ul li {
list-style-type:none;
margin:10px 0;
}
.delete_popin .buttonLike {
padding:5px;
margin-right:10px;
}
.delete_popin p.popin-actions {
margin-top:30px;
}
{/html_style}
<div class="titrePage">
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<div id="catModify">
<fieldset>
<legend>{'Informations'|@translate}</legend>
<table style="width:100%">
<tr>
<td id="albumThumbnail">
{if isset($representant) }
<a class="albumThumbnailImage" style="{if !isset($representant.picture)}display:none{/if}" href="{$representant.picture.url}"><img src="{$representant.picture.src}"></a>
<img class="albumThumbnailRandom" style="{if isset($representant.picture)}display:none{/if}" src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_representant_random.png" alt="{'Random photo'|@translate}">
<p class="albumThumbnailActions">
{if $representant.ALLOW_SET_RANDOM }
<a href="#refresh" data-category_id="{$CAT_ID}" class="refreshRepresentative" title="{'Find a new representant by random'|@translate}">{'Refresh'|@translate}</a>
{/if}
{if isset($representant.ALLOW_DELETE) }
| <a href="#delete" data-category_id="{$CAT_ID}" class="deleteRepresentative" title="{'Delete Representant'|@translate}">{'Delete'|translate}</a>
{/if}
</p>
{/if}
</td>
<td id="albumLinks">
<p>{$INTRO}</p>
<ul>
{if cat_admin_access($CAT_ID)}
<li><a class="icon-eye" href="{$U_JUMPTO}">{'jump to album'|@translate} →</a></li>
{/if}
{if isset($U_MANAGE_ELEMENTS) }
<li><a class="icon-picture" href="{$U_MANAGE_ELEMENTS}">{'manage album photos'|@translate}</a></li>
{/if}
<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 class="icon-exchange" href="{$U_SYNC}">{'Synchronize'|@translate}</a> ({'Directory'|@translate} = {$CAT_FULL_DIR})</li>
{/if}
{if isset($U_DELETE) }
<li><a class="icon-trash deleteAlbum" href="#">{'delete album'|@translate}</a></li>
{/if}
</ul>
</td>
</tr>
</table>
</fieldset>
<form action="{$F_ACTION}" method="POST">
<fieldset>
<legend>{'Properties'|@translate}</legend>
<p>
<strong>{'Name'|@translate}</strong>
<br>
<input type="text" class="large" name="name" value="{$CAT_NAME}" maxlength="255">
</p>
<p>
<strong>{'Description'|@translate}</strong>
<br>
<textarea cols="50" rows="5" name="comment" id="comment" class="description">{$CAT_COMMENT}</textarea>
</p>
{if isset($parent_category) }
<p>
<strong>{'Parent album'|@translate}</strong>
<br>
<select data-selectize="categories" data-value="{$parent_category|@json_encode|escape:html}"
name="parent" style="width:600px"></select>
</p>
{/if}
<p>
<strong>{'Lock'|@translate}</strong>
<br>
<label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="visible" value="true"{if $CAT_VISIBLE == "true"} checked="checked"{/if}>{'No'|translate}</label>
<label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="visible" value="true_sub">{'No and unlock sub-albums'|translate}</label>
<label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="visible" value="false"{if $CAT_VISIBLE == "false"} checked="checked"{/if}>{'Yes'|translate}</label>
</p>
{if isset($CAT_COMMENTABLE)}
<p>
<strong>{'Comments'|@translate}</strong>
<br>
<label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="commentable" value="false"{if $CAT_COMMENTABLE == "false"} checked="checked"{/if}>{'No'|translate}</label>
<label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="commentable" value="true"{if $CAT_COMMENTABLE == "true"} checked="checked"{/if}>{'Yes'|translate}</label>
<label id="applytoSubAction">
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="apply_commentable_on_sub"></label>
{'Apply to sub-albums'|@translate}
</label>
</p>
{/if}
<p style="margin:0">
<button name="submit" type="submit" class="buttonLike">
<i class="icon-floppy"></i> {'Save Settings'|@translate}
</button>
</p>
</fieldset>
</form>
<div style="display:none">
<div class="delete_popin">
<p>
{if $NB_SUBCATS == 0}
{'Delete album "%s".'|translate:$CATEGORY_FULLNAME}
{else}
{'Delete album "%s" and its %d sub-albums.'|translate:$CATEGORIES_NAV:$NB_SUBCATS}
{/if}
</p>
{if $NB_IMAGES_RECURSIVE > 0}
<ul>
{if $NB_IMAGES_ASSOCIATED_OUTSIDE > 0}
<li><label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="photo_deletion_mode" value="force_delete"> {'delete album and all %d photos, even the %d associated to other albums'|translate:$NB_IMAGES_RECURSIVE:$NB_IMAGES_ASSOCIATED_OUTSIDE}</label></li>
{/if}
{if $NB_IMAGES_BECOMING_ORPHAN > 0}
<li><label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="photo_deletion_mode" value="delete_orphans"> {'delete album and the %d orphan photos'|translate:$NB_IMAGES_BECOMING_ORPHAN}</label></li>
{/if}
<li><label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="photo_deletion_mode" value="no_delete" checked="checked"> {'delete only album, not photos'|translate}</label></li>
</ul>
{/if}
<p class="popin-actions">
<a id="deleteConfirm" class="buttonLike" type="submit" href="{$U_DELETE}"><i class="icon-trash"></i> {'Confirm deletion'|translate}</button>
<a class="icon-cancel-circled close-delete_popin" href="#">{'Cancel'|translate}</a>
</p>
{* $U_DELETE *}
</div>
</div>
</div> {* #catModify *}

View File

@@ -0,0 +1,32 @@
<div class="titrePage">
<h2>{'Move albums'|@translate}</h2>
</div>
<form method="post" action="{$F_ACTION}" class="filter" id="catMove">
<fieldset>
<legend>{'Move albums'|@translate}</legend>
<label>
{'Virtual albums to move'|@translate}
<select class="categoryList" name="selection[]" multiple="multiple">
{html_options options=$category_to_move_options}
</select>
</label>
<label>
{'New parent album'|@translate}
<select class="categoryDropDown" name="parent">
<option value="0">------------</option>
{html_options options=$category_parent_options}
</select>
</label>
</fieldset>
<p style="text-align:left;">
<input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
</p>
</form>

View File

@@ -0,0 +1,12 @@
<div class="titrePage">
<h2>{'Properties'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<form method="post" action="{$F_ACTION}" id="cat_options">
<fieldset>
<legend>{$L_SECTION}</legend>
{$DOUBLE_SELECT}
</fieldset>
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
</form>

View File

@@ -0,0 +1,186 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
{footer_script}
(function(){
{* <!-- GROUPS --> *}
var groupsCache = new GroupsCache({
serverKey: '{$CACHE_KEYS.groups}',
serverId: '{$CACHE_KEYS._hash}',
rootUrl: '{$ROOT_URL}'
});
groupsCache.selectize(jQuery('[data-selectize=groups]'));
{* <!-- USERS --> *}
var usersCache = new UsersCache({
serverKey: '{$CACHE_KEYS.users}',
serverId: '{$CACHE_KEYS._hash}',
rootUrl: '{$ROOT_URL}'
});
usersCache.selectize(jQuery('[data-selectize=users]'));
{* <!-- TOGGLES --> *}
function checkStatusOptions() {
if (jQuery("input[name=status]:checked").val() == "private") {
jQuery("#privateOptions, #applytoSubAction").show();
}
else {
jQuery("#privateOptions, #applytoSubAction").hide();
}
}
checkStatusOptions();
jQuery("#selectStatus").change(function() {
checkStatusOptions();
});
{if isset($nb_users_granted_indirect) && $nb_users_granted_indirect>0}
jQuery(".toggle-indirectPermissions").click(function(e){
jQuery(".toggle-indirectPermissions").toggle();
jQuery("#indirectPermissionsDetails").toggle();
e.preventDefault();
});
{/if}
}());
{/footer_script}
<div class="titrePage">
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<form action="{$F_ACTION}" method="post" id="categoryPermissions">
<fieldset>
<legend>{'Access type'|@translate}</legend>
<p id="selectStatus">
<label class="font-checkbox">
<span class="icon-dot-circled"></span>
<input type="radio" name="status" value="public" {if not $private}checked="checked"{/if}>
<strong>{'public'|@translate}</strong> : <em>{'any visitor can see this album'|@translate}</em>
</label>
<br>
<label class="font-checkbox">
<span class="icon-dot-circled"></span>
<input type="radio" name="status" value="private" {if $private}checked="checked"{/if}>
<strong>{'private'|@translate}</strong> : <em>{'visitors need to login and have the appropriate permissions to see this album'|@translate}</em>
</label>
</p>
</fieldset>
<fieldset id="privateOptions">
<legend>{'Groups and users'|@translate}</legend>
<p>
{if count($groups) > 0}
<strong>{'Permission granted for groups'|@translate}</strong>
<br>
<select data-selectize="groups" data-value="{$groups_selected|@json_encode|escape:html}"
placeholder="{'Type in a search term'|translate}"
name="groups[]" multiple style="width:600px;"></select>
{else}
{'There is no group in this gallery.'|@translate} <a href="admin.php?page=group_list" class="externalLink">{'Group management'|@translate}</a>
{/if}
</p>
<p>
<strong>{'Permission granted for users'|@translate}</strong>
<br>
<select data-selectize="users" data-value="{$users_selected|@json_encode|escape:html}"
placeholder="{'Type in a search term'|translate}"
name="users[]" multiple style="width:600px;"></select>
</p>
{if isset($nb_users_granted_indirect) && $nb_users_granted_indirect>0}
<p>
{'%u users have automatic permission because they belong to a granted group.'|@translate:$nb_users_granted_indirect}
<a href="#" class="toggle-indirectPermissions" style="display:none">{'hide details'|@translate}</a>
<a href="#" class="toggle-indirectPermissions">{'show details'|@translate}</a>
<ul id="indirectPermissionsDetails" style="display:none">
{foreach from=$user_granted_indirect_groups item=group_details}
<li><strong>{$group_details.group_name}</strong> : {$group_details.group_users}</li>
{/foreach}
</ul>
</p>
{/if}
{*
<h4>{'Groups'|@translate}</h4>
<fieldset>
<legend>{'Permission granted'|@translate}</legend>
<ul>
{foreach from=$group_granted_ids item=id}
<li><label><input type="checkbox" name="deny_groups[]" value="{$id}"> {$all_groups[$id]}</label></li>
{/foreach}
</ul>
<input class="submit" type="submit" name="deny_groups_submit" value="{'Deny selected groups'|@translate}">
</fieldset>
<fieldset>
<legend>{'Permission denied'|@translate}</legend>
<ul>
{foreach from=$group_denied_ids item=id}
<li><label><input type="checkbox" name="grant_groups[]" value="{$id}"> {$all_groups[$id]}</label></li>
{/foreach}
</ul>
<input class="submit" type="submit" name="grant_groups_submit" value="{'Grant selected groups'|@translate}">
<label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label>
</fieldset>
<h4>{'Users'|@translate}</h4>
<fieldset>
<legend>{'Permission granted'|@translate}</legend>
<ul>
{foreach from=$user_granted_direct_ids item=id}
<li><label><input type="checkbox" name="deny_users[]" value="{$id}"> {$all_users[$id]}</label></li>
{/foreach}
</ul>
<input class="submit" type="submit" name="deny_users_submit" value="{'Deny selected users'|@translate}">
</fieldset>
<fieldset>
<legend>{'Permission granted thanks to a group'|@translate}</legend>
{if isset($user_granted_indirects) }
<ul>
{foreach from=$user_granted_indirects item=user_group}
<li>{$user_group.USER} ({$user_group.GROUP})</li>
{/foreach}
</ul>
{/if}
</fieldset>
<fieldset>
<legend>{'Permission denied'|@translate}</legend>
<ul>
{foreach from=$user_denied_ids item=id}
<li><label><input type="checkbox" name="grant_users[]" value="{$id}"> {$all_users[$id]}</label></li>
{/foreach}
</ul>
<input class="submit" type="submit" name="grant_users_submit" value="{'Grant selected users'|@translate}">
<label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label>
</fieldset>
*}
</fieldset>
<p style="margin:12px;text-align:left;">
<button name="submit" type="submit" class="buttonLike">
<i class="icon-floppy"></i> {'Save Settings'|@translate}
</button>
<label id="applytoSubAction" style="display:none;" class="font-checkbox">
<span class="icon-check"></span>
<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}">
</form>

View File

@@ -0,0 +1,109 @@
<dl>
<dt>{'Check integrity'|@translate}</dt>
<dd>
<ul>
<form method="post" name="c13y" id="c13y" action="">
<fieldset>
<table class="table2">
<tr class="throw">
<th></th>
<th>{'Anomaly'|@translate}</th>
<th>{'Correction'|@translate}</th>
</tr>
{if isset($c13y_list)}
{foreach from=$c13y_list item=c13y name=c13y_loop}
<tr class="{if $smarty.foreach.c13y_loop.index is odd}row1{else}row2{/if}">
<td>
{if $c13y.can_select}
<input type="checkbox" name="c13y_selection[]" value="{$c13y.id}" id="c13y_selection-{$c13y.id}"><label for="c13y_selection-{$c13y.id}"></label>
{/if}
</td>
<td><label for="c13y_selection-{$c13y.id}">{$c13y.anomaly}</label></td>
<td>
<label for="c13y_selection-{$c13y.id}">
{if $c13y.show_ignore_msg}
{'The anomaly will be ignored until next application version'|@translate}
<br>
{'Correction the anomaly will cancel the fact that it\'s ignored'|@translate}
{/if}
{if $c13y.show_correction_fct}
{'Automatic correction'|@translate}
{/if}
{if $c13y.show_correction_bad_fct}
{'Impossible automatic correction'|@translate}
{/if}
{if $c13y.show_correction_success_fct}
{'Correction applied with success'|@translate}
{/if}
{if !empty($c13y.correction_error_fct)}
{'Correction applied with error'|@translate}
<br>
{$c13y.c13y.correction_error_fct}
{/if}
{if !empty($c13y.correction_msg)}
{if $c13y.show_correction_success_fct or !empty($c13y.correction_error_fct) or $c13y.show_correction_fct or $c13y.show_correction_bad_fct }
<br>
{/if}
{$c13y.correction_msg|@nl2br}
{/if}
</label>
</td>
</tr>
{/foreach}
{/if}
</table>
<p>
{literal}
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#checkAllLink").click(function () {
jQuery("#c13y input[type=checkbox]").attr('checked', true);
return false;
});
jQuery("#uncheckAllLink").click(function () {
jQuery("#c13y input[type=checkbox]").attr('checked', false);
return false;
});
});
function DeselectAll( formulaire )
{
var elts = formulaire.elements;
for(var i=0; i <elts.length; i++)
{
if (elts[i].type=='checkbox')
elts[i].checked = false;
}
}
</script>
{/literal}
{if $c13y_show_submit_ignore}
<a href="#" id="checkAllLink">{'Check all'|@translate}</a>
/ <a href="#" id="uncheckAllLink">{'Uncheck all'|@translate}</a>
{/if}
{if isset($c13y_do_check)}
/ <a href="#" onclick="DeselectAll(document.getElementById('c13y'));
{foreach from=$c13y_do_check item=ID}
document.getElementById('c13y_selection-{$ID}').checked = true;
{/foreach}
return false;">{'Check automatic corrections'|@translate}</a>
{/if}
</p>
<p>
{if $c13y_show_submit_automatic_correction}
<input class="submit" type="submit" value="{'Apply selected corrections'|@translate}" name="Apply selected corrections">
{/if}
{if $c13y_show_submit_ignore}
<input class="submit" type="submit" value="{'Ignore selected anomalies'|@translate}" name="Ignore selected anomalies">
{/if}
<input class="submit" type="submit" value="{'Refresh'|@translate}" name="Refresh">
</p>
</fieldset>
</form>
</ul>
</dd>

View File

@@ -0,0 +1,89 @@
{footer_script}{literal}
jQuery(document).ready(function(){
function highlighComments() {
jQuery(".checkComment").each(function() {
var parent = jQuery(this).parent('tr');
if (jQuery(this).children("input[type=checkbox]").is(':checked')) {
jQuery(parent).addClass('selectedComment');
}
else {
jQuery(parent).removeClass('selectedComment');
}
});
}
jQuery(".checkComment").click(function(event) {
var checkbox = jQuery(this).children("input[type=checkbox]");
if (event.target.type !== 'checkbox') {
jQuery(checkbox).prop('checked', !jQuery(checkbox).prop('checked'));
}
highlighComments();
});
jQuery("#commentSelectAll").click(function () {
jQuery(".checkComment input[type=checkbox]").prop('checked', true);
highlighComments();
return false;
});
jQuery("#commentSelectNone").click(function () {
jQuery(".checkComment input[type=checkbox]").prop('checked', false);
highlighComments();
return false;
});
jQuery("#commentSelectInvert").click(function () {
jQuery(".checkComment input[type=checkbox]").each(function() {
jQuery(this).prop('checked', !$(this).prop('checked'));
});
highlighComments();
return false;
});
});
{/literal}{/footer_script}
<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">
<table>
{foreach from=$comments item=comment name=comment}
<tr valign="top" class="{if $smarty.foreach.comment.index is odd}row2{else}row1{/if}">
<td style="width:50px;" class="checkComment">
<input type="checkbox" name="comments[]" value="{$comment.ID}">
</td>
<td>
<div class="comment">
<a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}"></a>
<p class="commentHeader">{if $comment.IS_PENDING}<span class="pendingFlag">{'Waiting'|@translate}</span> - {/if}{if !empty($comment.IP)}{$comment.IP} - {/if}<strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
<blockquote>{$comment.CONTENT}</blockquote>
</div>
</td>
</tr>
{/foreach}
</table>
<p class="checkActions">
{'Select:'|@translate}
<a href="#" id="commentSelectAll">{'All'|@translate}</a>,
<a href="#" id="commentSelectNone">{'None'|@translate}</a>,
<a href="#" id="commentSelectInvert">{'Invert'|@translate}</a>
</p>
<p class="bottomButtons">
<input type="submit" name="validate" value="{'Validate'|@translate}">
<input type="submit" name="reject" value="{'Reject'|@translate}">
</p>
</form>
{/if}

View File

@@ -0,0 +1,161 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{footer_script}
(function(){
var targets = {
'input[name="comments_validation"]' : '#email_admin_on_comment_validation',
'input[name="user_can_edit_comment"]' : '#email_admin_on_comment_edition',
'input[name="user_can_delete_comment"]' : '#email_admin_on_comment_deletion'
};
for (selector in targets) {
var target = targets[selector];
jQuery(target).toggle(jQuery(selector).is(':checked'));
(function(target){
jQuery(selector).on('change', function() {
jQuery(target).toggle($(this).is(':checked'));
});
})(target);
};
function check_activate_comments() {
jQuery("#comments_param_container").toggle(jQuery("input[name=activate_comments]").is(":checked"));
}
check_activate_comments();
jQuery("input[name=activate_comments]").on("change", function() {
check_activate_comments();
});
}());
{/footer_script}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" action="{$F_ACTION}" class="properties">
<div id="configContent">
<fieldset id="commentsConf" class="no-border">
<ul>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<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_container">
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="comments_forall" {if ($comments.comments_forall)}checked="checked"{/if}>
{'Comments for all'|translate}
</label>
</li>
<li>
<label>
{'Number of comments per page'|translate}
<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}
<select name="comments_order">
{html_options options=$comments.comments_order_options selected=$comments.comments_order}
</select>
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="comments_validation" {if ($comments.comments_validation)}checked="checked"{/if}>
{'Validation'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="comments_author_mandatory" {if ($comments.comments_author_mandatory)}checked="checked"{/if}>
{'Username is mandatory'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="comments_email_mandatory" {if ($comments.comments_email_mandatory)}checked="checked"{/if}>
{'Email address is mandatory'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="comments_enable_website" {if ($comments.comments_enable_website)}checked="checked"{/if}>
{'Allow users to add a link to their website'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="user_can_edit_comment" {if ($comments.user_can_edit_comment)}checked="checked"{/if}>
{'Allow users to edit their own comments'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="user_can_delete_comment" {if ($comments.user_can_delete_comment)}checked="checked"{/if}>
{'Allow users to delete their own comments'|translate}
</label>
</li>
<li id="notifyAdmin">
<strong>{'Notify administrators when a comment is'|translate}</strong>
<label id="email_admin_on_comment_validation" class="font-checkbox no-bold">
<span class="icon-check"></span>
<input type="checkbox" name="email_admin_on_comment_validation" {if ($comments.email_admin_on_comment_validation)}checked="checked"{/if}>
{'pending validation'|translate}
</label>
<label class="font-checkbox no-bold">
<span class="icon-check"></span>
<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" class="font-checkbox no-bold">
<span class="icon-check"></span>
<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" class="font-checkbox no-bold">
<span class="icon-check"></span>
<input type="checkbox" name="email_admin_on_comment_deletion" {if ($comments.email_admin_on_comment_deletion)}checked="checked"{/if}>
{'deleted'|translate}
</label>
</li>
</ul>
</fieldset>
</div> <!-- configContent -->
<p class="formButtons">
<button name="submit" type="submit" class="buttonLike">
<i class="icon-floppy"></i> {'Save Settings'|@translate}
</button>
</p>
</form>

View File

@@ -0,0 +1,61 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" name="profile" action="{$GUEST_F_ACTION}" id="profile" class="properties">
<div id="configContent">
{if $GUEST_USERNAME!='guest'}
<fieldset>
{'The settings for the guest are from the %s user'|translate:$GUEST_USERNAME}
</fieldset>
{/if}
<fieldset>
<legend>{'Preferences'|translate}</legend>
<input type="hidden" name="redirect" value="{$GUEST_REDIRECT}">
<ul>
<li>
<span class="property">
<label for="nb_image_page">{'Number of photos per page'|translate}</label>
</span>
<input type="text" size="4" maxlength="3" name="nb_image_page" id="nb_image_page" value="{$GUEST_NB_IMAGE_PAGE}">
</li>
<li>
<span class="property">
<label for="recent_period">{'Recent period'|translate}</label>
</span>
<input type="text" size="3" maxlength="2" name="recent_period" id="recent_period" value="{$GUEST_RECENT_PERIOD}">
</li>
<li>
<span class="property">{'Expand all albums'|translate}</span>
{html_radios name='expand' options=$radio_options selected=$GUEST_EXPAND}
</li>
{if $GUEST_ACTIVATE_COMMENTS}
<li>
<span class="property">{'Show number of comments'|translate}</span>
{html_radios name='show_nb_comments' options=$radio_options selected=$GUEST_NB_COMMENTS}
</li>
{/if}
<li>
<span class="property">{'Show number of hits'|translate}</span>
{html_radios name='show_nb_hits' options=$radio_options selected=$GUEST_NB_HITS}
</li>
</ul>
</fieldset>
<p class="bottomButtons">
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
<input class="submit" type="submit" name="validate" value="{'Submit'|translate}">
<input class="submit" type="reset" name="reset" value="{'Reset'|translate}">
</p>
</div>
</form>

View File

@@ -0,0 +1,312 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{html_style}
/*
.adminOnlyIcon::before {
content:"(";
}
.adminOnlyIcon::after {
content:")";
}
*/
.adminOnlyIcon {
background-color:#ddd;
padding:2px 5px;
border-radius:5px;
font-size:90%;
}
{/html_style}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" action="{$F_ACTION}" class="properties">
<div id="configContent">
<fieldset id="indexDisplayConf">
<legend>{'Main Page'|translate}</legend>
<ul>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="menubar_filter_icon" {if ($display.menubar_filter_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('display only recently posted photos'|translate|@ucfirst)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="index_new_icon" {if ($display.index_new_icon)}checked="checked"{/if}>
{'Activate icon "new" next to albums and pictures'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="index_sort_order_input" {if ($display.index_sort_order_input)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('Sort order'|translate)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="index_flat_icon" {if ($display.index_flat_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('display all photos in all sub-albums'|translate|@ucfirst)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="index_posted_date_icon" {if ($display.index_posted_date_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('display a calendar by posted date'|translate|@ucfirst)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="index_created_date_icon" {if ($display.index_created_date_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('display a calendar by creation date'|translate|@ucfirst)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="index_slideshow_icon" {if ($display.index_slideshow_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('slideshow'|translate|@ucfirst)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="index_sizes_icon" {if ($display.index_sizes_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('Photo sizes'|translate|@ucfirst)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="index_edit_icon" {if ($display.index_edit_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('Edit album'|translate|@ucfirst)} <span class="adminOnlyIcon tiptip" title="{'available for administrators only'|translate}"><i class="icon-users"></i> {'administrators'}</span>
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="index_caddie_icon" {if ($display.index_caddie_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('Add to caddie'|translate|@ucfirst)} <span class="adminOnlyIcon tiptip" title="{'available for administrators only'|translate}"><i class="icon-users"></i> {'administrators'}</span>
</label>
</li>
<li>
<label>
{'Number of albums per page'|translate}
<input type="text" size="3" maxlength="4" name="nb_categories_page" id="nb_categories_page" value="{$display.NB_CATEGORIES_PAGE}">
</label>
</li>
</ul>
</fieldset>
<fieldset id="pictureDisplayConf">
<legend>{'Photo Page'|translate}</legend>
<ul>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_slideshow_icon" {if ($display.picture_slideshow_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('slideshow'|translate|@ucfirst)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_metadata_icon" {if ($display.picture_metadata_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('Show file metadata'|translate)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_download_icon" {if ($display.picture_download_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('Download this file'|translate|@ucfirst)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_favorite_icon" {if ($display.picture_favorite_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('add this photo to your favorites'|translate|@ucfirst)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_sizes_icon" {if ($display.picture_sizes_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('Photo sizes'|translate|@ucfirst)}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_edit_icon" {if ($display.picture_edit_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('Edit photo'|translate|@ucfirst)} <span class="adminOnlyIcon tiptip" title="{'available for administrators only'|translate}"><i class="icon-users"></i> {'administrators'}</span>
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_caddie_icon" {if ($display.picture_caddie_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('Add to caddie'|translate|@ucfirst)} <span class="adminOnlyIcon tiptip" title="{'available for administrators only'|translate}"><i class="icon-users"></i> {'administrators'}</span>
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_representative_icon" {if ($display.picture_representative_icon)}checked="checked"{/if}>
{'Activate icon "%s"'|translate:('set as album representative'|translate|@ucfirst)} <span class="adminOnlyIcon tiptip" title="{'available for administrators only'|translate}"><i class="icon-users"></i> {'administrators'}</span>
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_navigation_icons" {if ($display.picture_navigation_icons)}checked="checked"{/if}>
{'Activate Navigation Bar'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_navigation_thumb" {if ($display.picture_navigation_thumb)}checked="checked"{/if}>
{'Activate Navigation Thumbnails'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_menu" {if ($display.picture_menu)}checked="checked"{/if}>
{'Show menubar'|translate}
</label>
</li>
</ul>
</fieldset>
<fieldset id="pictureInfoConf">
<legend>{'Photo Properties'|translate}</legend>
<ul>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[author]" {if ($display.picture_informations.author)}checked="checked"{/if}>
{'Author'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[created_on]" {if ($display.picture_informations.created_on)}checked="checked"{/if}>
{'Created on'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[posted_on]" {if ($display.picture_informations.posted_on)}checked="checked"{/if}>
{'Posted on'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[dimensions]" {if ($display.picture_informations.dimensions)}checked="checked"{/if}>
{'Dimensions'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[file]" {if ($display.picture_informations.file)}checked="checked"{/if}>
{'File'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[filesize]" {if ($display.picture_informations.filesize)}checked="checked"{/if}>
{'Filesize'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[tags]" {if ($display.picture_informations.tags)}checked="checked"{/if}>
{'Tags'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[categories]" {if ($display.picture_informations.categories)}checked="checked"{/if}>
{'Albums'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[visits]" {if ($display.picture_informations.visits)}checked="checked"{/if}>
{'Visits'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[rating_score]" {if ($display.picture_informations.rating_score)}checked="checked"{/if}>
{'Rating score'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="picture_informations[privacy_level]" {if ($display.picture_informations.privacy_level)}checked="checked"{/if}>
{'Who can see this photo?'|translate} <span class="adminOnlyIcon tiptip" title="{'available for administrators only'|translate}"><i class="icon-users"></i> {'administrators'}</span>
</label>
</li>
</ul>
</fieldset>
</div> <!-- configContent -->
<p class="formButtons">
<button name="submit" type="submit" class="buttonLike">
<i class="icon-floppy"></i> {'Save Settings'|@translate}
</button>
</p>
</form>

View File

@@ -0,0 +1,218 @@
{include file='include/colorbox.inc.tpl'}
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{footer_script require='jquery'}
(function(){
var targets = {
'input[name="rate"]' : '#rate_anonymous',
'input[name="allow_user_registration"]' : '#email_admin_on_new_user'
};
for (selector in targets) {
var target = targets[selector];
jQuery(target).toggle(jQuery(selector).is(':checked'));
(function(target){
jQuery(selector).on('change', function() {
jQuery(target).toggle($(this).is(':checked'));
});
})(target);
};
}());
{if !isset($ORDER_BY_IS_CUSTOM)}
(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();
}());
{/if}
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}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" action="{$F_ACTION}" class="properties">
<div id="configContent">
<fieldset class="mainConf">
<legend>{'Basic settings'|translate}</legend>
<ul>
<li>
<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>
<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>
</fieldset>
<fieldset class="mainConf">
<legend>{'Permissions'|translate}</legend>
<ul>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="rate" {if ($main.rate)}checked="checked"{/if}>
{'Allow rating'|translate}
</label>
<label id="rate_anonymous" class="font-checkbox no-bold">
<span class="icon-check"></span>
<input type="checkbox" name="rate_anonymous" {if ($main.rate_anonymous)}checked="checked"{/if}>
{'Rating by guests'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="allow_user_registration" {if ($main.allow_user_registration)}checked="checked"{/if}>
{'Allow user registration'|translate}
</label>
<label id="email_admin_on_new_user" class="font-checkbox no-bold">
<span class="icon-check"></span>
<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>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="allow_user_customization" {if ($main.allow_user_customization)}checked="checked"{/if}>
{'Allow user customization'|translate}
</label>
</li>
<li>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="obligatory_user_mail_address" {if ($main.obligatory_user_mail_address)}checked="checked"{/if}>
{'Mail address is mandatory for registration'|translate}
</label>
</li>
</ul>
</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 class="font-checkbox no-bold">
<span class="icon-check"></span>
<input type="checkbox" name="history_guest" {if ($main.history_guest)}checked="checked"{/if}>
{'simple visitors'|translate}
</label>
<label class="font-checkbox no-bold">
<span class="icon-check"></span>
<input type="checkbox" name="log" {if ($main.log)}checked="checked"{/if}>
{'registered users'|translate}
</label>
<label class="font-checkbox no-bold">
<span class="icon-check"></span>
<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 font-checkbox">
{foreach from=$main.mail_theme_options item=name key=theme}
<div class="themeBox {if $main.mail_theme==$theme}themeDefault{/if}">
<label class="font-checkbox">
<div class="themeName">
<span class="icon-dot-circled"></span>
<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" class="icon-zoom-in">{'Preview'|translate}</a>
</div>
{/foreach}
</div>
</li>
</ul>
</fieldset>
</div> <!-- configContent -->
<p class="formButtons">
<button name="submit" type="submit" class="buttonLike">
<i class="icon-floppy"></i> {'Save Settings'|@translate}
</button>
</p>
</form>

View File

@@ -0,0 +1,234 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{footer_script}
(function(){
var labelMaxWidth = "{'Maximum width'|translate}",
labelWidth = "{'Width'|translate}",
labelMaxHeight = "{'Maximum height'|translate}",
labelHeight = "{'Height'|translate}";
function toggleResizeFields(size) {
var checkbox = jQuery("[name=original_resize]");
var needToggle = jQuery("#sizeEdit-original");
if (jQuery(checkbox).is(':checked')) {
needToggle.show();
}
else {
needToggle.hide();
}
}
toggleResizeFields("original");
jQuery("[name=original_resize]").click(function () {
toggleResizeFields("original");
});
jQuery("a[id^='sizeEditOpen-']").click(function(){
var sizeName = jQuery(this).attr("id").split("-")[1];
jQuery("#sizeEdit-"+sizeName).toggle();
jQuery(this).hide();
return false;
});
jQuery(".cropToggle").click(function() {
var labelBoxWidth = jQuery(this).parents('table.sizeEditForm').find('td.sizeEditWidth');
var labelBoxHeight = jQuery(this).parents('table.sizeEditForm').find('td.sizeEditHeight');
if (jQuery(this).is(':checked')) {
jQuery(labelBoxWidth).html(labelWidth);
jQuery(labelBoxHeight).html(labelHeight);
}
else {
jQuery(labelBoxWidth).html(labelMaxWidth);
jQuery(labelBoxHeight).html(labelMaxHeight);
}
});
jQuery("#showDetails").click(function() {
jQuery(".sizeDetails").show();
jQuery(this).css("visibility", "hidden");
return false;
});
}());
{/footer_script}
{html_style}
.sizeEnable { width:50px; }
.sizeEnable .icon-ok { position:relative; left:2px; }
.sizeEditForm { margin:0 0 10px 20px; }
.sizeEdit { display:none; }
#sizesConf table { margin:0; }
.showDetails { padding:0; }
.sizeDetails { display:none;margin-left:10px; }
.sizeEditOpen { margin-left:10px; }
{/html_style}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" action="{$F_ACTION}" class="properties">
<div id="configContent">
<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"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 class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="original_resize" {if ($sizes.original_resize)}checked="checked"{/if}>
{'Resize after upload'|translate}
</label>
</div>
<table id="sizeEdit-original">
<tr>
<th>{'Maximum width'|translate}</th>
<td>
<input type="text" name="original_resize_maxwidth" value="{$sizes.original_resize_maxwidth}" size="4" maxlength="4"{if isset($ferrors.original_resize_maxwidth)} class="dError"{/if}> {'pixels'|translate}
{if isset($ferrors.original_resize_maxwidth)}<span class="dErrorDesc" title="{$ferrors.original_resize_maxwidth}">!</span>{/if}
</td>
</tr>
<tr>
<th>{'Maximum height'|translate}</th>
<td>
<input type="text" name="original_resize_maxheight" value="{$sizes.original_resize_maxheight}" size="4" maxlength="4"{if isset($ferrors.original_resize_maxheight)} class="dError"{/if}> {'pixels'|translate}
{if isset($ferrors.original_resize_maxheight)}<span class="dErrorDesc" title="{$ferrors.original_resize_maxheight}">!</span>{/if}
</td>
</tr>
<tr>
<th>{'Image Quality'|translate}</th>
<td>
<input type="text" name="original_resize_quality" value="{$sizes.original_resize_quality}" size="3" maxlength="3"{if isset($ferrors.original_resize_quality)} class="dError"{/if}> %
{if isset($ferrors.original_resize_quality)}<span class="dErrorDesc" title="{$ferrors.original_resize_quality}">!</span>{/if}
</td>
</tr>
</table>
{/if}
</fieldset>
<fieldset id="multiSizesConf">
<legend>{'Multiple Size'|translate}</legend>
<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>
{if $d.must_enable}
<span class="sizeEnable">
<span class="icon-ok"></span>
</span>
{else}
<span class="sizeEnable font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="d[{$type}][enabled]" {if $d.enabled}checked="checked"{/if}>
</span>
{/if}
{$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) 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 class="font-checkbox">
<span class="icon-check"></span>
<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}][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>
{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 class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="delete_custom_derivative_{$custom}"> {'Delete'|translate} {$custom} ({'Last hit'|translate}: {$time})
</label>
</td></tr>
{/foreach}
</table>
</fieldset>
{/if}
</fieldset>
</div> <!-- configContent -->
<p class="formButtons">
<button name="submit" type="submit" class="buttonLike">
<i class="icon-floppy"></i> {'Save Settings'|@translate}
</button>
</p>
</form>

View File

@@ -0,0 +1,140 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{footer_script}
(function(){
function onWatermarkChange() {
var val = jQuery("#wSelect").val();
if (val.length) {
jQuery("#wImg").attr('src', '{$ROOT_URL}'+val).show();
}
else {
jQuery("#wImg").hide();
}
}
onWatermarkChange();
jQuery("#wSelect").bind("change", onWatermarkChange);
if (jQuery("input[name='w[position]']:checked").val() == 'custom') {
jQuery("#positionCustomDetails").show();
}
jQuery("input[name='w[position]']").change(function(){
if (jQuery(this).val() == 'custom') {
jQuery("#positionCustomDetails").show();
}
else {
jQuery("#positionCustomDetails").hide();
}
});
jQuery(".addWatermarkOpen").click(function(){
jQuery("#addWatermark, #selectWatermark").toggle();
return false;
});
}());
{/footer_script}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" action="{$F_ACTION}" class="properties" enctype="multipart/form-data">
<div id="configContent">
<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}
</select>
{'... or '|translate}<a href="#" class="addWatermarkOpen">{'add a new watermark'|translate}</a>
<br>
<img id="wImg"></img>
</span>
<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)
{if isset($ferrors.watermarkImage)}<span class="dErrorDesc" title="{$ferrors.watermarkImage|@htmlspecialchars}">!</span>{/if}
</span>
</li>
<li>
<label>
{'Apply watermark if width is bigger than'|translate}
<input size="4" maxlength="4" type="text" name="w[minw]" value="{$watermark.minw}"{if isset($ferrors.watermark.minw)} class="dError"{/if}>
</label>
{'pixels'|translate}
</li>
<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}>
</label>
{'pixels'|translate}
</li>
<li>
<label>{'Position'|translate}</label>
<br>
<div id="watermarkPositionBox">
<label class="right font-checkbox">{'top right corner'|translate} <span class="icon-dot-circled"></span><input name="w[position]" type="radio" value="topright"{if $watermark.position eq 'topright'} checked="checked"{/if}></label>
<label class="font-checkbox"><span class="icon-dot-circled"></span><input name="w[position]" type="radio" value="topleft"{if $watermark.position eq 'topleft'} checked="checked"{/if}> {'top left corner'|translate}</label>
<label class="middle font-checkbox"><span class="icon-dot-circled"></span><input name="w[position]" type="radio" value="middle"{if $watermark.position eq 'middle'} checked="checked"{/if}> {'middle'|translate}</label>
<label class="right font-checkbox">{'bottom right corner'|translate} <span class="icon-dot-circled"></span><input name="w[position]" type="radio" value="bottomright"{if $watermark.position eq 'bottomright'} checked="checked"{/if}></label>
<label class="font-checkbox"><span class="icon-dot-circled"></span><input name="w[position]" type="radio" value="bottomleft"{if $watermark.position eq 'bottomleft'} checked="checked"{/if}> {'bottom left corner'|translate}</label>
</div>
<label class="font-checkbox" style="display:block;margin-top:10px;font-weight:normal;"><span class="icon-dot-circled"></span><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}>%
{if isset($ferrors.watermark.xpos)}<span class="dErrorDesc" title="{$ferrors.watermark.xpos}">!</span>{/if}
</label>
<br>
<label>{'Y Position'|translate}
<input size="3" maxlength="3" type="text" name="w[ypos]" value="{$watermark.ypos}"{if isset($ferrors.watermark.ypos)} class="dError"{/if}>%
{if isset($ferrors.watermark.ypos)}<span class="dErrorDesc" title="{$ferrors.watermark.ypos}">!</span>{/if}
</label>
<br>
<label>{'X Repeat'|translate}
<input size="3" maxlength="3" type="text" name="w[xrepeat]" value="{$watermark.xrepeat}"{if isset($ferrors.watermark.xrepeat)} class="dError"{/if}>
{if isset($ferrors.watermark.xrepeat)}<span class="dErrorDesc" title="{$ferrors.watermark.xrepeat}">!</span>{/if}
</label>
<br>
<label>{'Y Repeat'|translate}
<input size="3" maxlength="3" type="text" name="w[yrepeat]" value="{$watermark.yrepeat}"{if isset($ferrors.watermark.yrepeat)} class="dError"{/if}>
{if isset($ferrors.watermark.yrepeat)}<span class="dErrorDesc" title="{$ferrors.watermark.yrepeat}">!</span>{/if}
</label>
</div>
</li>
<li>
<label>{'Opacity'|translate}</label>
<input size="3" maxlength="3" type="text" name="w[opacity]" value="{$watermark.opacity}"{if isset($ferrors.watermark.opacity)} class="dError"{/if}> %
{if isset($ferrors.watermark.opacity)}<span class="dErrorDesc" title="{$ferrors.watermark.opacity}">!</span>{/if}
</li>
</ul>
</fieldset>
</div> <!-- configContent -->
<p class="formButtons">
<button name="submit" type="submit" class="buttonLike">
<i class="icon-floppy"></i> {'Save Settings'|@translate}
</button>
</p>
</form>

View File

@@ -0,0 +1,19 @@
<table class="doubleSelect">
<tr>
<td>
<h3>{$L_CAT_OPTIONS_TRUE}</h3>
<select class="categoryList" name="cat_true[]" multiple="multiple" size="30">
{html_options options=$category_option_true selected=$category_option_true_selected}
</select>
<p><input class="submit" type="submit" value="&raquo;" name="falsify" style="font-size:15px;"></p>
</td>
<td>
<h3>{$L_CAT_OPTIONS_FALSE}</h3>
<select class="categoryList" name="cat_false[]" multiple="multiple" size="30">
{html_options options=$category_option_false selected=$category_option_false_selected}
</select>
<p><input class="submit" type="submit" value="&laquo;" name="trueify" style="font-size:15px;"></p>
</td>
</tr>
</table>

View File

@@ -0,0 +1,108 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{footer_script require='jquery.ui.sortable'}{literal}
jQuery(document).ready(function() {
function checkOrderOptions() {
jQuery("#image_order_user_define_options").hide();
if (jQuery("input[name=image_order_choice]:checked").val() == "user_define") {
jQuery("#image_order_user_define_options").show();
}
}
jQuery('ul.thumbnails').sortable( {
revert: true, opacity: 0.7,
handle: jQuery('.rank-of-image').add('.rank-of-image img'),
update: function() {
jQuery(this).find('li').each(function(i) {
jQuery(this).find("input[name^=rank_of_image]").each(function() {
jQuery(this).attr('value', (i+1)*10)
});
});
jQuery('#image_order_rank').prop('checked', true);
checkOrderOptions();
}
});
jQuery("input[name=image_order_choice]").click(function () {
checkOrderOptions();
});
checkOrderOptions();
});
jQuery(document).ready(function() {
jQuery('.thumbnail').tipTip({
'delay' : 0,
'fadeIn' : 200,
'fadeOut' : 200
});
});
{/literal}{/footer_script}
<div class="titrePage">
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<form action="{$F_ACTION}" method="post">
{if !empty($thumbnails)}
<p><input type="submit" value="{'Submit'|@translate}" name="submit"></p>
<fieldset>
<legend>{'Manual order'|@translate}</legend>
{if !empty($thumbnails)}
<p>{'Drag to re-order'|@translate}</p>
<ul class="thumbnails">
{foreach from=$thumbnails item=thumbnail}
<li class="rank-of-image">
<img src="{$thumbnail.TN_SRC}" class="thumbnail" alt="{$thumbnail.NAME|@replace:'"':' '}" title="{$thumbnail.NAME|@replace:'"':' '}" style="width:{$thumbnail.SIZE[0]}px; height:{$thumbnail.SIZE[1]}px; ">
<input type="text" name="rank_of_image[{$thumbnail.ID}]" value="{$thumbnail.RANK}" style="display:none">
</li>
{/foreach}
</ul>
{/if}
</fieldset>
{/if}
<fieldset>
<legend>{'Sort order'|@translate}</legend>
<p class="field">
<label class="font-checkbox">
<span class="icon-dot-circled"></span>
<input type="radio" name="image_order_choice" id="image_order_default" value="default"{if $image_order_choice=='default'} checked="checked"{/if}>
{'Use the default photo sort order'|@translate}
</label>
</p>
<p class="field">
<label class="font-checkbox">
<span class="icon-dot-circled"></span>
<input type="radio" name="image_order_choice" id="image_order_rank" value="rank"{if $image_order_choice=='rank'} checked="checked"{/if}>
{'manual order'|translate}
</label>
</p>
<p class="field">
<label class="font-checkbox">
<span class="icon-dot-circled"></span>
<input type="radio" name="image_order_choice" id="image_order_user_define" value="user_define"{if $image_order_choice=='user_define'} checked="checked"{/if}>
{'automatic order'|@translate}
</label>
<div id="image_order_user_define_options">
{foreach from=$image_order item=order}
<p class="field">
<select name="image_order[]">
{html_options options=$image_order_options selected=$order}
</select>
</p>
{/foreach}
</div>
</fieldset>
<p>
<button name="submit" type="submit" class="buttonLike">
<i class="icon-floppy"></i> {'Save Settings'|@translate}
</button>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="image_order_subcats" id="image_order_subcats">
{'Apply to sub-albums'|@translate}
</label>
</p>
</form>

View File

@@ -0,0 +1,35 @@
<div class="titrePage"><h2>{'Extend for templates'|@translate}</h2>
</div>
{if isset($extents)}
<h4>{'Replacement of original templates by customized templates from template-extension subfolder'|@translate}</h4>
<form method="post" name="extend_for_templates" id="extend_for_templates" action="">
<table class="table2">
<tr class="throw">
<th>{'Replacers (customized templates)'|@translate}</th>
<th>{'Original templates'|@translate}</th>
<th>{'Optional URL keyword'|@translate}</th>
<th>{'Bound Theme'|@translate}</th>
</tr>
{foreach from=$extents item=tpl name=extent_loop}
<tr class="{if $smarty.foreach.extent_loop.index is odd}row1{else}row2{/if}">
<td>
<input type="hidden" name="reptpl[]" value="{$tpl.replacer}">
{$tpl.replacer}
</td>
<td>
{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}
</td>
<td>
{html_options name='bound[]' output=$tpl.bound_tpl values=$tpl.bound_tpl selected=$tpl.selected_bound}
</td>
</tr>
{/foreach}
</table>
<p>
<input type="submit" value="{'Submit'|@translate}" name="submit">
</p>
</form>
{/if}

View File

@@ -0,0 +1,60 @@
{*
Warning : This is the admin pages footer only
don't be confusing with the public page footer
*}
</div>{* <!-- pwgMain --> *}
{if isset($footer_elements)}
{foreach from=$footer_elements item=elt}
{$elt}
{/foreach}
{/if}
{if isset($debug.QUERIES_LIST)}
<div id="debug">
{$debug.QUERIES_LIST}
</div>
{/if}
<div id="footer">
<div id="piwigoInfos">
{'Powered by'|translate}
<a class="externalLink tiptip" href="{$PHPWG_URL}" title="{'Visit Piwigo project website'|translate}"><span class="Piwigo">Piwigo</span></a>
{$VERSION}
<a class="externalLink tiptip" href="{$pwgmenu.WIKI}" title="{'Read Piwigo Documentation'|translate}"><i class="icon-book"></i>{'Documentation'|translate}</a>
<a class="externalLink tiptip" href="{$pwgmenu.FORUM}" title="{'Get Support on Piwigo Forum'|translate}"><i class="icon-lifebuoy"></i>{'Support'|translate}</a>
</div>
<div id="pageInfos">
{if isset($debug.TIME) }
{'Page generated in'|translate} {$debug.TIME} ({$debug.NB_QUERIES} {'SQL queries in'|translate} {$debug.SQL_TIME}) -
{/if}
{'Contact'|translate}
<a href="mailto:{$CONTACT_MAIL}?subject={'A comment on your site'|translate|escape:url}">{'Webmaster'|translate}</a>
</div>{* <!-- pageInfos --> *}
</div>{* <!-- footer --> *}
</div>{* <!-- the_page --> *}
{combine_script id='jquery.tipTip' load='footer' path='themes/default/js/plugins/jquery.tipTip.minified.js'}
{footer_script require='jquery.tipTip'}
jQuery('.tiptip').tipTip({
delay: 0,
fadeIn: 200,
fadeOut: 200
});
jQuery('a.externalLink').click(function() {
window.open(jQuery(this).attr("href"));
return false;
});
{/footer_script}
<!-- BEGIN get_combined -->
{get_combined_scripts load='footer'}
<!-- END get_combined -->
</body>
</html>

View File

@@ -0,0 +1,189 @@
{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() {
var nbSelected = 0;
nbSelected = $("input.group_selection").filter(':checked').length;
if (nbSelected == 0) {
$("#permitAction").hide();
$("#forbidAction").show();
}
else {
$("#permitAction").show();
$("#forbidAction").hide();
}
$("p[group_id="+$(this).prop("value")+"]").each(function () {
$(this).toggle();
});
if (nbSelected<2) {
$("#two_to_select").show();
$("#two_atleast").hide();
}
else {
$("#two_to_select").hide();
$("#two_atleast").show();
}
});
$("[id^=action_]").hide();
$("select[name=selectAction]").change(function () {
$("[id^=action_]").hide();
$("#action_"+$(this).prop("value")).show();
if ($(this).val() != -1 ) {
$("#applyActionBlock").show();
}
else {
$("#applyActionBlock").hide();
}
});
});
{/literal}
{/footer_script}
<div class="titrePage">
<h2>{'Group management'|@translate}</h2>
</div>
<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 class="with-border">
<legend>{'Add group'|@translate}</legend>
<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}">
<ul class="groups">
{if not empty($groups)}
{foreach from=$groups item=group name=group_loop}
<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}
</ul>
<fieldset id="action">
<legend>{'Action'|@translate}</legend>
<div id="forbidAction">{'No group selected, no action possible.'|@translate}</div>
<div id="permitAction" style="display:none">
<select name="selectAction">
<option value="-1">{'Choose an action'|@translate}</option>
<option disabled="disabled">------------------</option>
<option value="rename">{'Rename'|@translate}</option>
<option value="delete">{'Delete'|@translate}</option>
<option value="merge">{'Merge selected groups'|@translate}</option>
<option value="duplicate">{'Duplicate'|@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}
<option value="{$action.ID}">{$action.NAME}</option>
{/foreach}
{/if}
</select>
<!-- rename -->
<div id="action_rename" class="bulkAction">
{if not empty($groups)}
{foreach from=$groups item=group}
<p group_id="{$group.ID}" class="grp_action">
<input type="text" class="large" name="rename_{$group.ID}" value="{$group.NAME}" onfocus="this.value=(this.value=='{$group.NAME}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$group.NAME}' : this.value;">
</p>
{/foreach}
{/if}
</div>
<!-- merge -->
<div id="action_merge" class="bulkAction">
<p id="two_to_select">{'Please select at least two groups'|@translate}</p>
{assign var='mergeDefaultValue' value='Type here the name of the new group'|@translate}
<p id="two_atleast">
<input type="text" class="large" name="merge" value="{$mergeDefaultValue}" onfocus="this.value=(this.value=='{$mergeDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$mergeDefaultValue}' : this.value;">
</p>
</div>
<!-- delete -->
<div id="action_delete" class="bulkAction">
<p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p>
</div>
<!-- duplicate -->
<div id="action_duplicate" class="bulkAction">
{assign var='duplicateDefaultValue' value='Type here the name of the new group'|@translate}
{if not empty($groups)}
{foreach from=$groups item=group}
<p group_id="{$group.ID}" class="grp_action">
{$group.NAME} > <input type="text" class="large" name="duplicate_{$group.ID}" value="{$duplicateDefaultValue}" onfocus="this.value=(this.value=='{$duplicateDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$duplicateDefaultValue}' : this.value;">
</p>
{/foreach}
{/if}
</div>
<!-- toggle_default -->
<div id="action_toggle_default" class="bulkAction">
{if not empty($groups)}
{foreach from=$groups item=group}
<p group_id="{$group.ID}" class="grp_action">
{$group.NAME} > {if empty($group.IS_DEFAULT)}{'This group will be set to default'|@translate}{else}{'This group will be unset to default'|@translate}{/if}
</p>
{/foreach}
{/if}
</div>
<!-- plugins -->
{if !empty($element_set_groupe_plugins_actions)}
{foreach from=$element_set_groupe_plugins_actions item=action}
<div id="action_{$action.ID}" class="bulkAction">
{if !empty($action.CONTENT)}{$action.CONTENT}{/if}
</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 -->
</fieldset>
</form>
</form>

View File

@@ -0,0 +1,8 @@
{* $Id *}
<h2>{$TITLE}</h2>
<form method="post" action="{$F_ACTION}">
{$DOUBLE_SELECT}
</form>
<p>{'Only private albums are listed'|@translate}</p>

View File

@@ -0,0 +1,93 @@
{*
Warning : This is the admin pages header only
don't confuse with the public page header
*}
<!DOCTYPE html>
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
<head>
<meta charset="{$CONTENT_ENCODING}">
<title>{$GALLERY_TITLE} :: {$PAGE_TITLE}</title>
<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
{strip}
{combine_css path="admin/themes/default/fontello/css/fontello.css" order=-10}
{assign "theme_id" ""}
{foreach from=$themes item=theme}
{assign "theme_id" $theme.id}
{if $theme.load_css}
{combine_css path="admin/themes/`$theme.id`/theme.css" order=-10}
{/if}
{if !empty($theme.local_head)}
{include file=$theme.local_head load_css=$theme.load_css}
{/if}
{/foreach}
{combine_script id='jquery' path='themes/default/js/jquery.min.js'}
{/strip}
<!-- BEGIN get_combined -->
{get_combined_css}
{get_combined_scripts load='header'}
<!-- END get_combined -->
{if not empty($head_elements)}
{foreach from=$head_elements item=elt}
{$elt}
{/foreach}
{/if}
</head>
<body id="{$BODY_ID}">
<div id="the_page">
{if not empty($header_msgs)}
<div class="header_msgs">
{foreach from=$header_msgs item=elt}
{$elt}
{/foreach}
</div>
{/if}
<div id="pwgHead">
{strip}
<h1>
<a href="{$U_RETURN}" title="{'Visit Gallery'|translate}" class="tiptip">
<span class="icon-home"></span>
{$GALLERY_TITLE}
</a>
</h1>
{/strip}
<div id="headActions">
<i class="icon-user"></i>{$USERNAME}
<a href="{$U_RETURN}" title="{'Visit Gallery'|translate}"><i class="icon-eye"></i><span>{'Visit Gallery'|translate}</span></a>
{strip}
<a href="{$U_CHANGE_THEME}" class="tiptip" title="{'Switch to clear or dark colors for administration'|translate}">
{if $theme_id eq "clear"}
<i class="icon-moon-inv"></i><span>Dark</span>
{elseif $theme_id eq "roma"}
<i class="icon-sun-inv"></i><span>Light</span>
{/if}
</a>
{/strip}
<a class="tiptip" href="{$U_FAQ}" title="{'Instructions to use Piwigo'|@translate}"><i class="icon-help-circled"></i><span>{'Help Me'|translate}</span></a>
<a href="{$U_LOGOUT}"><i class="icon-logout"></i><span>{'Logout'|translate}</span></a>
</div>
</div>
<div style="clear:both;"></div>
{if not empty($header_notes)}
<div class="header_notes">
{foreach from=$header_notes item=elt}
{$elt}
{/foreach}
</div>
{/if}
<div id="pwgMain">

View File

@@ -0,0 +1,13 @@
{if not $ENABLE_SYNCHRONIZATION}
{html_style}{literal}
#helpSynchro {display:none;}
{/literal}{/html_style}
{/if}
<h2>{'Help'|@translate} &raquo; {$HELP_SECTION_TITLE}</h2>
<div id="helpContent">
{$HELP_CONTENT}
</div>

View File

@@ -0,0 +1,175 @@
{include file='include/datepicker.inc.tpl'}
{footer_script}
jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}
jQuery('[data-datepicker]').pwgDatepicker();
});
{/footer_script}
<h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
<form class="filter" method="post" name="filter" action="{$F_ACTION}">
<fieldset class="with-border">
<legend>{'Filter'|@translate}</legend>
<ul>
<li><label>{'Date'|@translate}</label></li>
<li>
<input type="hidden" name="start" value="{$START}">
<label>
<i class="icon-calendar"></i>
<input type="text" data-datepicker="start" data-datepicker-end="end" data-datepicker-unset="start_unset" readonly>
</label>
<br>
<a href="#" class="icon-cancel-circled" id="start_unset">{'unset'|translate}</a>
</li>
</ul>
<ul>
<li><label>{'End-Date'|@translate}</label></li>
<li>
<input type="hidden" name="end" value="{$END}">
<label>
<i class="icon-calendar"></i>
<input type="text" data-datepicker="end" data-datepicker-start="start" data-datepicker-unset="end_unset" readonly>
</label>
<br>
<a href="#" class="icon-cancel-circled" id="end_unset">{'unset'|translate}</a>
</li>
</ul>
<label>
{'Element type'|@translate}
<select name="types[]" multiple="multiple" size="4">
{html_options values=$type_option_values output=$type_option_values|translate selected=$type_option_selected}
</select>
</label>
<label>
{'User'|@translate}
<select name="user">
<option value="-1">------------</option>
{html_options options=$user_options selected=$user_options_selected}
</select>
</label>
<label>
{'Image id'|@translate}
<input name="image_id" value="{$IMAGE_ID}" type="text" size="5">
</label>
<label>
{'File name'|@translate}
<input name="filename" value="{$FILENAME}" type="text" size="12">
</label>
<label>
{'IP'|@translate}
<input name="ip" value="{$IP}" type="text" size="12">
</label>
<label>
{'Thumbnails'|@translate}
<select name="display_thumbnail">
{html_options options=$display_thumbnails selected=$display_thumbnail_selected}
</select>
</label>
<input type="submit" name="submit" value="{'Submit'|@translate}">
</fieldset>
</form>
{if isset($search_summary)}
<fieldset>
<legend>{'Summary'|@translate}</legend>
<ul>
<li>{$search_summary.NB_LINES}, {$search_summary.FILESIZE}</li>
<li>
{$search_summary.USERS}
<ul>
<li>{$search_summary.MEMBERS}</li>
<li>{$search_summary.GUESTS}</li>
</ul>
</li>
</ul>
</fieldset>
{/if}
{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>
<th>{'User'|@translate}</th>
<th>{'IP'|@translate}</th>
<th>{'Element'|@translate}</th>
<th>{'Element type'|@translate}</th>
<th>{'Section'|@translate}</th>
<th>{'Album'|@translate} / {'Tags'|@translate}</th>
</tr>
</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 class="IP">{$detail.IP}</td>
<td>{$detail.IMAGE}</td>
<td>{$detail.TYPE}</td>
<td>{$detail.SECTION}</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}

View File

@@ -0,0 +1,25 @@
{if empty($load_mode)}{$load_mode='footer'}{/if}
{include file='include/colorbox.inc.tpl' load_mode=$load_mode}
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
{combine_script id='addAlbum' load=$load_mode path='admin/themes/default/js/addAlbum.js'}
<div style="display:none">
<div id="addAlbumForm">
<form>
{'Parent album'|@translate}<br>
<select name="category_parent"></select>
<br><br>
{'Album name'|@translate}<br>
<input name="category_name" type="text" maxlength="255">
<span id="categoryNameError" style="color:red;">{'The name of an album must not be empty'|translate}</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>

View File

@@ -0,0 +1,9 @@
{combine_script id='jquery.autogrow' load='async' require='jquery' path='themes/default/js/plugins/jquery.autogrow-textarea.js'}
{* Auto size and auto grow textarea *}
{footer_script require='jquery.autogrow'}{literal}
jQuery(document).ready(function(){
jQuery('textarea').css('overflow-y', 'hidden');
// Auto size and auto grow for all text area
jQuery('textarea').autogrow();
});
{/literal}{/footer_script}

View File

@@ -0,0 +1,3 @@
{if empty($load_mode)}{$load_mode='footer'}{/if}
{combine_script id='jquery.colorbox' load=$load_mode require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'}
{combine_css id='jquery.colorbox' path="themes/default/js/plugins/colorbox/style2/colorbox.css"}

View File

@@ -0,0 +1,22 @@
{if empty($load_mode)}{$load_mode='footer'}{/if}
{combine_script id='jquery.ui.timepicker-addon' load=$load_mode require='jquery.ui.datepicker,jquery.ui.slider' path="themes/default/js/ui/jquery.ui.timepicker-addon.js"}
{$require='jquery.ui.timepicker-addon'}
{assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-`$lang_info.jquery_code`.js"}
{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists}
{combine_script id="jquery.ui.datepicker-`$lang_info.jquery_code`" load=$load_mode require='jquery.ui.datepicker' path=$datepicker_language}
{$require=$require|cat:",jquery.ui.datepicker-`$lang_info.jquery_code`"}
{/if}
{assign var="timepicker_language" value="themes/default/js/ui/i18n/jquery.ui.timepicker-`$lang_info.jquery_code`.js"}
{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists}
{combine_script id="jquery.ui.timepicker-`$lang_info.jquery_code`" load=$load_mode require='jquery.ui.timepicker-addon' path=$timepicker_language}
{$require=$require|cat:",jquery.ui.timepicker-`$lang_info.jquery_code`"}
{/if}
{combine_script id='datepicker' load=$load_mode require=$require path='admin/themes/default/js/datepicker.js'}
{combine_css path="themes/default/js/ui/theme/jquery.ui.theme.css"}
{combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"}
{combine_css path="themes/default/js/ui/theme/jquery.ui.datepicker.css"}
{combine_css path="themes/default/js/ui/theme/jquery.ui.timepicker-addon.css"}

View File

@@ -0,0 +1,16 @@
{* was used in double_select.tpl until Piwigo 2.8, no longer used in Piwigo core *}
{footer_script require='jquery.ui.resizable'}{literal}
jQuery(document).ready(function(){
// Resize possible for double select list
jQuery(".doubleSelect select.categoryList").resizable({
handles: "w,e",
animate: true,
animateDuration: "slow",
animateEasing: "swing",
preventDefault: true,
preserveCursor: true,
autoHide: true,
ghost: true
});
});
{/literal}{/footer_script}

View File

@@ -0,0 +1,19 @@
<script type="text/javascript" src="template-common/lib/jquery.packed.js"></script>
{literal}
<script type="text/javascript">
$(function() {
$option_selected = $('#dblayer option:selected').attr('value');
if ($option_selected=='sqlite' || $option_selected=='pdo-sqlite') {
$('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide();
}
$('#dblayer').change(function() {
$db = this;
if ($db.value=='sqlite' || $db.value=='pdo-sqlite') {
$('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide();
} else {
$('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().show();
}
});
});
</script>
{/literal}

View File

@@ -0,0 +1,16 @@
{* Resize possible *}
{footer_script require='jquery.ui.resizable'}{literal}
jQuery().ready(function(){
// Resize possible for list
jQuery(".categoryList").resizable({
handles: "all",
animate: true,
animateDuration: "slow",
animateEasing: "swing",
preventDefault: true,
preserveCursor: true,
autoHide: true,
ghost: true
});
});
{/literal}{/footer_script}

View File

@@ -0,0 +1,15 @@
{footer_script require='jquery'}{literal}
jQuery(document).ready(function(){
jQuery(".tagSelection").on("click", "label", function () {
var parent = jQuery(this).parent('li');
var checkbox = jQuery(this).children("input[type=checkbox]");
if (jQuery(checkbox).is(':checked')) {
parent.addClass("tagSelected");
}
else {
parent.removeClass('tagSelected');
}
});
});
{/literal}{/footer_script}

View File

@@ -0,0 +1,311 @@
<!DOCTYPE html>
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$T_CONTENT_ENCODING}">
<meta http-equiv="Content-script-type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
{get_combined_css}
{foreach from=$themes item=theme}
{if $theme.load_css}
{combine_css path="admin/themes/`$theme.id`/theme.css" order=-10}
{/if}
{/foreach}
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/default/fix-ie7.css">
<![endif]-->
<!-- BEGIN get_combined_scripts -->
{get_combined_scripts load='header'}
<!-- END get_combined_scripts -->
{combine_script id='jquery' path='themes/default/js/jquery.min.js'}
{literal}
<script type="text/javascript">
$(document).ready(function() {
$("a.externalLink").click(function() {
window.open($(this).attr("href"));
return false;
});
$("#admin_mail").keyup(function() {
$(".adminEmail").text($(this).val());
});
});
</script>
<style type="text/css">
body {
font-size:12px;
}
#content {
width: 800px;
margin: auto;
text-align: center;
padding:0;
background-color:transparent !important;
border:none;
}
#theHeader {
display: block;
background:url("admin/themes/clear/images/piwigo_logo_big.png") no-repeat scroll center 20px transparent;
height:100px;
}
fieldset {
margin-top:20px;
background-color:#f1f1f1;
}
legend {
font-weight:bold;
letter-spacing:2px;
}
.content h2 {
display:block;
font-size:20px;
text-align:center;
/* margin-top:5px; */
}
table.table2 {
width: 100%;
border:0;
}
table.table2 td {
text-align: left;
padding: 5px 2px;
}
table.table2 td.fieldname {
font-weight:normal;
}
table.table2 td.fielddesc {
padding-left:10px;
font-style:italic;
}
input[type="submit"], input[type="button"], a.bigButton {
font-size:14px;
font-weight:bold;
letter-spacing:2px;
border:none;
background-color:#666666;
color:#fff;
padding:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
}
input[type="submit"]:hover, input[type="button"]:hover, a.bigButton:hover {
background-color:#ff7700;
color:white;
}
input[type="text"], input[type="password"], select {
background-color:#ddd;
border:2px solid #ccc;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
padding:2px;
}
input[type="text"]:focus, input[type="password"]:focus, select:focus {
background-color:#fff;
border:2px solid #ff7700;
}
.sql_content, .infos a {
color: #ff3363;
}
.errors {
padding-bottom:5px;
}
</style>
{/literal}
{combine_script id='jquery.cluetip' load='async' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'}
{footer_script require='jquery.cluetip'}
jQuery().ready(function(){ldelim}
jQuery('.cluetip').cluetip({ldelim}
width: 300,
splitTitle: '|',
positionBy: 'bottomTop'
});
});
{/footer_script}
<title>Piwigo {$RELEASE} - {'Installation'|@translate}</title>
</head>
<body>
<div id="the_page">
<div id="theHeader"></div>
<div id="content" class="content">
<h2>{'Version'|@translate} {$RELEASE} - {'Installation'|@translate}</h2>
{if isset($config_creation_failed)}
<div class="errors">
<p style="margin-left:30px;">
<strong>{'Creation of config file local/config/database.inc.php failed.'|@translate}</strong>
</p>
<ul>
<li>
<p>{'You can download the config file and upload it to local/config directory of your installation.'|@translate}</p>
<p style="text-align:center">
<input type="button" value="{'Download the config file'|@translate}" onClick="window.open('{$config_url}');">
</p>
</li>
<li>
<p>{'An alternate solution is to copy the text in the box above and paste it into the file "local/config/database.inc.php" (Warning : database.inc.php must only contain what is in the textarea, no line return or space character)'|@translate}</p>
<textarea rows="15" cols="70">{$config_file_content}</textarea>
</li>
</ul>
</div>
{/if}
{if isset($errors)}
<div class="errors">
<ul>
{foreach from=$errors item=error}
<li>{$error}</li>
{/foreach}
</ul>
</div>
{/if}
{if isset($infos)}
<div class="infos">
<ul>
{foreach from=$infos item=info}
<li>{$info}</li>
{/foreach}
</ul>
</div>
{/if}
{if isset($install)}
<form method="POST" action="{$F_ACTION}" name="install_form">
<fieldset>
<legend>{'Basic configuration'|@translate}</legend>
<table class="table2">
<tr>
<td style="width: 30%">{'Default gallery language'|@translate}</td>
<td>
<select name="language" onchange="document.location = 'install.php?language='+this.options[this.selectedIndex].value;">
{html_options options=$language_options selected=$language_selection}
</select>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>{'Database configuration'|@translate}</legend>
<table class="table2">
<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 or other, supplied by your host provider'|@translate}</td>
</tr>
<tr>
<td class="fieldname">{'User'|@translate}</td>
<td><input type="text" name="dbuser" value="{$F_DB_USER}"></td>
<td class="fielddesc">{'user login given by your host provider'|@translate}</td>
</tr>
<tr>
<td class="fieldname">{'Password'|@translate}</td>
<td><input type="password" name="dbpasswd" value=""></td>
<td class="fielddesc">{'user password given by your host provider'|@translate}</td>
</tr>
<tr>
<td class="fieldname">{'Database name'|@translate}</td>
<td><input type="text" name="dbname" value="{$F_DB_NAME}"></td>
<td class="fielddesc">{'also given by your host provider'|@translate}</td>
</tr>
<tr>
<td class="fieldname">{'Database table prefix'|@translate}</td>
<td><input type="text" name="prefix" value="{$F_DB_PREFIX}"></td>
<td class="fielddesc">{'database tables names will be prefixed with it (enables you to manage better your tables)'|@translate}</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>{'Admin configuration'|@translate}</legend>
<table class="table2">
<tr>
<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">{'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>
<tr>
<td class="fieldname">{'Password [confirm]'|@translate}</td>
<td><input type="password" name="admin_pass2" value=""></td>
<td class="fielddesc">{'verification'|@translate}</td>
</tr>
<tr>
<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>
<tr>
<td>{'Options'|@translate}</options>
<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:$EMAIL}</span>
</label>
<br>
<label>
<input type="checkbox" name="send_password_by_mail" checked="checked">
{'Send my connection settings by email'|@translate}
</label>
</td>
</tr>
</table>
</fieldset>
<div style="text-align:center; margin:20px 0 10px 0">
<input class="submit" type="submit" name="install" value="{'Start Install'|@translate}">
</div>
</form>
{else}
<p>
<a class="bigButton" href="index.php">{'Visit Gallery'|@translate}</a>
</p>
{/if}
</div> {* content *}
<div style="text-align: center">{$L_INSTALL_HELP}</div>
</div> {* the_page *}
<!-- BEGIN get_combined_scripts -->
{get_combined_scripts load='footer'}
<!-- END get_combined_scripts -->
</body>
</html>

View File

@@ -0,0 +1,177 @@
{include file='include/colorbox.inc.tpl'}
{combine_script id='jquery.cluetip' load='async' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'}
{footer_script require='jquery.cluetip'}
var piwigo_need_update_msg = '<a href="admin.php?page=updates">{'A new version of Piwigo is available.'|@translate|@escape:"javascript"} <i class="icon-right"></i></a>';
var ext_need_update_msg = '<a href="admin.php?page=updates&amp;tab=ext">{'Some upgrades are available for extensions.'|@translate|@escape:"javascript"} <i class="icon-right"></i></a>';
{literal}
jQuery().ready(function(){
jQuery('.cluetip').cluetip({
width: 300,
splitTitle: '|',
positionBy: 'bottomTop'
});
jQuery.ajax({
type: 'GET',
url: 'ws.php',
dataType: 'json',
data: { method: 'pwg.extensions.checkUpdates', format: 'json' },
timeout: 5000,
success: function (data) {
if (data['stat'] != 'ok')
return;
piwigo_update = data['result']['piwigo_need_update'];
ext_update = data['result']['ext_need_update']
if ((piwigo_update || ext_update) && !jQuery(".warnings").is('div'))
jQuery(".eiw").prepend('<div class="warnings"><i class="eiw-icon icon-attention"></i><ul></ul></div>');
if (piwigo_update)
jQuery(".warnings ul").append('<li>'+piwigo_need_update_msg+'</li>');
if (ext_update)
jQuery(".warnings ul").append('<li>'+ext_need_update_msg+'</li>');
}
});
});
{/literal}
{/footer_script}
{html_style}
.stat-boxes {
text-align:left;
margin:10px;
}
.stat-box {
display:inline-block;
width:200px;
margin:10px;
color:#777;
}
div.stat-box {
cursor:help;
}
.stat-box:hover {
color:#ff7700;
}
.stat-box i {
font-size:50px;
float:left;
margin-right:5px;
}
.stat-box .number, .stat-box .caption {
display:inline-block;
width:120px;
text-align:left;
}
.stat-box .number {
margin-top:10px;
font-size:20px;
}
.eiw .messages ul li {
list-style-type:none !important;
}
.eiw .messages .eiw-icon {
margin-right:10px !important;
}
{/html_style}
<h2>{'Piwigo Administration'|@translate}</h2>
<div class="stat-boxes">
{if $NB_PHOTOS > 1}
<a class="stat-box" href="{$U_ADD_PHOTOS}">
<i class="icon-picture"></i>
<span class="number">{$NB_PHOTOS|number_format}</span><span class="caption">{'Photos'|translate}</span>
</a>
{/if}
{if $NB_ALBUMS > 1}
<a class="stat-box" href="{$U_CATEGORIES}">
<i class="icon-sitemap"></i>
<span class="number">{$NB_ALBUMS}</span><span class="caption">{'Albums'|translate}</span>
</a>
{/if}
{if $NB_TAGS > 1}
<a class="stat-box" href="{$U_TAGS}">
<i class="icon-tags"></i>
<span class="number">{$NB_TAGS}</span><span class="caption" title="{'%d associations'|translate:$NB_IMAGE_TAG}">{'Tags'|translate}</span>
</a>
{/if}
{if $NB_USERS > 2}
<a class="stat-box" href="{$U_USERS}">
<i class="icon-users"></i>
<span class="number">{$NB_USERS}</span><span class="caption">{'Users'|translate}</span>
</a>
{/if}
{if $NB_GROUPS > 0}
<a class="stat-box" href="{$U_GROUPS}">
<i class="icon-group"></i>
<span class="number">{$NB_GROUPS}</span><span class="caption">{'Groups'|translate}</span>
</a>
{/if}
{if $NB_COMMENTS > 1}
<a class="stat-box" href="{$U_COMMENTS}">
<i class="icon-chat"></i>
<span class="number">{$NB_COMMENTS}</span><span class="caption">{'Comments'|translate}</span>
</a>
{/if}
{if $NB_RATES > 0}
<a class="stat-box" href="{$U_RATING}">
<i class="icon-star"></i>
<span class="number">{$NB_RATES}</span><span class="caption">{'Rating'|translate}</span>
</a>
{/if}
{if $NB_VIEWS > 0}
<a class="stat-box" href="{$U_HISTORY_STAT}">
<i class="icon-signal"></i>
<span class="number">{$NB_VIEWS}</span><span class="caption">{'Pages seen'|translate}</span>
</a>
{/if}
{if $NB_PLUGINS > 0}
<a class="stat-box" href="{$U_PLUGINS}">
<i class="icon-puzzle"></i>
<span class="number">{$NB_PLUGINS}</span><span class="caption">{'Plugins'|translate}</span>
</a>
{/if}
<div class="stat-box">
<i class="icon-hdd"></i>
<span class="number">{$STORAGE_USED}</span><span class="caption">{'Storage used'|translate}</span>
</div>
{if $NB_PHOTOS > 1}
<div class="stat-box">
<i class="icon-back-in-time"></i>
<span class="number">{$first_added_age}</span><span class="caption" title="{'first photo added on %s'|translate:$first_added_date}">{'First photo added'|translate}</span>
</div>
{/if}
</div> {* .stat-boxes *}
<p class="showCreateAlbum">
{if $ENABLE_SYNCHRONIZATION}
<a href="{$U_QUICK_SYNC}" class="icon-exchange">{'Quick Local Synchronization'|translate}</a>
{/if}
<br><a href="{$U_CHECK_UPGRADE}" class="icon-arrows-cw">{'Check for upgrade'|@translate}</a>
{if isset($SUBSCRIBE_BASE_URL)}
<br><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" class="externalLink cluetip icon-mail-alt" 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>
{/if}
</p>

View File

@@ -0,0 +1,46 @@
<div class="titrePage">
<h2>{'Installed Languages'|@translate}</h2>
</div>
{foreach from=$language_states item=language_state}
<fieldset>
<legend>
{if $language_state == 'active'}
{'Active Languages'|@translate}
{elseif $language_state == 'inactive'}
{'Inactive Languages'|@translate}
{/if}
</legend>
<div class="languageBoxes">
{foreach from=$languages item=language}
{if $language.state == $language_state}
<div class="languageBox{if $language.is_default} languageDefault{/if}">
<div class="languageName">{$language.name}{if $language.is_default} <em>({'default'|@translate})</em>{/if}</div>
<div class="languageActions">
<div>
{if $language_state == 'active'}
{if $language.deactivable}
<a href="{$language.u_action}&amp;action=deactivate" class="tiptip" title="{'Forbid this language to users'|@translate}">{'Deactivate'|@translate}</a>
{else}
<span title="{$language.deactivate_tooltip}">{'Deactivate'|@translate}</span>
{/if}
{if not $language.is_default}
| <a href="{$language.u_action}&amp;action=set_default" class="tiptip" title="{'Set as default language for unregistered and new users'|@translate}">{'Default'|@translate}</a>
{/if}
{/if}
{if $language_state == 'inactive'}
<a href="{$language.u_action}&amp;action=activate" class="tiptip" title="{'Make this language available to users'|@translate}">{'Activate'|@translate}</a>
| <a href="{$language.u_action}&amp;action=delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');" class="tiptip" title="{'Delete this language'|@translate}">{'Delete'|@translate}</a>
{/if}
</div>
</div> <!-- languageActions -->
</div> <!-- languageBox -->
{/if}
{/foreach}
</div> <!-- languageBoxes -->
</fieldset>
{/foreach}

View File

@@ -0,0 +1,41 @@
{combine_script id='jquery.cluetip' load='async' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'}
{footer_script require='jquery.cluetip'}
jQuery().ready(function(){ldelim}
jQuery('.cluetip').cluetip({ldelim}
width: 300,
splitTitle: '|'
});
});
{/footer_script}
<div class="titrePage">
<h2>{'Add New Language'|@translate}</h2>
</div>
{if !empty($languages)}
<table class="table2 languages">
<thead>
<tr class="throw">
<td>{'Language'|@translate}</td>
<td>{'Version'|@translate}</td>
<td>{'Date'|@translate}</td>
<td>{'Author'|@translate}</td>
<td>{'Actions'|@translate}</td>
</tr>
</thead>
{foreach from=$languages item=language name=languages_loop}
<tr class="{if $smarty.foreach.languages_loop.index is odd}row1{else}row2{/if}">
<td><a href="{$language.EXT_URL}" class="externalLink cluetip" title="{$language.EXT_NAME}|{$language.EXT_DESC|@htmlspecialchars|@nl2br}">{$language.EXT_NAME}</a></td>
<td style="text-align:center;"><a href="{$language.EXT_URL}" class="externalLink cluetip" title="{$language.EXT_NAME}|{$language.VER_DESC|@htmlspecialchars|@nl2br}">{$language.VERSION}</a></td>
<td>{$language.DATE}</td>
<td>{$language.AUTHOR}</td>
<td style="text-align:center;"><a href="{$language.URL_INSTALL}">{'Install'|@translate}</a>
/ <a href="{$language.URL_DOWNLOAD}">{'Download'|@translate}</a>
</td>
</tr>
{/foreach}
</table>
{else}
<p>{'There is no other language available.'|@translate}</p>
{/if}

View File

@@ -0,0 +1,54 @@
<div class="titrePage">
<h2>{'Maintenance'|@translate}</h2>
</div>
<ul>
{if (isset($U_MAINT_LOCK_GALLERY))}
<li><a href="{$U_MAINT_LOCK_GALLERY}" onclick="return confirm('{'A locked gallery is only visible to administrators'|@translate|@escape:'javascript'}');">{'Lock gallery'|@translate}</a></li>
{else}
<li><a href="{$U_MAINT_UNLOCK_GALLERY}">{'Unlock gallery'|@translate}</a></li>
{/if}
</ul>
<ul>
{foreach from=$advanced_features item=feature}
<li><a href="{$feature.URL}">{$feature.CAPTION}</a></li>
{/foreach}
</ul>
<ul>
<li><a href="{$U_MAINT_CATEGORIES}">{'Update albums informations'|@translate}</a></li>
<li><a href="{$U_MAINT_IMAGES}">{'Update photos information'|@translate}</a></li>
</ul>
<ul>
<li><a href="{$U_MAINT_DATABASE}">{'Repair and optimize database'|@translate}</a></li>
<li><a href="{$U_MAINT_C13Y}">{'Reinitialize check integrity'|@translate}</a></li>
</ul>
<ul>
<li><a href="{$U_MAINT_USER_CACHE}">{'Purge user cache'|@translate}</a></li>
<li><a href="{$U_MAINT_ORPHAN_TAGS}">{'Delete orphan tags'|@translate}</a></li>
<li><a href="{$U_MAINT_HISTORY_DETAIL}" onclick="return confirm('{'Purge history detail'|@translate|@escape:'javascript'}');">{'Purge history detail'|@translate}</a></li>
<li><a href="{$U_MAINT_HISTORY_SUMMARY}" onclick="return confirm('{'Purge history summary'|@translate|@escape:'javascript'}');">{'Purge history summary'|@translate}</a></li>
<li><a href="{$U_MAINT_SESSIONS}">{'Purge sessions'|@translate}</a></li>
<li><a href="{$U_MAINT_FEEDS}">{'Purge never used notification feeds'|@translate}</a></li>
<li><a href="{$U_MAINT_SEARCH}"onclick="return confirm('{'Purge search history'|@translate|@escape:'javascript'}');">{'Purge search history'|@translate}</a></li>
<li><a href="{$U_MAINT_COMPILED_TEMPLATES}">{'Purge compiled templates'|@translate}</a></li>
<li>{'Delete multiple size images'|@translate}:
{foreach from=$purge_derivatives key=name item=url name=loop}{if !$smarty.foreach.loop.first}, {/if}<a href="{$url}"{if $smarty.foreach.loop.first} onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"{/if}>{$name}</a>{/foreach}
</li>
</ul>
<fieldset id="environment">
<legend><i class="icon-cog"></i> {'Environment'|@translate}</legend>
<ul>
<li><a href="{$PHPWG_URL}" class="externalLink">Piwigo</a> {$PWG_VERSION}</li>
<li>{'Operating system'|@translate}: {$OS}</li>
<li>PHP: {$PHP_VERSION} (<a href="{$U_PHPINFO}" class="externalLink">{'Show info'|@translate}</a>) [{$PHP_DATATIME}]</li>
<li>{$DB_ENGINE}: {$DB_VERSION} [{$DB_DATATIME}]</li>
{if isset($GRAPHICS_LIBRARY)}
<li>{'Graphics Library'|@translate}: {$GRAPHICS_LIBRARY}</li>
{/if}
</ul>
</fieldset>

View File

@@ -0,0 +1,74 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{footer_script require='jquery.ui.sortable'}{literal}
jQuery(document).ready(function(){
jQuery(".menuPos").hide();
jQuery(".drag_button").show();
jQuery(".menuLi").css("cursor","move");
jQuery(".menuUl").sortable({
axis: "y",
opacity: 0.8
});
jQuery("input[name^='hide_']").click(function() {
men = this.name.split('hide_');
if (this.checked) {
jQuery("#menu_"+men[1]).addClass('menuLi_hidden');
} else {
jQuery("#menu_"+men[1]).removeClass('menuLi_hidden');
}
});
jQuery("#menuOrdering").submit(function(){
ar = jQuery('.menuUl').sortable('toArray');
for(i=0;i<ar.length;i++) {
men = ar[i].split('menu_');
document.getElementsByName('pos_' + men[1])[0].value = i+1;
}
});
});
{/literal}{/footer_script}
{html_style}
.font-checkbox i {
margin-left:5px;
}
{/html_style}
<div class="titrePage">
<h2>{'Menu Management'|@translate}</h2>
</div>
<form id="menuOrdering" action="{$F_ACTION}" method="post">
<ul class="menuUl">
{foreach from=$blocks item=block name="block_loop"}
<li class="menuLi {if $block.pos<0}menuLi_hidden{/if}" id="menu_{$block.reg->get_id()}">
<p>
<span>
<label class="font-checkbox"><strong>{'Hide'|@translate}</strong><i class="icon-check"></i><input type="checkbox" name="hide_{$block.reg->get_id()}" {if $block.pos<0}checked="checked"{/if}></label>
</span>
<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>
{if $block.reg->get_owner() != 'piwigo'}
<p class="menuAuthor">
{'Author'|@translate}: <i>{$block.reg->get_owner()}</i>
</p>
{/if}
<p class="menuPos">
<label>
{'Position'|@translate} :
<input type="text" size="4" name="pos_{$block.reg->get_id()}" maxlength="4" value="{math equation="abs(pos)" pos=$block.pos}">
</label>
</p>
</li>
{/foreach}
</ul>
<p class="menuSubmit">
<button name="submit" type="submit" class="buttonLike">
<i class="icon-floppy"></i> {'Save Settings'|@translate}
</button>
</p>
</form>

View File

@@ -0,0 +1,28 @@
<div class="navigationBar">
{if isset($navbar.URL_FIRST)}
<a href="{$navbar.URL_FIRST}" rel="first">{'First'|@translate}</a> |
<a href="{$navbar.URL_PREV}" rel="prev">{'Previous'|@translate}</a> |
{else}
{'First'|@translate} |
{'Previous'|@translate} |
{/if}
{assign var='prev_page' value=0}
{foreach from=$navbar.pages key=page item=url}
{if $page > $prev_page+1}...{/if}
{if $page == $navbar.CURRENT_PAGE}
<span class="pageNumberSelected">{$page}</span>
{else}
<a href="{$url}">{$page}</a>
{/if}
{assign var='prev_page' value=$page}
{/foreach}
{if isset($navbar.URL_NEXT)}
| <a href="{$navbar.URL_NEXT}" rel="next">{'Next'|@translate}</a>
| <a href="{$navbar.URL_LAST}" rel="last">{'Last'|@translate}</a>
{else}
| {'Next'|@translate}
| {'Last'|@translate}
{/if}
</div>

View File

@@ -0,0 +1,146 @@
{include file='include/autosize.inc.tpl'}
{footer_script}{literal}
jQuery(document).ready(function(){
jQuery("#checkAllLink").click(function () {
jQuery("#notification_by_mail input[type=checkbox]").prop('checked', true);
return false;
});
jQuery("#uncheckAllLink").click(function () {
jQuery("#notification_by_mail input[type=checkbox]").prop('checked', false);
return false;
});
});
{/literal}{/footer_script}
<div class="titrePage">
<h2>{'Send mail to users'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<form method="post" name="notification_by_mail" id="notification_by_mail" action="{$F_ACTION}">
{if isset($REPOST_SUBMIT_NAME)}
<fieldset>
<div class="infos">
<input type="submit" value="{'Continue processing treatment'|@translate}" name="{$REPOST_SUBMIT_NAME}">
</div>
</fieldset>
{/if}
{if isset($param)}
<fieldset>
<legend>{'Parameters'|@translate}</legend>
<table>
<tr>
<td><label>{'Send mail on HTML format'|@translate}</label></td>
<td>
<label><input type="radio" name="nbm_send_html_mail" value="true" {if $param.SEND_HTML_MAIL}checked="checked"{/if}>{'Yes'|@translate}</label>
<label><input type="radio" name="nbm_send_html_mail" value="false" {if not $param.SEND_HTML_MAIL}checked="checked"{/if}>{'No'|@translate}</label>
</td>
</tr>
<tr>
<td>
<label for="send_mail_as">{'Send mail as'|@translate}</label>
<br><i><small>{'With blank value, gallery title will be used'|@translate}</small></i>
</td>
<td><input type="text" maxlength="35" size="35" name="nbm_send_mail_as" id="send_mail_as" value="{$param.SEND_MAIL_AS}"></td>
</tr>
<tr>
<td><label>{'Add detailed content'|@translate}</label></td>
<td>
<label><input type="radio" name="nbm_send_detailed_content" value="true" {if $param.SEND_DETAILED_CONTENT}checked="checked"{/if}>{'Yes'|@translate}</label>
<label><input type="radio" name="nbm_send_detailed_content" value="false" {if not $param.SEND_DETAILED_CONTENT}checked="checked"{/if}>{'No'|@translate}</label>
</td>
</tr>
<tr>
<td><label for="complementary_mail_content">{'Complementary mail content'|@translate}</label></td>
<td><textarea cols="50" rows="5" name="nbm_complementary_mail_content" id="complementary_mail_content">{$param.COMPLEMENTARY_MAIL_CONTENT}</textarea></td>
</tr>
<tr>
<td>
<label>{'Include display of recent photos grouped by dates'|@translate}</label>
<br><i><small>{'Available only with HTML format'|@translate}</small></i>
</td>
<td>
<label><input type="radio" name="nbm_send_recent_post_dates" value="true" {if $param.SEND_RECENT_POST_DATES}checked="checked"{/if}>{'Yes'|@translate}</label>
<label><input type="radio" name="nbm_send_recent_post_dates" value="false" {if not $param.SEND_RECENT_POST_DATES}checked="checked"{/if}>{'No'|@translate}</label>
</td>
</tr>
</table>
</fieldset>
<p>
<input type="submit" value="{'Submit'|@translate}" name="param_submit">
<input type="reset" value="{'Reset'|@translate}" name="param_reset">
</p>
{/if}{* isset $param*}
{if isset($subscribe)}
<fieldset>
<legend>{'Subscribe/unsubscribe users'|@translate}</legend>
<p><i>{'Warning: subscribing or unsubscribing will send mails to users'|@translate}</i></p>
{$DOUBLE_SELECT}
</fieldset>
{/if}{* isset $subscribe*}
{if isset($send)}
{if empty($send.users)}
<p>{'There is no available subscribers to mail.'|@translate}</p>
<p>
{'Subscribers could be listed (available) only if there is new elements to notify.'|@translate}<br>
{'Anyway only webmasters can see this tab and never administrators.'|@translate}
</p>
{else}
<fieldset>
<legend>{'Select recipients'|@translate}</legend>
<table class="table2">
<tr class="throw">
<th>{'User'|@translate}</th>
<th>{'Email'|@translate}</th>
<th>{'Last send'|@translate}</th>
<th>{'To send ?'|@translate}</th>
</tr>
{foreach from=$send.users item=u name=user_loop}
<tr class="{if $smarty.foreach.user_loop.index is odd}row1{else}row2{/if}">
<td><label for="send_selection-{$u.ID}">{$u.USERNAME}</label></td>
<td><label for="send_selection-{$u.ID}">{$u.EMAIL}</label></td>
<td><label for="send_selection-{$u.ID}">{$u.LAST_SEND}</label></td>
<td><input type="checkbox" name="send_selection[]" value="{$u.ID}" {$u.CHECKED} id="send_selection-{$u.ID}"></td>
</tr>
{/foreach}
</table>
<p>
<a href="#" id="checkAllLink">{'Check all'|@translate}</a>
/ <a href="#" id="uncheckAllLink">{'Uncheck all'|@translate}</a>
</p>
</fieldset>
<fieldset>
<legend>{'Options'|@translate}</legend>
<table>
<tr>
<td><label for="send_customize_mail_content">{'Complementary mail content'|@translate}</label></td>
<td><textarea cols="50" rows="5" name="send_customize_mail_content" id="send_customize_mail_content">{$send.CUSTOMIZE_MAIL_CONTENT}</textarea></td>
</tr>
</table>
</fieldset>
{if isset($auth_key_duration)}
<fieldset>
<legend>{'Informations'|@translate}</legend>
<p>
{'Each email sent will contain its own automatic authentication key on links, valid for %s.'|translate:$auth_key_duration}
<br>{'For security reason, authentication keys do not work for administrators.'|translate}
</p>
</fieldset>
{/if}
<p>
<input type="submit" value="{'Send'|@translate}" name="send_submit">
</p>
{/if}
{/if}{* isset $send*}
</form>

View File

@@ -0,0 +1,107 @@
{footer_script require='jquery.ui.sortable'}{literal}
jQuery(document).ready(function(){
jQuery("#addPermalinkOpen").click(function(){
jQuery("#addPermalink").show();
jQuery("#showAddPermalink").hide();
});
jQuery("#addPermalinkClose").click(function(){
jQuery("#addPermalink").hide();
jQuery("#showAddPermalink").show();
});
});
{/literal}{/footer_script}
{literal}
<style>
#showAddPermalink {text-align:left;margin-left:1em;margin-top:0;}
form fieldset p {margin:0 0 1em 0;}
form fieldset p.actionButtons {margin-bottom:0}
</style>
{/literal}
{html_style}
[name="permalink"] {
width : 100%;
max-width : 600px;
}
{/html_style}
<div class="titrePage">
<h2>{'Permalinks'|@translate}</h2>
</div>
<p id="showAddPermalink"><a href="#" id="addPermalinkOpen">{'Add/delete a permalink'|@translate}</a></p>
<form method="post" action="" id="addPermalink" style="display:none">
<fieldset>
<legend>{'Add/delete a permalink'|@translate}</legend>
<p>
<strong>{'Album'|@translate}</strong>
<br>
<select name="cat_id">
<option value="0">------</option>
{html_options options=$categories selected=$categories_selected}
</select>
</p>
<p>
<strong>{'Permalink'|@translate}</strong>
<br><input name="permalink">
</p>
<p>
<label><input type="checkbox" name="save" checked="checked"> <strong>{'Save to permalink history'|@translate}</strong></label>
</p>
<p class="actionButtons">
<input type="submit" class="submit" name="set_permalink" value="{'Submit'|@translate}">
<a href="#" id="addPermalinkClose">{'Cancel'|@translate}</a>
</p>
</fieldset>
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
</form>
<fieldset>
<legend>{'Permalinks'|@translate}</legend>
<table class="table2" style="margin:0">
<tr class="throw">
<td>Id {$SORT_ID}</td>
<td>{'Album'|@translate} {$SORT_NAME}</td>
<td>{'Permalink'|@translate} {$SORT_PERMALINK}</td>
</tr>
{foreach from=$permalinks item=permalink name="permalink_loop"}
<tr class="{if $smarty.foreach.permalink_loop.index is odd}row1{else}row2{/if}" style="line-height:1.5em;">
<td style="text-align:center;">{$permalink.id}</td>
<td>{$permalink.name}</td>
<td>{$permalink.permalink}</td>
</tr>
{/foreach}
</table>
</fieldset>
<fieldset>
<legend>{'Permalink history'|@translate} <a name="old_permalinks"></a></legend>
<table class="table2" style="margin:0">
<tr class="throw">
<td>Id {$SORT_OLD_CAT_ID}</td>
<td>{'Album'|@translate}</td>
<td>{'Permalink'|@translate} {$SORT_OLD_PERMALINK}</td>
<td>{'Deleted on'|@translate} {$SORT_OLD_DATE_DELETED}</td>
<td>{'Last hit'|@translate} {$SORT_OLD_LAST_HIT}</td>
<td>{'Hit'|@translate} {$SORT_OLD_HIT}</td>
<td style="width:5px;"></td>
</tr>
{foreach from=$deleted_permalinks item=permalink}
<tr style="line-height:1.5em;">
<td style="text-align:center;">{$permalink.cat_id}</td>
<td>{$permalink.name}</td>
<td>{$permalink.permalink}</td>
<td>{$permalink.date_deleted}</td>
<td>{$permalink.last_hit}</td>
<td>{$permalink.hit}</td>
<td><a href="{$permalink.U_DELETE}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/delete.png" alt="[{'Delete'|@translate}]"></a></td>
</tr>
{/foreach}
</table>
</fieldset>

View File

@@ -0,0 +1,128 @@
{include file='include/colorbox.inc.tpl'}
{footer_script}{literal}
jQuery().ready(function(){
jQuery(".illustration a").colorbox({rel:'group1'});
});
{/literal}{/footer_script}
{html_head}{literal}
<style type="text/css">
.illustration {float:left; margin-right:10px;}
fieldset p {text-align:left;margin-top:0}
</style>
{/literal}{/html_head}
<div class="titrePage">
<h2>{'Upload Photos'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<fieldset>
<legend>Piwigo Remote Sync</legend>
<div class="illustration"><a href="http://piwigo.org/screenshots/applications/piwigo-remote-sync.png" title="Piwigo Remote Sync"><img src="http://piwigo.org/screenshots/applications/thumbnail/piwigo-remote-sync.jpg"></a></div>
<p>{'Piwigo Remote Sync is able to upload a whole folder hierarchy. If you run it again, only new photos will be uploaded.'|@translate}</p>
<p><a href="http://piwigo.org/ext/extension_view.php?eid=851" target="_blank">{'Learn more'|@translate}</a></p>
</fieldset>
<fieldset>
<legend>{'Piwigo for iOS (iPhone, iPad, iPod Touch)'|@translate}</legend>
<div class="illustration"><a href="http://piwigo.org/screenshots/applications/piwigo-ios.jpg" title="{'Piwigo for iOS (iPhone, iPad, iPod Touch)'|@translate}"><img src="http://piwigo.org/screenshots/applications/thumbnail/piwigo-ios.jpg"></a></div>
<p>{'<em>Piwigo for iOS</em> application empowers you to connect to your Piwigo gallery from your iPhone, iPad or iPod Touch, create some albums and upload several photos at once.'|@translate}</p>
<p>
{'Available on'|@translate} <a target="_blank" href="http://itunes.apple.com/us/app/piwigo/id472225196">Apple AppStore</a>
</p>
</fieldset>
<fieldset>
<legend>Lightroom</legend>
<div class="illustration"><a href="http://piwigo.org/screenshots/applications/lightroom.png" title="{'Piwigo Publish plugin for Lightroom'|@translate}"><img src="http://piwigo.org/screenshots/applications/thumbnail/lightroom.jpg"></a></div>
<p>
{'Adobe Photoshop Lightroom is a photography software designed to manage large quantities of digital images and doing post production work.'|@translate}
{'The Piwigo publish Plug-in allows you to export and synchronize photos from Lightroom directly to your Piwigo photo gallery.'|@translate}
</p>
<p>
{'Available on'|@translate} <a target="_blank" href="http://alloyphoto.com/plugins/piwigo/">alloyphoto.com</a>
</p>
</fieldset>
<fieldset>
<legend>Shotwell</legend>
<div class="illustration"><a href="http://piwigo.org/screenshots/applications/shotwell.png" title="{'Piwigo publish plugin for Shotwell'|@translate}"><img src="http://piwigo.org/screenshots/applications/thumbnail/shotwell.jpg"></a></div>
<p>{'Shotwell is an open source digital photo organizer that runs on Linux. It is the default photo manager in Ubuntu and Fedora.'|@translate}</p>
<p>
{'On your Linux, simply install Shotwell with your package manager and the activate Piwigo publishing option.'|@translate}
<a href="http://yorba.org/shotwell/" target="_blank">{'Learn more'|@translate}</a>
</p>
</fieldset>
<fieldset>
<legend>digiKam</legend>
<div class="illustration"><a href="http://piwigo.org/screenshots/applications/digikam.png" title="{'Piwigo publish plugin for digiKam'|@translate}"><img src="http://piwigo.org/screenshots/applications/thumbnail/digikam.jpg"></a></div>
<p>
{'digiKam is an advanced digital photo management free software for Linux, Windows, and MacOSX.'|@translate}
{'digiKam is designed for photographers who want to view, manage, edit, enhance, organize, tag, and share photographs.'|@translate}
</p>
<p>
{'To export your photos from digiKam to Piwigo, simply install digiKam and the Kipi-plugins.'|@translate}
<a href="http://digikam.org/" target="_blank">{'Learn more'|@translate}</a>
</p>
</fieldset>
<fieldset>
<legend>MacShareToPiwigo</legend>
<div class="illustration"><a href="http://piwigo.org/screenshots/applications/macsharetopiwigo.jpg" title="MacShareToPiwigo"><img src="http://piwigo.org/screenshots/applications/thumbnail/macsharetopiwigo.jpg"></a></div>
<p>{'Share / Send your photos directly from your Mac Os X (10.10 and following) to Piwigo'|@translate}</p>
<p>
<a target="_blank" href="http://piwigo.org/ext/extension_view.php?eid=804">{'Learn more'|@translate}</a>
</p>
</fieldset>
<fieldset>
<legend>iPhoto</legend>
<div class="illustration"><a href="http://piwigo.org/screenshots/applications/iphoto.jpg" title="{'Piwigo export plugin for iPhoto'|@translate}"><img src="http://piwigo.org/screenshots/applications/thumbnail/iphoto.jpg"></a></div>
<p>{'iPhoto is the default photo manager on MacOSX. The Piwigo export plugin let you create new albums and export your photos directly from iPhoto to your Piwigo photo gallery.'|@translate}</p>
<p>
<a target="_blank" href="http://piwigo.org/ext/extension_view.php?eid=592">{'Learn more'|@translate}</a>
</p>
</fieldset>
<fieldset>
<legend>Aperture</legend>
<div class="illustration"><a href="http://piwigo.org/screenshots/applications/aperture.png" title="{'Piwigo export plugin for Aperture'|@translate}"><img src="http://piwigo.org/screenshots/applications/thumbnail/aperture.jpg"></a></div>
<p>
{'Aperture is a powerful tool to refine images and manage massive libraries on Mac.'|@translate}
{'Aperture is designed for professional photographers with iPhoto simplicity.'|@translate}
{'The Piwigo export plugin allows you to create albums and export photos.'|@translate}
</p>
<p>
<a target="_blank" href="http://piwigo.org/ext/extension_view.php?eid=598">{'Learn more'|@translate}</a>
</p>
</fieldset>
<fieldset>
<legend>ReGalAndroid</legend>
<div class="illustration"><a href="http://piwigo.org/screenshots/applications/regalandroid.png" title="ReGalAndroid"><img src="http://piwigo.org/screenshots/applications/thumbnail/regalandroid.jpg"></a></div>
<p>
{'ReGalAndroid (RemoteGallery client for Android) is an open source (GPL v3) Piwigo client for the Android platform.'|@translate}
{'Features include gallery browsing, album creation and photo upload.'|@translate}
</p>
<p>
{'Available on'|@translate} <a target="_blank" href="https://play.google.com/store/apps/details?id=net.dahanne.android.regalandroid">Google Play</a>
</p>
</fieldset>

View File

@@ -0,0 +1,329 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js'}
{combine_script id='jquery.plupload' load='footer' require='jquery' path='themes/default/js/plugins/plupload/plupload.full.min.js'}
{combine_script id='jquery.plupload.queue' load='footer' require='jquery' path='themes/default/js/plugins/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js'}
{combine_css path="themes/default/js/plugins/jquery.jgrowl.css"}
{combine_css path="themes/default/js/plugins/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css"}
{assign var="plupload_i18n" value="themes/default/js/plugins/plupload/i18n/`$lang_info.plupload_code`.js"}
{if "PHPWG_ROOT_PATH"|@constant|@cat:$plupload_i18n|@file_exists}
{combine_script id="plupload_i18n-`$lang_info.plupload_code`" load="footer" path=$plupload_i18n require="jquery.plupload.queue"}
{/if}
{include file='include/colorbox.inc.tpl'}
{include file='include/add_album.inc.tpl'}
{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
{combine_script id='piecon' load='footer' path='themes/default/js/plugins/piecon.js'}
{footer_script}
{* <!-- CATEGORIES --> *}
var categoriesCache = new CategoriesCache({
serverKey: '{$CACHE_KEYS.categories}',
serverId: '{$CACHE_KEYS._hash}',
rootUrl: '{$ROOT_URL}'
});
categoriesCache.selectize(jQuery('[data-selectize=categories]'), {
filter: function(categories, options) {
if (categories.length > 0) {
jQuery("#albumSelection, .selectFiles, .showFieldset").show();
}
return categories;
}
});
jQuery('[data-add-album]').pwgAddAlbum({
afterSelect: function() {
jQuery("#albumSelection, .selectFiles, .showFieldset").show();
}
});
Piecon.setOptions({
color: '#ff7700',
background: '#bbb',
shadow: '#fff',
fallback: 'force'
});
var pwg_token = '{$pwg_token}';
var photosUploaded_label = "{'%d photos uploaded'|translate}";
var batch_Label = "{'Manage this set of %d photos'|translate}";
var albumSummary_label = "{'Album "%s" now contains %d photos'|translate|escape}";
var uploadedPhotos = [];
var uploadCategory = null;
{literal}
jQuery(document).ready(function(){
jQuery("#uploadWarningsSummary a.showInfo").click(function() {
jQuery("#uploadWarningsSummary").hide();
jQuery("#uploadWarnings").show();
return false;
});
jQuery("#showPermissions").click(function() {
jQuery(this).parent(".showFieldset").hide();
jQuery("#permissions").show();
return false;
});
jQuery("#uploader").pluploadQueue({
// General settings
browse_button : 'addFiles',
container : 'uploadForm',
// runtimes : 'html5,flash,silverlight,html4',
runtimes : 'html5',
// url : '../upload.php',
url : 'ws.php?method=pwg.images.upload&format=json',
chunk_size: '{/literal}{$chunk_size}{literal}kb',
filters : {
// Maximum file size
max_file_size : '1000mb',
// Specify what files to browse for
mime_types: [
{title : "Image files", extensions : "{/literal}{$file_exts}{literal}"}
]
},
// Rename files by clicking on their titles
// rename: true,
// Enable ability to drag'n'drop files onto the widget (currently only HTML5 supports that)
dragdrop: true,
preinit: {
Init: function (up, info) {
jQuery('#uploader_container').removeAttr("title"); //remove the "using runtime" text
jQuery('#startUpload').on('click', function(e) {
e.preventDefault();
up.start();
});
jQuery('#cancelUpload').on('click', function(e) {
e.preventDefault();
up.stop();
up.trigger('UploadComplete', up.files);
});
}
},
init : {
// update custom button state on queue change
QueueChanged : function(up) {
jQuery('#startUpload').prop('disabled', up.files.length == 0);
},
UploadProgress: function(up, file) {
jQuery('#uploadingActions .progressbar').width(up.total.percent+'%');
Piecon.setProgress(up.total.percent);
},
BeforeUpload: function(up, file) {
//console.log('[BeforeUpload]', file);
// hide buttons
jQuery('#startUpload, #addFiles').hide();
jQuery('#uploadingActions').show();
// warn user if she wants to leave page while upload is running
jQuery(window).bind('beforeunload', function() {
return "{/literal}{'Upload in progress'|translate|escape}{literal}";
});
// no more change on category/level
jQuery("select[name=level]").attr("disabled", "disabled");
// You can override settings before the file is uploaded
up.setOption(
'multipart_params',
{
category : jQuery("select[name=category] option:selected").val(),
level : jQuery("select[name=level] option:selected").val(),
pwg_token : pwg_token
// name : file.name
}
);
},
FileUploaded: function(up, file, info) {
// Called when file has finished uploading
//console.log('[FileUploaded] File:', file, "Info:", info);
// hide item line
jQuery('#'+file.id).hide();
var data = jQuery.parseJSON(info.response);
jQuery("#uploadedPhotos").parent("fieldset").show();
html = '<a href="admin.php?page=photo-'+data.result.image_id+'" target="_blank">';
html += '<img src="'+data.result.src+'" class="thumbnail" title="'+data.result.name+'">';
html += '</a> ';
jQuery("#uploadedPhotos").prepend(html);
// do not remove file, or it will reset the progress bar :-/
// up.removeFile(file);
uploadedPhotos.push(parseInt(data.result.image_id));
uploadCategory = data.result.category;
},
Error: function(up, error) {
// Called when file has finished uploading
//console.log('[Error] error: ', error);
var piwigoApiResponse = jQuery.parseJSON(error.response);
jQuery(".errors ul").append('<li>'+piwigoApiResponse.message+'</li>');
jQuery(".errors").show();
},
UploadComplete: function(up, files) {
// Called when all files are either uploaded or failed
//console.log('[UploadComplete]');
Piecon.reset();
jQuery(".selectAlbum, .selectFiles, #permissions, .showFieldset").hide();
jQuery(".infos").append('<ul><li>'+sprintf(photosUploaded_label, uploadedPhotos.length)+'</li></ul>');
html = sprintf(
albumSummary_label,
'<a href="admin.php?page=album-'+uploadCategory.id+'">'+uploadCategory.label+'</a>',
parseInt(uploadCategory.nb_photos)
);
jQuery(".infos ul").append('<li>'+html+'</li>');
jQuery(".infos").show();
// TODO: use a new method pwg.caddie.empty +
// pwg.caddie.add(uploadedPhotos) instead of relying on huge GET parameter
// (and remove useless code from admin/photos_add_direct.php)
jQuery(".batchLink").attr("href", "admin.php?page=photos_add&section=direct&batch="+uploadedPhotos.join(","));
jQuery(".batchLink").html(sprintf(batch_Label, uploadedPhotos.length));
jQuery(".afterUploadActions").show();
jQuery('#uploadingActions').hide();
// user can safely leave page without warning
jQuery(window).unbind('beforeunload');
}
}
});
{/literal}
});
{/footer_script}
<div class="titrePage">
<h2>{'Upload Photos'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<div id="photosAddContent">
<div class="infos" style="display:none"><i class="eiw-icon icon-ok"></i></div>
<div class="errors" style="display:none"><i class="eiw-icon icon-cancel"></i><ul></ul></div>
<p class="afterUploadActions" style="margin:10px; display:none;"><a class="batchLink"></a> | <a href="admin.php?page=photos_add">{'Add another set of photos'|@translate}</a></p>
{if count($setup_errors) > 0}
<div class="errors">
<ul>
{foreach from=$setup_errors item=error}
<li>{$error}</li>
{/foreach}
</ul>
</div>
{else}
{if count($setup_warnings) > 0}
<div class="warnings">
<ul>
{foreach from=$setup_warnings item=warning}
<li>{$warning}</li>
{/foreach}
</ul>
<div class="hideButton" style="text-align:center"><a href="{$hide_warnings_link}">{'Hide'|@translate}</a></div>
</div>
{/if}
<form id="uploadForm" enctype="multipart/form-data" method="post" action="{$form_action}">
<fieldset class="selectAlbum">
<legend>{'Drop into album'|@translate}</legend>
<span id="albumSelection" style="display:none">
<select data-selectize="categories" data-value="{$selected_category|@json_encode|escape:html}"
data-default="first" name="category" style="width:600px"></select>
<br>{'... or '|@translate}</span>
<a href="#" data-add-album="category" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a>
</fieldset>
<p class="showFieldset" style="display:none"><a id="showPermissions" href="#">{'Manage Permissions'|@translate}</a></p>
<fieldset id="permissions" style="display:none">
<legend>{'Who can see these photos?'|@translate}</legend>
<select name="level" size="1">
{html_options options=$level_options selected=$level_options_selected}
</select>
</fieldset>
<fieldset class="selectFiles" style="display:none">
<legend>{'Select files'|@translate}</legend>
<button id="addFiles" class="buttonLike icon-plus-circled">{'Add Photos'|translate}</button>
{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_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">
{'Allowed file types: %s.'|@translate:$upload_file_types}
{if isset($max_upload_resolution)}
{'Approximate maximum resolution: %dM pixels (that\'s %dx%d pixels).'|@translate:$max_upload_resolution:$max_upload_width:$max_upload_height}
{/if}
</p>
<div id="uploader">
<p>Your browser doesn't have HTML5 support.</p>
</div>
</fieldset>
<div id="uploadingActions" style="display:none">
<button id="cancelUpload" class="buttonLike icon-cancel-circled">{'Cancel'|translate}</button>
<div class="big-progressbar">
<div class="progressbar" style="width:0%"></div>
</div>
</div>
<button id="startUpload" class="buttonLike icon-upload" disabled>{'Start Upload'|translate}</button>
</form>
<fieldset style="display:none">
<legend>{'Uploaded Photos'|@translate}</legend>
<div id="uploadedPhotos"></div>
</fieldset>
{/if} {* $setup_errors *}
</div> <!-- photosAddContent -->

View File

@@ -0,0 +1,9 @@
<div class="titrePage">
<h2>{'Upload Photos'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<div id="ftpPage">
<p><a href="{$U_CAT_UPDATE}">{'Administration'|@translate} &raquo; {'Tools'|@translate} &raquo; {'Synchronize'|@translate}</a></p>
{$FTP_HELP_CONTENT}
</div>

View File

@@ -0,0 +1,73 @@
{html_head}
<link rel="stylesheet" type="text/css" href="themes/default/js/plugins/jquery.Jcrop.css" />
{/html_head}
{combine_script id='jquery.jcrop' load='footer' require='jquery' path='themes/default/js/plugins/jquery.Jcrop.min.js'}
<h2>{$TITLE} &#8250; {'Edit photo'|@translate} {$TABSHEET_TITLE}</h2>
<form method="post">
<fieldset>
<legend>{'Photo sizes with crop'|@translate}</legend>
{foreach from=$cropped_derivatives item=deriv}
<img src="{$deriv.U_IMG}" alt="{$ALT}" {$deriv.HTM_SIZE}>
{/foreach}
</fieldset>
<fieldset>
<legend>{'Center of interest'|@translate}</legend>
<p style="margin:0 0 10px 0;padding:0;">
{'The center of interest is the most meaningful zone in the photo.'|@translate}
{'For photo sizes with crop, such as "Square", Piwigo will do its best to include the center of interest.'|@translate}
{'By default, the center of interest is placed in the middle of the photo.'|@translate}
{'Select a zone with your mouse to define a new center of interest.'|@translate}
</p>
<input type="hidden" id="l" name="l" value="{if isset($coi)}{$coi.l}{/if}">
<input type="hidden" id="t" name="t" value="{if isset($coi)}{$coi.t}{/if}">
<input type="hidden" id="r" name="r" value="{if isset($coi)}{$coi.r}{/if}">
<input type="hidden" id="b" name="b" value="{if isset($coi)}{$coi.b}{/if}">
<img id="jcrop" src="{$U_IMG}" alt="{$ALT}">
<p>
<input type="submit" name="submit" value="{'Submit'|@translate}">
</p>
</fieldset>
</form>
{footer_script}
{literal}
function from_coi(f, total) {
return f*total;
}
function to_coi(v, total) {
return v/total;
}
function jOnChange(sel) {
var $img = jQuery("#jcrop");
jQuery("#l").val( to_coi(sel.x, $img.width()) );
jQuery("#t").val( to_coi(sel.y, $img.height()) );
jQuery("#r").val( to_coi(sel.x2, $img.width()) );
jQuery("#b").val( to_coi(sel.y2, $img.height()) );
}
function jOnRelease() {
jQuery("#l,#t,#r,#b").val("");
}
{/literal}
jQuery("#jcrop").Jcrop( {ldelim}
boxWidth: 500, boxHeight: 400,
onChange: jOnChange,
onRelease: jOnRelease
}
{if isset($coi)}
,function() {ldelim}
var $img = jQuery("#jcrop");
this.animateTo( [from_coi({$coi.l}, $img.width()), from_coi({$coi.t}, $img.height()), from_coi({$coi.r}, $img.width()), from_coi({$coi.b}, $img.height()) ] );
}
{/if}
);
{/footer_script}

View File

@@ -0,0 +1,158 @@
{include file='include/autosize.inc.tpl'}
{include file='include/datepicker.inc.tpl'}
{include file='include/colorbox.inc.tpl'}
{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
{footer_script}
(function(){
{* <!-- CATEGORIES --> *}
var categoriesCache = new CategoriesCache({
serverKey: '{$CACHE_KEYS.categories}',
serverId: '{$CACHE_KEYS._hash}',
rootUrl: '{$ROOT_URL}'
});
categoriesCache.selectize(jQuery('[data-selectize=categories]'));
{* <!-- TAGS --> *}
var tagsCache = new TagsCache({
serverKey: '{$CACHE_KEYS.tags}',
serverId: '{$CACHE_KEYS._hash}',
rootUrl: '{$ROOT_URL}'
});
tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: {
'Add': '{'Create'|translate}'
}});
{* <!-- DATEPICKER --> *}
jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}
jQuery('[data-datepicker]').pwgDatepicker({
showTimepicker: true,
cancelButton: '{'Cancel'|translate}'
});
});
{* <!-- THUMBNAILS --> *}
jQuery("a.preview-box").colorbox({
photo: true
});
}());
{/footer_script}
<h2>{$TITLE} &#8250; {'Edit photo'|@translate} {$TABSHEET_TITLE}</h2>
<form action="{$F_ACTION}" method="post" id="catModify">
<fieldset>
<legend>{'Informations'|@translate}</legend>
<table>
<tr>
<td id="albumThumbnail">
<a href="{$FILE_SRC}" class="preview-box icon-zoom-in" title="{$TITLE|htmlspecialchars}"><img src="{$TN_SRC}" alt="{'Thumbnail'|translate}"></a>
</td>
<td id="albumLinks" style="width:400px;vertical-align:top;">
<ul style="padding-left:15px;margin:0;">
<li>{$INTRO.file}</li>
<li>{$INTRO.add_date}</li>
<li>{$INTRO.added_by}</li>
<li>{$INTRO.size}</li>
<li>{$INTRO.formats}</li>
<li>{$INTRO.stats}</li>
<li>{$INTRO.id}</li>
</ul>
</td>
<td class="photoLinks">
<ul>
{if isset($U_JUMPTO) }
<li><a class="icon-eye" href="{$U_JUMPTO}">{'jump to photo'|@translate} →</a></li>
{/if}
<li><a class="icon-download" href="{$U_DOWNLOAD}">{'Download'|translate}</a></li>
{if !url_is_remote($PATH)}
<li><a class="icon-arrows-cw" href="{$U_SYNC}">{'Synchronize metadata'|@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>
</tr>
</table>
</fieldset>
<fieldset>
<legend>{'Properties'|@translate}</legend>
<p>
<strong>{'Title'|@translate}</strong>
<br>
<input type="text" class="large" name="name" value="{$NAME|@escape}">
</p>
<p>
<strong>{'Author'|@translate}</strong>
<br>
<input type="text" class="large" name="author" value="{$AUTHOR}">
</p>
<p>
<strong>{'Creation date'|@translate}</strong>
<br>
<input type="hidden" name="date_creation" value="{$DATE_CREATION}">
<label>
<i class="icon-calendar"></i>
<input type="text" data-datepicker="date_creation" data-datepicker-unset="date_creation_unset" readonly>
</label>
<a href="#" class="icon-cancel-circled" id="date_creation_unset">{'unset'|translate}</a>
</p>
<p>
<strong>{'Linked albums'|@translate}</strong>
<br>
<select data-selectize="categories" data-value="{$associated_albums|@json_encode|escape:html}"
placeholder="{'Type in a search term'|translate}"
data-default="{$STORAGE_ALBUM}" name="associate[]" multiple style="width:600px;"></select>
</p>
<p>
<strong>{'Representation of albums'|@translate}</strong>
<br>
<select data-selectize="categories" data-value="{$represented_albums|@json_encode|escape:html}"
placeholder="{'Type in a search term'|translate}"
name="represent[]" multiple style="width:600px;"></select>
</p>
<p>
<strong>{'Tags'|@translate}</strong>
<br>
<select data-selectize="tags" data-value="{$tag_selection|@json_encode|escape:html}"
placeholder="{'Type in a search term'|translate}"
data-create="true" name="tags[]" multiple style="width:600px;"></select>
</p>
<p>
<strong>{'Description'|@translate}</strong>
<br>
<textarea name="description" id="description" class="description">{$DESCRIPTION}</textarea>
</p>
<p>
<strong>{'Who can see this photo?'|@translate}</strong>
<br>
<select name="level" size="1">
{html_options options=$level_options selected=$level_options_selected}
</select>
</p>
<p style="margin:40px 0 0 0">
<input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
</p>
</fieldset>
</form>

View File

@@ -0,0 +1,221 @@
{combine_script id='jquery.ajaxmanager' load='footer' require='jquery' path='themes/default/js/plugins/jquery.ajaxmanager.js' }
{footer_script require='jquery.ajaxmanager'}
/* incompatible message */
var incompatible_msg = '{'WARNING! This plugin does not seem to be compatible with this version of Piwigo.'|@translate|@escape:'javascript'}';
var activate_msg = '\n{'Do you want to activate anyway?'|@translate|@escape:'javascript'}';
/* group action */
var pwg_token = '{$PWG_TOKEN}';
var confirmMsg = '{'Are you sure?'|@translate|@escape:'javascript'}';
{literal}
var queuedManager = jQuery.manageAjax.create('queued', {
queue: true,
maxRequests: 1
});
var nb_plugins = jQuery('div.active').size();
var done = 0;
jQuery(document).ready(function() {
/* group action */
jQuery('div.deactivate_all a').click(function() {
if (confirm(confirmMsg)) {
jQuery('div.active').each(function() {
performPluginDeactivate(jQuery(this).attr('id'));
});
}
});
function performPluginDeactivate(id) {
queuedManager.add({
type: 'GET',
dataType: 'json',
url: 'ws.php',
data: { method: 'pwg.plugins.performAction', action: 'deactivate', plugin: id, pwg_token: pwg_token, format: 'json' },
success: function(data) {
if (data['stat'] == 'ok') jQuery("#"+id).removeClass('active').addClass('inactive');
done++;
if (done == nb_plugins) location.reload();
}
});
};
/* incompatible plugins */
jQuery(document).ready(function() {
jQuery.ajax({
method: 'GET',
url: 'admin.php',
data: { page: 'plugins_installed', incompatible_plugins: true },
dataType: 'json',
success: function(data) {
for (i=0;i<data.length;i++) {
{/literal}
{if $show_details}
jQuery('#'+data[i]+' .pluginBoxNameCell').prepend('<a class="warning" title="'+incompatible_msg+'"></a>')
{else}
jQuery('#'+data[i]+' .pluginMiniBoxNameCell').prepend('<span class="warning" title="'+incompatible_msg+'"></span>')
{/if}
{literal}
jQuery('#'+data[i]).addClass('incompatible');
jQuery('#'+data[i]+' .activate').attr('onClick', 'return confirm(incompatible_msg + activate_msg);');
}
jQuery('.warning').tipTip({
'delay' : 0,
'fadeIn' : 200,
'fadeOut' : 200,
'maxWidth':'250px'
});
}
});
});
/* TipTips */
jQuery('.plugin-restore').tipTip({
'delay' : 0,
'fadeIn' : 200,
'fadeOut' : 200
});
jQuery('.showInfo').tipTip({
'delay' : 0,
'fadeIn' : 200,
'fadeOut' : 200,
'maxWidth':'300px',
'keepAlive':true,
'activation':'click'
});
});
{/literal}
{/footer_script}
<div class="titrePage">
<h2>{'Plugins'|@translate}</h2>
</div>
<div class="showDetails">
{if $show_details}
<a href="{$base_url}&amp;show_details=0">{'hide details'|@translate}</a>
{else}
<a href="{$base_url}&amp;show_details=1">{'show details'|@translate}</a>
{/if}
</div>
{if isset($plugins)}
{assign var='field_name' value='null'} {* <!-- 'counter' for fieldset management --> *}
{counter start=0 assign=i} {* <!-- counter for 'deactivate all' link --> *}
{foreach from=$plugins item=plugin name=plugins_loop}
{if $field_name != $plugin.STATE}
{if $field_name != 'null'}
</fieldset>
{/if}
<fieldset class="pluginBoxes">
<legend>
{if $plugin.STATE == 'active'}
{'Active Plugins'|@translate}
{elseif $plugin.STATE == 'inactive'}
{'Inactive Plugins'|@translate}
{elseif $plugin.STATE == 'missing'}
{'Missing Plugins'|@translate}
{elseif $plugin.STATE == 'merged'}
{'Obsolete Plugins'|@translate}
{/if}
</legend>
{assign var='field_name' value=$plugin.STATE}
{/if}
{if not empty($plugin.AUTHOR)}
{if not empty($plugin.AUTHOR_URL)}
{assign var='author' value="<a href='%s'>%s</a>"|@sprintf:$plugin.AUTHOR_URL:$plugin.AUTHOR}
{else}
{assign var='author' value='<u>'|cat:$plugin.AUTHOR|cat:'</u>'}
{/if}
{/if}
{if $show_details}
<div id="{$plugin.ID}" class="pluginBox {$plugin.STATE}">
<table>
<tr>
<td class="pluginBoxNameCell">
{$plugin.NAME}
</td>
<td>{$plugin.DESC}</td>
</tr>
<tr class="pluginActions">
<td>
{if $plugin.STATE == 'active'}
<a href="{$plugin.U_ACTION}&amp;action=deactivate">{'Deactivate'|@translate}</a>
| <a href="{$plugin.U_ACTION}&amp;action=restore" class="plugin-restore" title="{'Restore default configuration. You will lose your plugin settings!'|@translate}" onclick="return confirm(confirmMsg);">{'Restore'|@translate}</a>
{elseif $plugin.STATE == 'inactive'}
<a href="{$plugin.U_ACTION}&amp;action=activate" class="activate">{'Activate'|@translate}</a>
| <a href="{$plugin.U_ACTION}&amp;action=delete" onclick="return confirm(confirmMsg);">{'Delete'|@translate}</a>
{elseif $plugin.STATE == 'missing'}
<a href="{$plugin.U_ACTION}&amp;action=uninstall" onclick="return confirm(confirmMsg);">{'Uninstall'|@translate}</a>
{elseif $plugin.STATE == 'merged'}
<a href="{$plugin.U_ACTION}&amp;action=delete">{'Delete'|@translate}</a>
{/if}
</td>
<td>
{'Version'|@translate} {$plugin.VERSION}
{if not empty($author)}
| {'By %s'|@translate:$author}
{/if}
{if not empty($plugin.VISIT_URL)}
| <a class="externalLink" href="{$plugin.VISIT_URL}">{'Visit plugin site'|@translate}</a>
{/if}
</td>
</tr>
</table>
</div> {*<!-- pluginBox -->*}
{else}
{if not empty($plugin.VISIT_URL)}
{assign var='version' value="<a class='externalLink' href='"|cat:$plugin.VISIT_URL|cat:"'>"|cat:$plugin.VERSION|cat:"</a>"}
{else}
{assign var='version' value=$plugin.VERSION}
{/if}
<div id="{$plugin.ID}" class="pluginMiniBox {$plugin.STATE}">
<div class="pluginMiniBoxNameCell">
{$plugin.NAME}
<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>
{if $plugin.STATE == 'active'}
<a href="{$plugin.U_ACTION}&amp;action=deactivate">{'Deactivate'|@translate}</a>
| <a href="{$plugin.U_ACTION}&amp;action=restore" class="plugin-restore" title="{'Restore default configuration. You will lose your plugin settings!'|@translate}" onclick="return confirm(confirmMsg);">{'Restore'|@translate}</a>
{elseif $plugin.STATE == 'inactive'}
<a href="{$plugin.U_ACTION}&amp;action=activate" class="activate">{'Activate'|@translate}</a>
| <a href="{$plugin.U_ACTION}&amp;action=delete" onclick="return confirm(confirmMsg);">{'Delete'|@translate}</a>
{elseif $plugin.STATE == 'missing'}
<a href="{$plugin.U_ACTION}&amp;action=uninstall" onclick="return confirm(confirmMsg);">{'Uninstall'|@translate}</a>
{elseif $plugin.STATE == 'merged'}
<a href="{$plugin.U_ACTION}&amp;action=delete">{'Delete'|@translate}</a>
{/if}
</div>
</div>
</div> {*<!-- pluginMiniBox -->*}
{/if}
{if $plugin.STATE == 'active'}
{counter}
{if $active_plugins == $i}
<div class="deactivate_all"><a>{'Deactivate all'|@translate}</a></div>
{counter}
{/if}
{/if}
{/foreach}
</fieldset>
{/if}

View File

@@ -0,0 +1,113 @@
{combine_script id='jquery.sort' load='footer' path='themes/default/js/plugins/jquery.sort.js'}
{footer_script require='jquery.ui.effect-blind,jquery.sort'}{literal}
var sortOrder = 'date';
var sortPlugins = (function(a, b) {
if (sortOrder == 'downloads' || sortOrder == 'revision' || sortOrder == 'date')
return parseInt($(a).find('input[name="'+sortOrder+'"]').val())
< parseInt($(b).find('input[name="'+sortOrder+'"]').val()) ? 1 : -1;
else
return $(a).find('input[name="'+sortOrder+'"]').val().toLowerCase()
> $(b).find('input[name="'+sortOrder+'"]').val().toLowerCase() ? 1 : -1;
});
jQuery(document).ready(function(){
jQuery("td[id^='desc_']").click(function() {
id = this.id.split('_');
nb_lines = jQuery("#bigdesc_"+id[1]).html().split('<br>').length;
jQuery("#smalldesc_"+id[1]).toggle('blind', 1);
if (jQuery(this).hasClass('bigdesc')) {
jQuery("#bigdesc_"+id[1]).toggle('blind', 1);
} else {
jQuery("#bigdesc_"+id[1]).toggle('blind', 50 + (nb_lines * 30));
}
jQuery(this).toggleClass('bigdesc');
return false;
});
jQuery('select[name="selectOrder"]').change(function() {
sortOrder = this.value;
$('.pluginBox').sortElements(sortPlugins);
$.get("admin.php?plugins_new_order="+sortOrder);
});
jQuery('#filter').keyup(function(){
var filter = $(this).val();
if (filter.length>2) {
$('.pluginBox').hide();
$('#availablePlugins .pluginBox input[name="name"]').each(function(){
if ($(this).val().toUpperCase().indexOf(filter.toUpperCase()) != -1) {
$(this).parents('div').show();
}
});
}
else {
$('.pluginBox').show();
}
});
jQuery("#filter").focus();
jQuery(".titrePage input[name='Clear']").click(function(){
$("#filter").val('');
$(".pluginBox").show();
});
});
{/literal}{/footer_script}
<div class="titrePage">
<span class="sort">
{'Filter'|@translate} : <input type="text" id="filter">
<input type="button" name="Clear" Value="{'Cancel'|@translate}"> |
{'Sort order'|@translate} :
{html_options name="selectOrder" options=$order_options selected=$order_selected}
</span>
<h2>{'Plugins'|@translate}</h2>
</div>
{if not empty($plugins)}
<div id="availablePlugins">
<fieldset>
<legend></legend>
{foreach from=$plugins item=plugin name=plugins_loop}
<div class="pluginBox" id="plugin_{$plugin.ID}">
<input type="hidden" name="date" value="{$plugin.ID}">
<input type="hidden" name="name" value="{$plugin.EXT_NAME}">
<input type="hidden" name="revision" value="{$plugin.REVISION_DATE}">
<input type="hidden" name="downloads" value="{$plugin.DOWNLOADS}">
<input type="hidden" name="author" value="{$plugin.AUTHOR}">
<table>
<tr>
<td class="pluginBoxNameCell">{$plugin.EXT_NAME}</td>
{if $plugin.BIG_DESC != $plugin.SMALL_DESC}
<td id="desc_{$plugin.ID}" class="pluginDesc">
<span id="smalldesc_{$plugin.ID}">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/plus.gif" alt="">{$plugin.SMALL_DESC}...
</span>
<span id="bigdesc_{$plugin.ID}" style="display:none;">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/minus.gif" alt="">{$plugin.BIG_DESC|@nl2br}<br>&nbsp;
</span>
</td>
{else}
<td>{$plugin.BIG_DESC|@nl2br}</td>
{/if}
</tr>
<tr>
<td>
<a href="{$plugin.URL_INSTALL}" onclick="return confirm('{'Are you sure you want to install this plugin?'|@translate|@escape:javascript}');">{'Install'|@translate}</a>
| <a href="{$plugin.URL_DOWNLOAD}">{'Download'|@translate}</a>
</td>
<td>
<em>{'Downloads'|@translate}: {$plugin.DOWNLOADS}</em>
{'Version'|@translate} {$plugin.VERSION}
| {'By %s'|@translate:$plugin.AUTHOR}
| <a class="externalLink" href="{$plugin.EXT_URL}">{'Visit plugin site'|@translate}</a>
</td>
</tr>
</table>
</div>
{/foreach}
</fieldset>
</div>
{else}
<p>{'There is no other plugin available.'|@translate}</p>
{/if}

View File

@@ -0,0 +1,12 @@
<div id="content" class="content">
{$HELP_CONTENT}
</div> <!-- content -->
<ul class="categoryActions">
<li>
<a href="#" onclick="window.close();" title="{'Close this window'|@translate}">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/exit.png" alt="exit">
</a>
</li>
</ul>

View File

@@ -0,0 +1,146 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
{footer_script}
{* <!-- CATEGORIES --> *}
var categoriesCache = new CategoriesCache({
serverKey: '{$CACHE_KEYS.categories}',
serverId: '{$CACHE_KEYS._hash}',
rootUrl: '{$ROOT_URL}'
});
categoriesCache.selectize(jQuery('[data-selectize=categories]'));
jQuery("#removeAlbumFilter").click(function() {
jQuery("select[name=cat]")[0].selectize.setValue(null);
return false;
});
function checkCatFilter() {
if (jQuery("select[name=cat]").val() == "") {
jQuery("#removeAlbumFilter").hide();
}
else {
jQuery("#removeAlbumFilter").show();
}
}
checkCatFilter();
jQuery("select[name=cat]").change(function(){
checkCatFilter();
});
{/footer_script}
<h2>{$NB_ELEMENTS} {'Photos'|@translate}</h2>
<form action="{$F_ACTION}" method="GET" class="filter">
<fieldset>
<legend>{'Filter'|@translate}</legend>
<label>
{'Sort by'|@translate}
<select name="order_by">
{html_options options=$order_by_options selected=$order_by_options_selected}
</select>
</label>
<label>
{'Users'|@translate}
<select name="users">
{html_options options=$user_options selected=$user_options_selected}
</select>
</label>
<label>
{'Number of items'|@translate}
<input type="text" name="display" size="2" value="{$DISPLAY}">
</label>
<label>
{'Album'|translate}<a href="#" id="removeAlbumFilter" class="icon-cancel-circled"></a>
<select
data-selectize="categories"
data-value="{$category|@json_encode|escape:html}"
placeholder="{'No filter on album. Select one or type to search'|translate}"
name="cat"
style="width:400px"
></select>
</label>
<div style="clear:both"></div>
<p style="margin:10px 0 0 0">
<button name="submit" type="submit" class="buttonLike">
<i class="icon-filter"></i> {'Submit'|translate}
</button>
</p>
<input type="hidden" name="page" value="rating">
</fieldset>
</form>
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
<table width="99%">
<tr class="throw">
<td>{'File'|@translate}</td>
<td>{'Number of rates'|@translate}</td>
<td>{'Rating score'|@translate}</td>
<td>{'Average rate'|@translate}</td>
<td>{'Sum of rates'|@translate}</td>
<td>{'Rate'|@translate}/{'Username'|@translate}/{'Rate date'|@translate}</td>
<td></td>
</tr>
{foreach from=$images item=image name=image}
<tr valign="top" class="{if $smarty.foreach.image.index is odd}row1{else}row2{/if}">
<td><a href="{$image.U_URL}"><img src="{$image.U_THUMB}" alt="{$image.FILE}" title="{$image.FILE}"></a></td>
<td><strong>{$image.NB_RATES}/{$image.NB_RATES_TOTAL}</strong></td>
<td><strong>{$image.SCORE_RATE}</strong></td>
<td><strong>{$image.AVG_RATE}</strong></td>
<td style="border-right:1px solid" ><strong>{$image.SUM_RATE}</strong></td>
<td>
<table style="width:100%">
{foreach from=$image.rates item=rate name=rate}
<tr>
<td>{$rate.rate}</td>
<td><b>{$rate.USER}</b></td>
<td>{$rate.date}</td>
<td><a onclick="return del(this,{$image.id},{$rate.user_id}{if !empty({$rate.anonymous_id})},'{$rate.anonymous_id}'{/if})" class="icon-trash"> </a></td>
</tr>
{/foreach}{*rates*}
</table>
</td>
</tr>
{/foreach}{*images*}
</table>
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
{footer_script}
function del(node,id,uid,aid){
var tr = jQuery(node).parents("tr").first().fadeTo(1000, 0.4),
data = {
image_id: id,
user_id: uid
};
if (aid)
data.anonymous_id = aid;
(new PwgWS('{$ROOT_URL|@escape:javascript}')).callService(
'pwg.rates.delete', data,
{
method: 'POST',
onFailure: function(num, text) { tr.stop(); tr.fadeTo(0,1); alert(num + " " + text); },
onSuccess: function(result){
if (result)
tr.remove();
else
alert(result);
}
}
);
return false;
}
{/footer_script}
{if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}

View File

@@ -0,0 +1,223 @@
{combine_script id='jquery.dataTables' load='footer' path='themes/default/js/plugins/jquery.dataTables.js'}
{html_style}
.sorting { background: url({$ROOT_URL}themes/default/js/plugins/datatables/images/sort_both.png) no-repeat center right; cursor:pointer; }
.sorting_asc { background: url({$ROOT_URL}themes/default/js/plugins/datatables/images/sort_asc.png) no-repeat center right; }
.sorting_desc { background: url({$ROOT_URL}themes/default/js/plugins/datatables/images/sort_desc.png) no-repeat center right; }
.sorting, .sorting_asc, .sorting_desc {
padding: 3px 18px 3px 10px;
}
.sorting_asc_disabled { background: url({$ROOT_URL}themes/default/js/plugins/datatables/images/sort_asc_disabled.png) no-repeat center right; }
.sorting_desc_disabled { background: url({$ROOT_URL}themes/default/js/plugins/datatables/images/sort_desc_disabled.png) no-repeat center right; }
.dtBar {
text-align:left;
padding: 10px 0 10px 20px
}
.dtBar DIV{
display:inline;
padding-right: 5px;
}
.dataTables_paginate A {
padding-left: 3px;
}
.ui-tooltip {
padding: 8px;
position: absolute;
z-index: 9999;
max-width: {3*$TN_WIDTH}px;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 0 0 5px #aaa;
}
body .ui-tooltip {
border-width: 2px;
}
{/html_style}
<h2>{$ratings|@count} {'Users'|@translate}</h2>
<form action="{$F_ACTION}" method="GET">
<fieldset>
<noscript>
<label>{'Sort by'|@translate}
<select name="order_by">
{html_options options=$order_by_options selected=$order_by_options_selected}
</select>
</label>
</noscript>
<label>{'Number of rates'|@translate}&gt;
<input type="text" size="5" name="f_min_rates" value="{$F_MIN_RATES}">
</label>
<label>{'Consensus deviation'|@translate}
<input type="text" size="5" name="consensus_top_number" value="{$CONSENSUS_TOP_NUMBER}">
{'Best rated'|@translate}
</label>
<div style="clear:both"></div>
<p style="margin:10px 0 0 0">
<button name="submit" type="submit" class="buttonLike">
<i class="icon-filter"></i> {'Submit'|translate}
</button>
</p>
<input type="hidden" name="page" value="rating_user">
</fieldset>
</form>
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
{combine_script id='jquery.geoip' load='async' path='admin/themes/default/js/jquery.geoip.js'}
{footer_script}
jQuery('#rateTable').dataTable({
dom : '<"dtBar"filp>rt<"dtBar"ilp>',
pageLength: 100,
lengthMenu: [ [25, 50, 100, 500, -1], [25, 50, 100, 500, "All"]],
sorting: [], //[[1,'desc']],
autoWidth: false,
sortClasses: false,
columnDefs: [
{
aTargets: ["dtc_user"],
sType: "string",
sClass: null
},
{
aTargets: ["dtc_date"],
asSorting: ["desc","asc"],
sType: "string",
sClass: null
},
{
aTargets: ["dtc_stat"],
asSorting: ["desc","asc"],
bSearchable: false,
sType: "numeric",
sClass: null
},
{
aTargets: ["dtc_rate"],
asSorting: ["desc","asc"],
bSearchable: false,
sType: "html",
sClass: null
},
{
aTargets: ["dtc_del"],
bSortable: false,
bSearchable: false,
sType: "string",
sClass: null
}
]
});
var oTable = jQuery('#rateTable').DataTable();
function uidFromCell(cell){
var tr = cell;
while ( tr.nodeName != "TR") tr = tr.parentNode;
return $(tr).data("usr");
}
{* -----DELETE----- *}
$(document).ready( function(){
$("#rateTable").on( "click", ".del", function(e) {
e.preventDefault();
if (!confirm('{'Are you sure?'|@translate|@escape:'javascript'}'))
return;
var cell = e.target.parentNode,
tr = cell;
while ( tr.nodeName != "TR") tr = tr.parentNode;
tr = jQuery(tr).fadeTo(1000, 0.4);
var data=uidFromCell(cell);
(new PwgWS('{$ROOT_URL|@escape:javascript}')).callService(
'pwg.rates.delete', { user_id:data.uid, anonymous_id:data.aid},
{
method: 'POST',
onFailure: function(num, text) { tr.stop(); tr.fadeTo(0,1); alert(num + " " + text); },
onSuccess: function(result){
if (result)
oTable.row(tr[0]).remove().draw();
else
alert(result);
}
}
);
});
});
{/footer_script}
<table id="rateTable">
<thead>
<tr class="throw">
<th class="dtc_user">{'Username'|@translate}</th>
<th class="dtc_date">{'Last'|@translate}</th>
<th class="dtc_stat">{'Number of rates'|@translate}</th>
<th class="dtc_stat">{'Average rate'|@translate}</th>
<th class="dtc_stat">{'Variation'|@translate}</th>
<th class="dtc_stat">{'Consensus deviation'|@translate|@replace:' ':'<br>'}</th>
<th class="dtc_stat">{'Consensus deviation'|@translate|@replace:' ':'<br>'} {$CONSENSUS_TOP_NUMBER}</th>
{foreach from=$available_rates item=rate}
<th class="dtc_rate">{$rate}</th>
{/foreach}
<th class="dtc_del"></th>
</tr>
</thead>
{foreach from=$ratings item=rating key=user}
<tr data-usr='{ldelim}"uid":{$rating.uid},"aid":"{$rating.aid}"}'>
{strip}
<td class=usr>{$user}</td><td title="First: {$rating.first_date}">{$rating.last_date}</td>
<td>{$rating.count}</td><td>{$rating.avg|@number_format:2}</td>
<td>{$rating.cv|@number_format:3}</td><td>{$rating.cd|@number_format:3}</td><td>{if !empty($rating.cdtop)}{$rating.cdtop|@number_format:3}{/if}</td>
{foreach from=$rating.rates item=rates key=rate}
<td>{if !empty($rates)}
{capture assign=rate_over}{foreach $rates as $rate_arr}{if $rate_arr@index>29}{break}{/if}<img src="{$image_urls[$rate_arr.id].tn}" alt="thumb-{$rate_arr.id}" width="{$TN_WIDTH}" height="{$TN_WIDTH}">{/foreach}{/capture}
<a title="{$rate_over|@htmlspecialchars}">{$rates|@count}</a>
{/if}</td>
{/foreach}
<td><a class="del icon-trash"></a></td>
</tr>
{/strip}
{/foreach}
</table>
{combine_script id='jquery.ui.tooltip' load='footer'}
{footer_script require='jquery.ui.tooltip'}
jQuery(document).ready(function(){
jQuery("#rateTable").tooltip({
items: ".usr,[title]",
content: function(callback) {
var t = $(this).attr("title");
if (t)
return t;
var that = $(this),
udata = uidFromCell(this);
if (!udata.aid)
return;
that
.data("isOver", true)
.one("mouseleave", function() {
that.removeData("isOver");
});
GeoIp.get( udata.aid + ".1", function(data) {
if (!data.fullName) return;
var content = data.fullName;
if (data.latitude && data.region_name) {
content += "<br><img width=300 height=220 src=\"http://maps.googleapis.com/maps/api/staticmap?sensor=false&size=300x220&zoom=6"
+ "&markers=size:tiny%7C" + data.latitude + "," + data.longitude
+ "\">";
}
if (that.data("isOver"))
callback(content);
});
}
});
})
{/footer_script}

View File

@@ -0,0 +1,67 @@
{footer_script}{literal}
jQuery(document).ready(function(){
jQuery("#showCreateSite a").click(function(){
jQuery("#showCreateSite").hide();
jQuery("#createSite").show();
});
});
{/literal}{/footer_script}
<div class="titrePage">
<h2>{'Site manager'|@translate}</h2>
</div>
{if not empty($remote_output)}
<div class="remoteOutput">
<ul>
{foreach from=$remote_output item=remote_line}
<li class="{$remote_line.CLASS}">{$remote_line.CONTENT}</li>
{/foreach}
</ul>
</div>
{/if}
{if not empty($sites)}
<table class="table2">
<tr class="throw">
<td>{'Directory'|@translate}</td>
<td>{'Actions'|@translate}</td>
</tr>
{foreach from=$sites item=site name=site}
<tr style="text-align:left" class="{if $smarty.foreach.site.index is odd}row1{else}row2{/if}"><td>
<a href="{$site.NAME}">{$site.NAME}</a><br>({$site.TYPE}, {$site.CATEGORIES} {'Albums'|@translate}, {$pwg->l10n_dec('%d photo','%d photos',$site.IMAGES)})
</td><td>
[<a href="{$site.U_SYNCHRONIZE}" title="{'update the database from files'|@translate}">{'Synchronize'|@translate}</a>]
{if isset($site.U_DELETE)}
[<a href="{$site.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|escape:'javascript'}');"
title="{'delete this site and all its attached elements'|@translate}">{'delete'|@translate}</a>]
{/if}
{if not empty($site.plugin_links)}
<br>
{foreach from=$site.plugin_links item=plugin_link}
[<a href="{$plugin_link.U_HREF}" title='{$plugin_link.U_HINT}'>{$plugin_link.U_CAPTION}</a>]
{/foreach}
{/if}
</td></tr>
{/foreach}
</table>
{/if}
<p id="showCreateSite" style="text-align:left;margin-left:1em;">
<a href="#">{'create a new site'|@translate}</a>
</p>
<form action="{$F_ACTION}" method="post" id="createSite" style="display:none">
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
<fieldset>
<legend>{'create a new site'|@translate}</legend>
<p style="margin-top:0;"><strong>{'Directory'|@translate}</strong>
<br><input type="text" name="galleries_url" id="galleries_url">
</p>
<p class="actionButtons">
<input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
</p>
</form>

View File

@@ -0,0 +1,116 @@
{include file='include/resize.inc.tpl'}
<div class="titrePage">
<h2>{'Database synchronization with files'|@translate}: <a href="{$SITE_URL}">{$SITE_URL}</a></h2>
</div>
{if isset($update_result)}
<h3>{$L_RESULT_UPDATE}</h3>
<ul>
<li class="update_summary_new">{$update_result.NB_NEW_CATEGORIES} {'albums added in the database'|@translate}</li>
<li class="update_summary_new">{$update_result.NB_NEW_ELEMENTS} {'photos added in the database'|@translate}</li>
<li class="update_summary_del">{$update_result.NB_DEL_CATEGORIES} {'albums deleted in the database'|@translate}</li>
<li class="update_summary_del">{$update_result.NB_DEL_ELEMENTS} {'photos deleted from the database'|@translate}</li>
<li>{$update_result.NB_UPD_ELEMENTS} {'photos updated in the database'|@translate}</li>
<li class="update_summary_err">{$update_result.NB_ERRORS} {'errors during synchronization'|@translate}</li>
</ul>
{/if}
{if isset($metadata_result)}
<h3>{$L_RESULT_METADATA}</h3>
<ul>
<li>{$metadata_result.NB_ELEMENTS_DONE} {'photos informations synchronized with files metadata'|@translate}</li>
<li>{$metadata_result.NB_ELEMENTS_CANDIDATES} {'photos candidates for metadata synchronization'|@translate}</li>
<li>{'Used metadata'|@translate} : {$METADATA_LIST}</li>
</ul>
{/if}
{if not empty($sync_errors)}
<h3>{'Error list'|@translate}</h3>
<div class="errors">
<ul>
{foreach from=$sync_errors item=error}
<li>[{$error.ELEMENT}] {$error.LABEL}</li>
{/foreach}
</ul>
</div>
<h3>{'Errors caption'|@translate}</h3>
<ul>
{foreach from=$sync_error_captions item=caption}
<li><strong>{$caption.TYPE}</strong>: {$caption.LABEL}</li>
{/foreach}
</ul>
{/if}
{if not empty($sync_infos)}
<h3>{'Detailed informations'|@translate}</h3>
<div class="infos">
<ul>
{foreach from=$sync_infos item=info}
<li>[{$info.ELEMENT}] {$info.LABEL}</li>
{/foreach}
</ul>
</div>
{/if}
{if isset($introduction)}
<h4>{'Choose an option'|@translate}</h4>
<form action="" method="post" id="update">
<fieldset id="syncFiles">
<legend>{'synchronize files structure with database'|@translate}</legend>
<ul>
<li><label><input type="radio" name="sync" value="" {if empty($introduction.sync)}checked="checked"{/if}> {'nothing'|@translate}</label></li>
<li><label><input type="radio" name="sync" value="dirs" {if 'dirs'==$introduction.sync}checked="checked"{/if}> {'only directories'|@translate}</label></li>
<li><label><input type="radio" name="sync" value="files" {if 'files'==$introduction.sync}checked="checked"{/if}> {'directories + files'|@translate}</label>
<ul style="padding-left:3em">
<li><label><input type="checkbox" name="display_info" value="1" {if $introduction.display_info}checked="checked"{/if}> {'display maximum informations (added albums and photos, deleted albums and photos)'|@translate}</label></li>
<li><label><input type="checkbox" name="add_to_caddie" value="1" {if $introduction.add_to_caddie}checked="checked"{/if}> {'add new photos to caddie'|@translate}</label></li>
<li><label>{'Who can see these photos?'|@translate} <select name="privacy_level">{html_options options=$introduction.privacy_level_options selected=$introduction.privacy_level_selected}</select></label></li>
</ul>
</li>
</ul>
</fieldset>
<fieldset id="syncMetadata">
<legend>{'synchronize files metadata with database photos informations'|@translate}</legend>
<label><input type="checkbox" name="sync_meta" {if $introduction.sync_meta}checked="checked"{/if}> {'Synchronize metadata'|@translate} ({$METADATA_LIST})</label>
<ul style="padding-left:3em">
<li>
<label><input type="checkbox" name="meta_all" {if $introduction.meta_all}checked="checked"{/if}> {'even already synchronized photos'|@translate}</label>
</li>
<li>
<label><input type="checkbox" name="meta_empty_overrides" {if $introduction.meta_empty_overrides}checked="checked"{/if}> {'overrides existing values with empty ones'|@translate}</label>
</li>
</ul>
</fieldset>
<fieldset id="syncSimulate">
<legend>{'Simulation'|@translate}</legend>
<ul><li><label><input type="checkbox" name="simulate" value="1" checked="checked"> {'only perform a simulation (no change in database will be made)'|@translate}</label></li></ul>
</fieldset>
<fieldset id="catSubset">
<legend>{'reduce to single existing albums'|@translate}</legend>
<ul>
<li>
<select class="categoryList" name="cat" size="10">
{html_options options=$category_options selected=$category_options_selected}
</select>
</li>
<li><label><input type="checkbox" name="subcats-included" value="1" {if $introduction.subcats_included}checked="checked"{/if}> {'Search in sub-albums'|@translate}</label></li>
</ul>
</fieldset>
<p class="bottomButtons">
<input class="submit" type="submit" value="{'Submit'|@translate}" name="submit">
<input class="submit" type="reset" value="{'Reset'|@translate}" name="reset">
</p>
</form>
{/if}{*isset $introduction*}
<p><a href="{$U_SITE_MANAGER}">{'Site manager'|@translate}</a></p>

View File

@@ -0,0 +1,25 @@
<div class="titrePage">
<h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<h3>{$L_STAT_TITLE}</h3>
<table class="table2" id="dailyStats">
<tr class="throw">
<th>{$PERIOD_LABEL}</th>
<th>{'Pages seen'|@translate}</th>
<th></th>
</tr>
{if not empty($statrows)}
{foreach from=$statrows item=row}
<tr>
<td style="white-space: nowrap">{$row.VALUE}</td>
<td class="number">{$row.PAGES}</td>
<td><div class="statBar" style="width:{$row.WIDTH}px"></div></td>
</tr>
{/foreach}
{/if}
</table>

View File

@@ -0,0 +1,11 @@
{if isset($tabsheet) and count($tabsheet)}
<div id="tabsheet">
<ul class="tabsheet">
{foreach from=$tabsheet key=name item=sheet}
<li class="{if ($name == $tabsheet_selected)}selected_tab{else}normal_tab{/if}">
<a href="{$sheet.url}"><span>{$sheet.caption}</span></a>
</li>
{/foreach}
</ul>
</div>
{/if}

View File

@@ -0,0 +1,336 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{include file='include/tag_selection.inc.tpl'}
{html_style}
.showInfo { text-indent:5px; }
form fieldset p { margin-left:0; }
{/html_style}
{footer_script require='jquery'}
/**
* Add tag
*/
jQuery("#addTag").click(function() {
jQuery("#addTagForm").toggle();
jQuery("input[name=add_tag]").focus();
return false;
});
jQuery("#addTagClose").click(function() {
jQuery("#addTagForm").hide();
return false;
});
jQuery("#selectionMode").click(function() {
if (jQuery(this).hasClass("icon-check-empty")) {
jQuery("#selectionMode").removeClass("icon-check-empty").addClass("icon-check");
jQuery('label.font-checkbox span').show();
jQuery('ul.tagSelection a.showInfo').hide();
jQuery('fieldset#action').show();
jQuery('fieldset#selectTags legend').html("{'Tag selection'|translate|escape:javascript}");
}
else {
jQuery("#selectionMode").removeClass("icon-check").addClass("icon-check-empty");
jQuery('label.font-checkbox span').hide();
jQuery('ul.tagSelection a.showInfo').show();
jQuery('fieldset#action').hide();
jQuery('fieldset#selectTags legend').html("{'Tags'|translate|escape:javascript}");
}
return false;
});
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();
});
$("#searchInput").on("keydown", function(e) {
var $this = $(this),
timer = $this.data("timer");
if (timer) {
clearTimeout(timer);
}
$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();
}
});
jQuery('input[name="tags[]"]').click(function() {
var nbSelected = 0;
nbSelected = jQuery('input[name="tags[]"]').filter(':checked').length;
if (nbSelected == 0) {
jQuery("#permitAction").hide();
jQuery("#forbidAction").show();
}
else {
jQuery("#permitAction").show();
jQuery("#forbidAction").hide();
}
});
jQuery("[id^=action_]").hide();
jQuery("select[name=selectAction]").change(function () {
jQuery("[id^=action_]").hide();
jQuery("#action_"+jQuery(this).prop("value")).show();
jQuery("#displayFormBlock").hide();
jQuery("#applyActionBlock").hide();
if (jQuery(this).val() != -1 ) {
if (jQuery(this).val() == 'delete') {
jQuery("#applyActionBlock").show();
jQuery("#applyAction").attr("name", jQuery(this).val());
}
else {
jQuery("#displayForm").attr("name", jQuery(this).val());
jQuery("#displayFormBlock").show();
}
}
else {
}
});
jQuery("form").submit(function() {
if (jQuery("select[name=selectAction]").val() == "delete") {
if (!jQuery("input[name=confirm_deletion]").is(":checked")) {
jQuery("#action_delete .errors").show();
return false;
}
}
if (jQuery("select[name=selectAction]").val() == "merge") {
if (jQuery("ul.tagSelection input[type=checkbox]:checked").length < 2) {
alert("{'Select at least two tags for merging'|@translate}");
return false;
}
}
});
jQuery("input[name=confirm_deletion]").change(function() {
jQuery("#action_delete .errors").hide();
});
{/footer_script}
<div class="titrePage">
<h2>{'Manage tags'|@translate}</h2>
</div>
{if !isset($EDIT_TAGS_LIST) and !isset($DUPLIC_TAGS_LIST) and !isset($MERGE_TAGS_LIST)}
<p class="showCreateAlbum" id="showAddTag">
<a class="icon-plus-circled" href="#" id="addTag">{'Add a tag'|translate}</a>
<a class="icon-check-empty" href="#" id="selectionMode">{'Select tags'|translate}</a>
</p>
<form method="post" style="display:none" id="addTagForm" name="add_user" action="{$F_ACTION}" class="properties">
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
<fieldset class="with-border">
<legend>{'Add a tag'|@translate}</legend>
<label>
{'New tag'|@translate}
<input type="text" name="add_tag" size="50">
</label>
<p class="actionButtons">
<input class="submit" type="submit" name="add" value="{'Submit'|@translate}">
<a href="#" id="addTagClose">{'Cancel'|@translate}</a>
</p>
</fieldset>
</form>
{/if}
<form action="{$F_ACTION}" method="post">
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
{if isset($EDIT_TAGS_LIST)}
<fieldset>
<legend>{'Edit tags'|@translate}</legend>
<input type="hidden" name="edit_list" value="{$EDIT_TAGS_LIST}">
<table class="table2">
<tr class="throw">
<th>{'Current name'|@translate}</th>
<th>{'New name'|@translate}</th>
</tr>
{foreach from=$tags item=tag}
<tr>
<td>{$tag.NAME}</td>
<td><input type="text" name="tag_name-{$tag.ID}" value="{$tag.NAME}" size="50"></td>
</tr>
{/foreach}
</table>
<p>
<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>
<input type="hidden" name="edit_list" value="{$DUPLIC_TAGS_LIST}">
<table class="table2">
<tr class="throw">
<th>{'Source tag'|@translate}</th>
<th>{'Name of the duplicate'|@translate}</th>
</tr>
{foreach from=$tags item=tag}
<tr>
<td>{$tag.NAME}</td>
<td><input type="text" name="tag_name-{$tag.ID}" value="{$tag.NAME}" size="50"></td>
</tr>
{/foreach}
</table>
<p>
<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)}
<fieldset id="mergeTags">
<legend>{'Merge tags'|@translate}</legend>
{'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}
</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}
{if !isset($EDIT_TAGS_LIST) and !isset($DUPLIC_TAGS_LIST) and !isset($MERGE_TAGS_LIST)}
<fieldset id="selectTags">
<legend>{'Tags'|@translate}</legend>
{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 class="font-checkbox no-bold">
<span class="icon-check" style="display:none"></span>
<input type="checkbox" name="tags[]" value="{$tag.id}">
{$tag.name}
</label>
</li>
{/foreach}
</ul>
</fieldset>
<fieldset id="action" style="display:none">
<legend>{'Action'|@translate}</legend>
<div id="forbidAction">{'No tag selected, no action possible.'|@translate}</div>
<div id="permitAction" style="display:none">
<select name="selectAction">
<option value="-1">{'Choose an action'|@translate}</option>
<option disabled="disabled">------------------</option>
<option value="edit">{'Edit selected tags'|@translate}</option>
<option value="duplicate">{'Duplicate selected tags'|@translate}</option>
<option value="merge">{'Merge selected tags'|@translate}</option>
<option value="delete">{'Delete selected tags'|@translate}</option>
{if !empty($tag_manager_plugin_actions)}
{foreach from=$tag_manager_plugin_actions item=action}
<option value="{$action.ID}">{$action.NAME}</option>
{/foreach}
{/if}
</select>
<!-- delete -->
<div id="action_delete" class="bulkAction">
<p>
<label class="font-checkbox">
<span class="icon-check"></span>
<input type="checkbox" name="confirm_deletion" value="1">
{'Are you sure?'|@translate}
</label>
<span class="errors" style="display:none"><i class="icon-cancel"></i> we really need you to confirm</span>
</p>
</div>
{* plugins *}
{if !empty($tag_manage_plugin_actions)}
{foreach from=$element_set_groupe_plugins_actions item=action}
<div id="action_{$action.ID}" class="bulkAction">
{if !empty($action.CONTENT)}{$action.CONTENT}{/if}
</div>
{/foreach}
{/if}
<span id="displayFormBlock" style="display:none">
<button id="displayForm" class="buttonLike" type="submit" name="">{'Display form'|translate} <i class="icon-right"></i></button>
</span>
<p id="applyActionBlock" style="display:none" class="actionButtons">
<button id="applyAction" name="submit" type="submit" class="buttonLike">
<i class="icon-trash"></i> {'Apply action'|translate} {* icon-trash because the only action is deletion *}
</button>
<span id="applyOnDetails"></span>
</p>
</div> {* #permitAction *}
</fieldset>
{/if}
</form>

View File

@@ -0,0 +1,100 @@
{include file='include/colorbox.inc.tpl'}
{footer_script}{literal}
jQuery(document).ready(function() {
$("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">
<h2>{'Installed Themes'|@translate}</h2>
</div>
<div id="themesContent">
{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}
{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.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.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.ACTIVABLE_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>
{else}
<span title="{$theme.DELETE_TOOLTIP}" class="tiptip">{'Delete'|@translate}</span>
{/if}
{/if}
</div>
</div> <!-- themeActions -->
</div>
{/foreach}
</div> <!-- themeBoxes -->
</fieldset>
</div> <!-- themesContent -->

View File

@@ -0,0 +1,23 @@
{include file='include/colorbox.inc.tpl'}
{footer_script}{literal}
jQuery(document).ready(function() {
$("a.preview-box").colorbox();
});
{/literal}{/footer_script}
<div class="titrePage">
<h2>{'Add New Theme'|@translate}</h2>
</div>
{if not empty($new_themes)}
<div class="themeBoxes">
{foreach from=$new_themes item=theme name=themes_loop}
<div class="themeBox">
<div class="themeName">{$theme.name}</div>
<div class="themeShot"><a href="{$theme.screenshot}" class="preview-box" title="{$theme.name}"><img src="{$theme.thumbnail}" onerror="this.src='{$default_screenshot}'"></a></div>
<div class="themeActions"><a href="{$theme.install_url}">{'Install'|@translate}</a></div>
</div>
{/foreach}
</div> <!-- themeBoxes -->
{else}
<p>{'There is no other theme available.'|@translate}</p>
{/if}

View File

@@ -0,0 +1,281 @@
{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="themes/default/js/plugins/jquery.jgrowl.css"}
{footer_script require='jquery.ui.effect-blind,jquery.ajaxmanager,jquery.jgrowl'}
var pwg_token = '{$PWG_TOKEN}';
var extType = '{$EXT_TYPE}';
var confirmMsg = '{'Are you sure?'|@translate|@escape:'javascript'}';
var errorHead = '{'ERROR'|@translate|@escape:'javascript'}';
var successHead = '{'Update Complete'|@translate|@escape:'javascript'}';
var errorMsg = '{'an error happened'|@translate|@escape:'javascript'}';
var restoreMsg = '{'Reset ignored updates'|@translate|@escape:'javascript'}';
{literal}
var todo = 0;
var queuedManager = $.manageAjax.create('queued', {
queue: true,
maxRequests: 1,
beforeSend: function() { autoupdate_bar_toggle(1); },
complete: function() { autoupdate_bar_toggle(-1); }
});
function updateAll() {
if (confirm(confirmMsg)) {
jQuery('.updateExtension').each( function() {
if (jQuery(this).parents('div').css('display') == 'block')
jQuery(this).click();
});
}
};
function ignoreAll() {
jQuery('.ignoreExtension').each( function() {
if (jQuery(this).parents('div').css('display') == 'block')
jQuery(this).click();
});
};
function resetIgnored() {
jQuery.ajax({
type: 'GET',
url: 'ws.php',
dataType: 'json',
data: { method: 'pwg.extensions.ignoreUpdate', reset: true, type: extType, pwg_token: pwg_token, format: 'json' },
success: function(data) {
if (data['stat'] == 'ok') {
jQuery(".pluginBox, fieldset").show();
jQuery("#update_all").show();
jQuery("#ignore_all").show();
jQuery("#up_to_date").hide();
jQuery("#reset_ignore").hide();
jQuery("#ignored").hide();
checkFieldsets();
}
}
});
};
function checkFieldsets() {
var types = new Array('plugins', 'themes', 'languages');
var total = 0;
var ignored = 0;
for (i=0;i<3;i++) {
nbExtensions = 0;
jQuery("div[id^='"+types[i]+"_']").each(function(index) {
if (jQuery(this).css('display') == 'block')
nbExtensions++;
else
ignored++;
});
total = total + nbExtensions;
if (nbExtensions == 0)
jQuery("#"+types[i]).hide();
}
if (total == 0) {
jQuery("#update_all").hide();
jQuery("#ignore_all").hide();
jQuery("#up_to_date").show();
}
if (ignored > 0) {
jQuery("#reset_ignore").val(restoreMsg + ' (' + ignored + ')');
}
};
function updateExtension(type, id, revision) {
queuedManager.add({
type: 'GET',
dataType: 'json',
url: 'ws.php',
data: { method: 'pwg.extensions.update', type: type, id: id, revision: revision, pwg_token: pwg_token, format: 'json' },
success: function(data) {
if (data['stat'] == 'ok') {
jQuery.jGrowl( data['result'], { theme: 'success', header: successHead, life: 4000, sticky: false });
jQuery("#"+type+"_"+id).remove();
checkFieldsets();
} else {
jQuery.jGrowl( data['result'], { theme: 'error', header: errorHead, sticky: true });
}
},
error: function(data) {
jQuery.jGrowl( errorMsg, { theme: 'error', header: errorHead, sticky: true });
}
});
};
function ignoreExtension(type, id) {
queuedManager.add({
type: 'GET',
url: 'ws.php',
dataType: 'json',
data: { method: 'pwg.extensions.ignoreUpdate', type: type, id: id, pwg_token: pwg_token, format: 'json' },
success: function(data) {
if (data['stat'] == 'ok') {
jQuery("#"+type+"_"+id).hide();
jQuery("#reset_ignore").show();
checkFieldsets();
}
}
});
};
function autoupdate_bar_toggle(i) {
todo = todo + i;
if ((i == 1 && todo == 1) || (i == -1 && todo == 0))
jQuery('.autoupdate_bar').toggle();
}
jQuery(document).ready(function() {
jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {
id = this.id.split('_');
jQuery("#revdesc_"+id[1]).toggle('blind');
jQuery(".button_"+id[1]).toggle();
return false;
});
});
checkFieldsets();
{/literal}
{/footer_script}
<div class="titrePage">
<h2>{'Updates'|@translate}</h2>
</div>
<div class="autoupdate_bar">
<input type="submit" id="update_all" value="{'Update All'|@translate}" onClick="updateAll(); return false;">
<input type="submit" id="ignore_all" value="{'Ignore All'|@translate}" onClick="ignoreAll(); return false;">
<input type="submit" id="reset_ignore" value="{'Reset ignored updates'|@translate}" onClick="resetIgnored(); return false;" {if !$SHOW_RESET}style="display:none;"{/if}>
</div>
<div class="autoupdate_bar" style="display:none;">
{'Please wait...'|@translate}<br><img src="admin/themes/default/images/ajax-loader-bar.gif">
</div>
<p id="up_to_date" style="display:none; text-align:left; margin-left:20px;">{'All %s are up to date.'|@sprintf:$EXT_TYPE|@translate}</p>
{if not empty($update_plugins)}
<div>
<fieldset id="plugins">
<legend>{'Plugins'|@translate}</legend>
{foreach from=$update_plugins item=plugin name=plugins_loop}
<div class="pluginBox" id="plugins_{$plugin.EXT_ID}" {if $plugin.IGNORED}style="display:none;"{/if}>
<table>
<tr>
<td class="pluginBoxNameCell">
{$plugin.EXT_NAME}
</td>
<td>
<a href="#" onClick="updateExtension('plugins', '{$plugin.EXT_ID}', {$plugin.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a>
| <a href="{$plugin.URL_DOWNLOAD}">{'Download'|@translate}</a>
| <a href="#" onClick="ignoreExtension('plugins', '{$plugin.EXT_ID}'); return false;" class="ignoreExtension">{'Ignore this update'|@translate}</a>
</td>
</tr>
<tr>
<td>
{'Version'|@translate} {$plugin.CURRENT_VERSION}
</td>
<td class="pluginDesc" id="desc_{$plugin.ID}">
<em>{'Downloads'|@translate}: {$plugin.DOWNLOADS}</em>
<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:$plugin.AUTHOR}
</td>
</tr>
<tr>
<td></td>
<td class="pluginDesc">
<p id="revdesc_{$plugin.ID}" style="display:none;">{$plugin.REV_DESC|@htmlspecialchars|@nl2br}</p>
</td>
</tr>
</table>
</div>
{/foreach}
</fieldset>
</div>
{/if}
{if not empty($update_themes)}
<div>
<fieldset id="themes">
<legend>{'Themes'|@translate}</legend>
{foreach from=$update_themes item=theme name=themes_loop}
<div class="pluginBox" id="themes_{$theme.EXT_ID}" {if $theme.IGNORED}style="display:none;"{/if}>
<table>
<tr>
<td class="pluginBoxNameCell">
{$theme.EXT_NAME}
</td>
<td>
<a href="#" onClick="updateExtension('themes', '{$theme.EXT_ID}', {$theme.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a>
| <a href="{$theme.URL_DOWNLOAD}">{'Download'|@translate}</a>
| <a href="#" onClick="ignoreExtension('themes', '{$theme.EXT_ID}'); return false;" class="ignoreExtension">{'Ignore this update'|@translate}</a>
</td>
</tr>
<tr>
<td>
{'Version'|@translate} {$theme.CURRENT_VERSION}
</td>
<td class="pluginDesc" id="desc_{$theme.ID}">
<em>{'Downloads'|@translate}: {$theme.DOWNLOADS}</em>
<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:$theme.AUTHOR}
</td>
</tr>
<tr>
<td></td>
<td class="pluginDesc">
<p id="revdesc_{$theme.ID}" style="display:none;">{$theme.REV_DESC|@htmlspecialchars|@nl2br}</p>
</td>
</tr>
</table>
</div>
{/foreach}
</fieldset>
</div>
{/if}
{if not empty($update_languages)}
<div>
<fieldset id="languages">
<legend>{'Languages'|@translate}</legend>
{foreach from=$update_languages item=language name=languages_loop}
<div class="pluginBox" id="languages_{$language.EXT_ID}" {if $language.IGNORED}style="display:none;"{/if}>
<table>
<tr>
<td class="pluginBoxNameCell">
{$language.EXT_NAME}
</td>
<td>
<a href="#" onClick="updateExtension('languages', '{$language.EXT_ID}', {$language.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a>
| <a href="{$language.URL_DOWNLOAD}">{'Download'|@translate}</a>
| <a href="#" onClick="ignoreExtension('languages', '{$language.EXT_ID}'); return false;" class="ignoreExtension">{'Ignore this update'|@translate}</a>
</td>
</tr>
<tr>
<td>
{'Version'|@translate} {$language.CURRENT_VERSION}
</td>
<td class="pluginDesc" id="desc_{$language.ID}">
<em>{'Downloads'|@translate}: {$language.DOWNLOADS}</em>
<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:$language.AUTHOR}
</td>
</tr>
<tr>
<td></td>
<td class="pluginDesc">
<p id="revdesc_{$language.ID}" style="display:none;">{$language.REV_DESC|@htmlspecialchars|@nl2br}</p>
</td>
</tr>
</table>
</div>
{/foreach}
</fieldset>
</div>
{/if}

View File

@@ -0,0 +1,99 @@
{footer_script}
jQuery(document).ready(function() {ldelim}
jQuery('input[name="submit"]').click(function() {ldelim}
if(!confirm('{'Are you sure?'|@translate}'))
return false;
jQuery(this).hide();
jQuery('.autoupdate_bar').show();
});
jQuery('[name="understand"]').click(function() {ldelim}
jQuery('[name="submit"]').attr('disabled', !this.checked);
});
});
{/footer_script}
{html_head}
{literal}
<style type="text/css">
form { width: 750px; }
fieldset { padding-bottom: 30px; }
p, form p { text-align: left; margin-left:20px; }
li { margin: 5px; }
</style>
{/literal}
{/html_head}
<div class="titrePage">
<h2>{'Updates'|@translate}</h2>
</div>
{if $STEP == 0}
{if $CHECK_VERSION}
<p>{'You are running the latest version of Piwigo.'|@translate}</p>
{elseif $DEV_VERSION}
<p>{'You are running on development sources, no check possible.'|@translate}</p>
{else}
<p>{'Check for update failed for unknown reasons.'|@translate}</p>
{/if}
{/if}
{if $STEP == 1}
<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:$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:$MAJOR_VERSION:$MINOR_VERSION}</p>
{/if}
{if $STEP == 2}
<p>
{'A new version of Piwigo is available.'|@translate}<br>
{'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:$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>
{/if}
{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:$RELEASE_URL} {'Some themes and plugins may be not available yet.'|@translate}
</p>
<form action="" method="post">
{counter assign=i}
<fieldset>
<legend>{'Dump Database'|@translate}</legend>
<p><input type="checkbox" name="includeHistory"> &nbsp; {'Include history data (Warning: server memory limit may be exceeded)'|@translate}</p>
<p><input type="submit" name="dumpDatabase" value="{'Dump Database'|@translate}"></p>
</fieldset>
{counter assign=i}
<fieldset>
<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>
{/if}
{if !empty($missing.themes)}
<p><i>{'Following themes may not be compatible with the new version of Piwigo:'|@translate}</i></p>
<p><ul>{foreach from=$missing.themes item=theme}<li><a href="{$theme.uri}" class="externalLink">{$theme.name}</a></li>{/foreach}</ul><br></p>
{/if}
<p>
{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:$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>
<p><input type="hidden" name="upgrade_to" value="{$UPGRADE_TO}"></p>
</form>
{/if}

View File

@@ -0,0 +1,227 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-script-type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
{get_combined_css}
{foreach from=$themes item=theme}
{if $theme.load_css}
{combine_css path="admin/themes/`$theme.id`/theme.css" order=-10}
{/if}
{/foreach}
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/default/fix-ie7.css">
<![endif]-->
<!-- BEGIN get_combined_scripts -->
{get_combined_scripts load='header'}
<!-- END get_combined_scripts -->
{literal}
<style type="text/css">
body {
font-size:12px;
}
.content {
width: 800px;
margin: auto;
text-align: center;
padding:0;
background-color:transparent !important;
border:none;
}
#content {
min-height:0;
border:none;
margin:1em auto;
}
#theHeader {
display: block;
background:url("admin/themes/clear/images/piwigo_logo_big.png") no-repeat scroll center 20px transparent;
height:100px;
}
fieldset {
margin-top:20px;
background-color:#f1f1f1;
}
legend {
font-weight:bold;
letter-spacing:2px;
}
form fieldset p {
text-align:left;
margin:10px;
}
.content h2 {
display:block;
font-size:20px;
text-align:center;
/* margin-top:5px; */
}
table.table2 {
width: 100%;
border:0;
}
table.table2 td {
text-align: left;
padding: 5px 2px;
}
table.table2 td.fieldname {
font-weight:normal;
}
table.table2 td.fielddesc {
padding-left:10px;
font-style:italic;
}
input[type="submit"], input[type="button"], a.bigButton {
font-size:14px;
font-weight:bold;
letter-spacing:2px;
border:none;
background-color:#666666;
color:#fff;
padding:5px;
-moz-border-radius:5px;
}
input[type="submit"]:hover, input[type="button"]:hover, a.bigButton:hover {
background-color:#ff7700;
color:white;
text-decoration:none;
}
input[type="text"], input[type="password"], select {
background-color:#ddd;
border:2px solid #ccc;
-moz-border-radius:5px;
padding:2px;
}
input[type="text"]:focus, input[type="password"]:focus, select:focus {
background-color:#fff;
border:2px solid #ff7700;
}
.sql_content, .infos a {
color: #ff3363;
}
.errors {
padding-bottom:5px;
}
</style>
{/literal}
<title>Piwigo {$RELEASE} - {'Upgrade'|@translate}</title>
</head>
<body>
<div id="the_page">
<div id="theHeader"></div>
<div id="content" class="content">
{if isset($introduction)}
<h2>{'Version'|@translate} {$RELEASE} - {'Upgrade'|@translate}</h2>
{if isset($errors)}
<div class="errors">
<ul>
{foreach from=$errors item=error}
<li>{$error}</li>
{/foreach}
</ul>
</div>
{/if}
<form method="POST" action="{$introduction.F_ACTION}" name="upgrade_form">
<fieldset>
<table>
<tr>
<td>{'Language'|@translate}</td>
<td>
<select name="language" onchange="document.location = 'upgrade.php?language='+this.options[this.selectedIndex].value;">
{html_options options=$language_options selected=$language_selection}
</select>
</td>
</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:$introduction.CURRENT_RELEASE}</p>
{if isset($login)}
<p>{'Only administrator can run upgrade: please sign in below.'|@translate}</p>
{/if}
{if isset($login)}
<table>
<tr>
<td>{'Username'|@translate}</td>
<td><input type="text" name="username" id="username" size="20" maxlength="50" style="width: 150px;"></td>
</tr>
<tr>
<td>{'Password'|@translate}</td>
<td><input type="password" name="password" id="password" style="width: 150px;"></td>
</tr>
</table>
{/if}
</fieldset>
<p style="text-align: center;">
<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:$introduction.CURRENT_RELEASE:$RELEASE}</a>
</p>
-->
{/if}
{if isset($upgrade)}
<h2>{'Upgrade from version %s to %s'|@translate:$upgrade.VERSION:$RELEASE}</h2>
<fieldset>
<legend>{'Statistics'|@translate}</legend>
<ul>
<li>{'total upgrade time'|@translate} : {$upgrade.TOTAL_TIME}</li>
<li>{'total SQL time'|@translate} : {$upgrade.SQL_TIME}</li>
<li>{'SQL queries'|@translate} : {$upgrade.NB_QUERIES}</li>
</ul>
</fieldset>
<fieldset>
<legend>{'Upgrade informations'|@translate}</legend>
<ul>
{foreach from=$infos item=info}
<li>{$info}</li>
{/foreach}
</ul>
</fieldset>
<p>
<a class="bigButton" href="{$button_link}">{$button_label}</a>
</p>
{/if}
</div> {* content *}
<div>{$L_UPGRADE_HELP}</div>
</div> {* the_page *}
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
<h2>{$TITLE}</h2>
{if isset($categories_because_of_groups) }
<fieldset>
<legend>{'Albums authorized thanks to group associations'|@translate}</legend>
<ul>
{foreach from=$categories_because_of_groups item=cat }
<li>{$cat}</li>
{/foreach}
</ul>
</fieldset>
{/if}
<fieldset>
<legend>{'Other private albums'|@translate}</legend>
<form method="post" action="{$F_ACTION}">
{$DOUBLE_SELECT}
</form>
</fieldset>