Skip to content

Commit

Permalink
feature 1583: (tag navigation ergonomy) in the page title, always dis…
Browse files Browse the repository at this point in the history
…play the

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

git-svn-id: http://piwigo.org/svn/trunk@5706 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Apr 8, 2010
1 parent 667ebda commit c5a5bbc
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions include/functions_html.inc.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit c5a5bbc

Please sign in to comment.