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>
|
||||
@@ -1,4 +1,5 @@
|
||||
{combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'}
|
||||
{combine_css path="themes/default/vendor/fontello/css/gallery-icon.css" order=-10}
|
||||
|
||||
{$MENUBAR}
|
||||
|
||||
@@ -13,11 +14,29 @@
|
||||
<div class="titrePage{if isset($chronology.TITLE)} calendarTitleBar{/if}">
|
||||
<ul class="categoryActions">
|
||||
{if isset($SEARCH_IN_SET_ACTION) and $SEARCH_IN_SET_ACTION}
|
||||
{combine_css path="themes/default/vendor/fontello/css/gallery-icon.css" order=-10}
|
||||
<li id="cmdSearchInSet"><a href="{$SEARCH_IN_SET_URL}" title="{'Search in this set'|translate}" class="pwg-state-default pwg-button" rel="nofollow">
|
||||
<span class="gallery-icon-search-folder"></span><span class="pwg-button-text">{'Search in this set'|translate}</span>
|
||||
</a></li>
|
||||
{/if}
|
||||
|
||||
{* We want the related tags action icon on all pages except the index and tag pages*}
|
||||
{if isset($RELATED_TAGS_ACTION) and $RELATED_TAGS_ACTION}
|
||||
<li>{strip}<a id="cmdRelatedTags" title="{'Related tags'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
|
||||
<span class="pwg-icon gallery-icon-tag"></span><span class="pwg-button-text">{'Related tags'|@translate}</span>
|
||||
</a>
|
||||
<div id="relatedTagsBox" class="switchBox">
|
||||
<div class="switchBoxTitle">{'Related tags'|@translate}</div>
|
||||
{foreach from=$RELATED_TAGS item=tag}
|
||||
<a href=
|
||||
"{$tag.URL}" title="{'display photos linked to this tag'|@translate}">
|
||||
{$tag.name}
|
||||
</a>
|
||||
{/foreach}
|
||||
</div>
|
||||
{footer_script}(window.SwitchBox=window.SwitchBox||[]).push("#cmdRelatedTags", "#relatedTagsBox");{/footer_script}
|
||||
{/strip}</li>
|
||||
{/if}
|
||||
|
||||
{if !empty($image_orders)}
|
||||
<li>{strip}<a id="sortOrderLink" title="{'Sort order'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
|
||||
<span class="pwg-icon pwg-icon-sort"></span><span class="pwg-button-text">{'Sort order'|@translate}</span>
|
||||
@@ -97,7 +116,13 @@
|
||||
{if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
|
||||
</ul>
|
||||
|
||||
<h2>{$TITLE} {if $NB_ITEMS > 0}<span class="badge nb_items">{$NB_ITEMS}</span>{/if}</h2>
|
||||
<div id="breadcrumb">
|
||||
<h2>{$TITLE}
|
||||
{if $NB_ITEMS > 0}<span class="badge nb_items">{$NB_ITEMS}</span>{/if}
|
||||
</h2>
|
||||
|
||||
{$SELECTED_TAGS_TEMPLATE}
|
||||
</div>
|
||||
|
||||
{if isset($chronology_views)}
|
||||
<div class="calendarViews">{'View'|@translate}:
|
||||
@@ -157,14 +182,20 @@
|
||||
{include file=$FILE_CHRONOLOGY_VIEW}
|
||||
{/if}
|
||||
|
||||
<div class="action-buttons">
|
||||
|
||||
{if isset($SEARCH_IN_SET_BUTTON) and $SEARCH_IN_SET_BUTTON}
|
||||
<div class="mcs-side-results search-in-set-button">
|
||||
<div>
|
||||
<p><a href="{$SEARCH_IN_SET_URL}" class="gallery-icon-search-folder" rel="nofollow">{'Search in this set'|translate}</a></p>
|
||||
<div class="mcs-side-results search-in-set-button">
|
||||
<div>
|
||||
<p><a href="{$SEARCH_IN_SET_URL}" class="gallery-icon-search-folder" rel="nofollow">{'Search in this set'|translate}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{include file='include/related_tags.inc.tpl'}
|
||||
|
||||
</div>
|
||||
|
||||
{if !empty($CONTENT_DESCRIPTION)}
|
||||
<div class="additional_info">
|
||||
{$CONTENT_DESCRIPTION}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<dt>{if $IS_RELATED}{'Related tags'|@translate}{else}{'Tags'|@translate}{/if}</dt>
|
||||
<dt>{'Tags'|@translate}</dt>
|
||||
<dd>
|
||||
<div id="menuTagCloud">
|
||||
{foreach from=$block->data item=tag}
|
||||
|
||||
Reference in New Issue
Block a user