aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/template
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
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 'admin/themes/default/template')
-rw-r--r--admin/themes/default/template/admin.tpl3
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl8
2 files changed, 10 insertions, 1 deletions
diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl
index 67e0832bb..318075406 100644
--- a/admin/themes/default/template/admin.tpl
+++ b/admin/themes/default/template/admin.tpl
@@ -42,6 +42,9 @@ $('#menubar').lightAccordion({
{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>
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}