aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-04-08 08:49:40 +0000
committerplegall <plg@piwigo.org>2010-04-08 08:49:40 +0000
commitc5a5bbc07930652473148ecdae90c299934acf20 (patch)
tree0cd81549445eadf1e60e8fa72053a0c3c60fef2f
parent667ebdaa28d4973e58d237ba7469969efe1b85a9 (diff)
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
-rw-r--r--include/functions_html.inc.php34
1 files changed, 19 insertions, 15 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index 5aa512685..3cd429cea 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -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;
}