aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/template/batch_manager_global.tpl
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2015-10-09 19:13:30 +0200
committerplegall <plg@piwigo.org>2015-10-09 20:17:27 +0200
commit92224bcbf49d58829988eb0485afc17695f6de0c (patch)
tree1009cfcdb5f1f52f36e56e52a20d970f1ea318f1 /admin/themes/default/template/batch_manager_global.tpl
parent47ebd6c91f630c7b970d5abb9f1451a637afb517 (diff)
fix #357 make orphans photos more obvious
... and easy to delete them all in one click. The orpans, if any, is shown as an entry in the "Photos" menu (link on Batch Manager). In the Batch Manager, new action "delete_orphans" next to prefilter.
Diffstat (limited to '')
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl8
1 files changed, 7 insertions, 1 deletions
diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl
index 46262c0ff..c3be514b4 100644
--- a/admin/themes/default/template/batch_manager_global.tpl
+++ b/admin/themes/default/template/batch_manager_global.tpl
@@ -268,6 +268,7 @@ $(document).ready(function() {
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");
});
});
@@ -329,10 +330,15 @@ var sliders = {
{'Predefined filter'|@translate}
<select name="filter_prefilter">
{foreach from=$prefilters item=prefilter}
- <option value="{$prefilter.ID}" {if isset($filter.prefilter) && $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option>
+ {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>
+ <a id="delete_orphans" href="admin.php?page=batch_manager&amp;action=delete_orphans" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'no_album'}display:none{/if}">{'Delete %d orphan photos'|translate:$NB_ORPHANS}</a>
<span id="duplicates_options" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'duplicates'}display:none{/if}">
{'based on'|translate}