mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
feature 479: when more than 3 tags selected, be able to remove one tag
from the multiple tags git-svn-id: http://piwigo.org/svn/trunk@1606 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -610,4 +610,52 @@ function page_not_found($msg, $alternate_url=null)
|
||||
.$msg.'</div>',
|
||||
5 );
|
||||
}
|
||||
|
||||
/* returns the title to be displayed above thumbnails on tag page
|
||||
*/
|
||||
function get_tags_content_title()
|
||||
{
|
||||
global $page;
|
||||
$title = count($page['tags']) > 1 ? l10n('Tags') : l10n('Tag');
|
||||
$title.= ' ';
|
||||
|
||||
for ($i=0; $i<count($page['tags']); $i++)
|
||||
{
|
||||
$title.= $i>0 ? ' + ' : '';
|
||||
|
||||
$title.=
|
||||
'<a href="'
|
||||
.make_index_url(
|
||||
array(
|
||||
'tags' => array( $page['tags'][$i] )
|
||||
)
|
||||
)
|
||||
.'" title="'
|
||||
.l10n('See pictures linked to this tag only')
|
||||
.'">'
|
||||
.$page['tags'][$i]['name']
|
||||
.'</a>';
|
||||
|
||||
if ( count($page['tags'])>2 )
|
||||
{
|
||||
$other_tags = $page['tags'];
|
||||
unset ( $other_tags[$i] );
|
||||
$title.=
|
||||
'<a href="'
|
||||
.make_index_url(
|
||||
array(
|
||||
'tags' => $other_tags
|
||||
)
|
||||
)
|
||||
.'" style="border:none;" title="'
|
||||
.l10n('remove this tag')
|
||||
.'"><img src="'
|
||||
.get_root_url().get_themeconf('icon_dir').'/remove_s.png'
|
||||
.'" alt="x" style="vertical-align:bottom;" class="button"/>'
|
||||
.'</a>';
|
||||
}
|
||||
|
||||
}
|
||||
return $title;
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user