mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
fixes #2414 change related tags display
Add conf to display or not the related tag options by default Add templates and css for new display
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<div class="mcs-side-results search-in-set-button" id="related-tags-toggle">
|
||||
<div>
|
||||
<p>{'Related tags'|translate}<i class="gallery-icon-up-open rotated"></i></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{foreach from=$RELATED_TAGS item=tag}
|
||||
<span class="related-tags {if isset($RELATED_TAGS_DISPLAY) and $RELATED_TAGS_DISPLAY == false} hide{/if}">{strip}
|
||||
<a class="tagLevel {if isset($tag.level)}{$tag.level}{/if}" href=
|
||||
{if isset($tag.U_ADD)}
|
||||
"{$tag.U_ADD}" title="{$tag.counter|@translate_dec:'%d photo is also linked to current tags':'%d photos are also linked to current tags'}" rel="nofollow">
|
||||
{else}
|
||||
"{$tag.URL}" title="{'display photos linked to this tag'|@translate}">
|
||||
{/if}
|
||||
+ {$tag.name}</a><div class="tag-counter">{$tag.counter}</div></span>{/strip}
|
||||
{/foreach}
|
||||
|
||||
{footer_script require='jquery'}
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#related-tags-toggle').on("click", function (e) {
|
||||
$('.related-tags').toggle();
|
||||
$('#related-tags-toggle .gallery-icon-up-open').toggleClass('rotated');
|
||||
});
|
||||
});
|
||||
|
||||
{/footer_script}
|
||||
@@ -0,0 +1,14 @@
|
||||
<span id="selected-tags-container">
|
||||
|
||||
{foreach $SELECT_RELATED_TAGS as $TAG}
|
||||
<span class="selected-related-tag">
|
||||
<a href="{$TAG.index_url}" title="{'display photos linked to this tag'|translate}">
|
||||
{$TAG.tag_name}
|
||||
</a>
|
||||
<a class="selected-related-tag-remove" href="{$TAG.remove_url}" style="border:none;" title="{'remove this tag from the list'|translate}">
|
||||
<i class="gallery-icon-cancel"></i>
|
||||
</a>
|
||||
</span>{if !$TAG@last}<span class="related-tag-condition">+</span>{/if}
|
||||
{/foreach}
|
||||
|
||||
</span>
|
||||
Reference in New Issue
Block a user