mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
issue #2414 change single tag display
This commit is contained in:
@@ -409,27 +409,6 @@ function get_tags_content_title()
|
||||
. l10n( count($page['tags']) > 1 ? 'Tags' : 'Tag' )
|
||||
. '</a> ';
|
||||
|
||||
for ($i=0; $i<count($page['tags']); $i++)
|
||||
{
|
||||
|
||||
if (1 == count($page['tags']))
|
||||
{
|
||||
$title.=
|
||||
'<a href="'
|
||||
.make_index_url(
|
||||
array(
|
||||
'tags' => array( $page['tags'][$i] )
|
||||
)
|
||||
)
|
||||
.'" title="'
|
||||
.l10n('display photos linked to this tag')
|
||||
.'">'
|
||||
.trigger_change('render_tag_name', $page['tags'][$i]['name'], $page['tags'][$i])
|
||||
.'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $title;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,29 +9,26 @@ global $page;
|
||||
|
||||
$selected_related_tags_info = array();
|
||||
|
||||
if (count($page['tags']) > 1)
|
||||
foreach ($page['tags'] as $key=>$tag)
|
||||
{
|
||||
foreach ($page['tags'] as $key=>$tag)
|
||||
{
|
||||
$other_tags = $page['tags'];
|
||||
unset($other_tags[$key]);
|
||||
$other_tags = $page['tags'];
|
||||
unset($other_tags[$key]);
|
||||
|
||||
$selected_related_tags_info[$key] =
|
||||
array(
|
||||
'tag_name' => trigger_change('render_tag_name', $page['tags'][$key]['name'], $page['tags'][$key]),
|
||||
'item_count' => '',
|
||||
'index_url' => make_index_url(
|
||||
array(
|
||||
'tags' => array( $page['tags'][$key] )
|
||||
)
|
||||
),
|
||||
'remove_url' => make_index_url(
|
||||
array(
|
||||
'tags' => $other_tags
|
||||
)
|
||||
$selected_related_tags_info[$key] =
|
||||
array(
|
||||
'tag_name' => trigger_change('render_tag_name', $page['tags'][$key]['name'], $page['tags'][$key]),
|
||||
'item_count' => '',
|
||||
'index_url' => make_index_url(
|
||||
array(
|
||||
'tags' => array( $page['tags'][$key] )
|
||||
)
|
||||
);
|
||||
}
|
||||
),
|
||||
'remove_url' => make_index_url(
|
||||
array(
|
||||
'tags' => $other_tags
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$template->assign(
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<span id="selected-tags-container">
|
||||
|
||||
{foreach $SELECT_RELATED_TAGS as $TAG}
|
||||
<span class="selected-related-tag">
|
||||
<span class="selected-related-tag {if 1 == count($SELECT_RELATED_TAGS)}unique-tag{/if}">
|
||||
<a href="{$TAG.index_url}" title="{'display photos linked to this tag'|translate}">
|
||||
{$TAG.tag_name}
|
||||
</a>
|
||||
{if count($SELECT_RELATED_TAGS) > 1}
|
||||
<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>
|
||||
{/if}
|
||||
</span>
|
||||
{* {if !$TAG@last}<span class="related-tag-condition">+</span>{/if} *}
|
||||
{/foreach}
|
||||
|
||||
</span>
|
||||
|
||||
@@ -968,6 +968,10 @@ span.related-tags .tag-counter{
|
||||
margin-right:15px;
|
||||
}
|
||||
|
||||
#selected-tags-container .selected-related-tag.unique-tag{
|
||||
padding:2px 10px;
|
||||
}
|
||||
|
||||
#selected-tags-container .selected-related-tag a{
|
||||
font-weight: 700;
|
||||
font-style: Bold;
|
||||
|
||||
Reference in New Issue
Block a user