diff options
author | plegall <plg@piwigo.org> | 2011-09-02 08:37:21 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2011-09-02 08:37:21 +0000 |
commit | bd7f8c0ba2e5686c25152de220f645dc39a72ccd (patch) | |
tree | 7acc068fba5b32172a2bb0c7468f44aeea8da76c /admin/themes/default/template | |
parent | 88951a79468fefe8504b79c7a43981bf381cbdf8 (diff) |
feature 1078 added: ability to merge tags
git-svn-id: http://piwigo.org/svn/trunk@12032 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes/default/template')
-rw-r--r-- | admin/themes/default/template/tags.tpl | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/admin/themes/default/template/tags.tpl b/admin/themes/default/template/tags.tpl index 10a4f8b84..51b8c3614 100644 --- a/admin/themes/default/template/tags.tpl +++ b/admin/themes/default/template/tags.tpl @@ -1,5 +1,28 @@ {include file='include/tag_selection.inc.tpl'} +{footer_script}{literal} +jQuery(document).ready(function(){ + function displayDeletionWarnings() { + jQuery(".warningDeletion").show(); + jQuery("input[name=destination_tag]:checked").parent("label").children(".warningDeletion").hide(); + } + + displayDeletionWarnings(); + + jQuery("#mergeTags label").click(function() { + displayDeletionWarnings(); + }); + + jQuery("input[name=merge]").click(function() { + if (jQuery("ul.tagSelection input[type=checkbox]:checked").length < 2) { + alert("{/literal}{'Select at least two tags for merging'|@translate}{literal}"); + return false; + } + }); +}); +{/literal}{/footer_script} + + <div class="titrePage"> <h2>{'Manage tags'|@translate}</h2> </div> @@ -30,6 +53,19 @@ </fieldset> {/if} + {if isset($MERGE_TAGS_LIST)} + <input type="hidden" name="merge_list" value="{$MERGE_TAGS_LIST}"> + + <fieldset id="mergeTags"> + <legend>{'Merge tags'|@translate}</legend> + {'Select the destination tag'|@translate}<br><br> + {foreach from=$tags item=tag name=tagloop} + <label><input type="radio" name="destination_tag" value="{$tag.ID}"{if $smarty.foreach.tagloop.index == 0} checked="checked"{/if}> {$tag.NAME}<span class="warningDeletion"> {'(this tag will be deleted)'|@translate}</span></label><br> + {/foreach} + <br><input type="submit" name="confirm_merge" value="{'Confirm merge'|@translate}"> + </fieldset> + {/if} + <fieldset> <legend>{'Add a tag'|@translate}</legend> @@ -49,6 +85,7 @@ <p> <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> <input class="submit" type="submit" name="edit" value="{'Edit selected tags'|@translate}"> + <input class="submit" type="submit" name="merge" value="{'Merge selected tags'|@translate}"> <input class="submit" type="submit" name="delete" value="{'Delete selected tags'|@translate}" onclick="return confirm('{'Are you sure?'|@translate}');"> </p> </fieldset> |