feature 1583: (tag navigation ergonomy) in the page title, always display the

"remove tag" icon, whatever the number of tags.

git-svn-id: http://piwigo.org/svn/trunk@5706 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2010-04-08 08:49:40 +00:00
parent 667ebdaa28
commit c5a5bbc079

View file

@ -411,25 +411,29 @@ function get_tags_content_title()
.$page['tags'][$i]['name']
.'</a>';
if ( count($page['tags'])>2 )
$remove_url = null;
if (count($page['tags']) == 1)
{
$remove_url = get_root_url().'tags.php';
}
else
{
$other_tags = $page['tags'];
unset ( $other_tags[$i] );
$title.=
'<a href="'
.make_index_url(
array(
'tags' => $other_tags
)
unset($other_tags[$i]);
$remove_url = make_index_url(
array(
'tags' => $other_tags
)
.'" style="border:none;" title="'
.l10n('remove this tag from the list')
.'"><img src="'
.get_root_url().get_themeconf('icon_dir').'/remove_s.png'
.'" alt="x" style="vertical-align:bottom;" class="button">'
.'</a>';
);
}
$title.=
'<a href="'.$remove_url.'" style="border:none;" title="'
.l10n('remove this tag from the list')
.'"><img src="'
.get_root_url().get_themeconf('icon_dir').'/remove_s.png'
.'" alt="x" style="vertical-align:bottom;" class="button">'
.'</a>';
}
return $title;
}