mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01: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(
|
||||
|
||||
Reference in New Issue
Block a user