feature 1583: replace add_tag.png icon by a simple "+" character in the

"related tags" block. Only keep one link for each tag in the "related tags"
block.

git-svn-id: http://piwigo.org/svn/trunk@5703 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2010-04-08 08:26:34 +00:00
parent c10a261817
commit 44d3601933
4 changed files with 20 additions and 24 deletions
+16 -18
View File
@@ -112,29 +112,27 @@ function initialize_menu()
$block = $menu->get_block('mbTags');
if ( $block!=null and 'tags'==@$page['section'] and !empty($page['items']) )
{
$tags = get_common_tags($page['items'],
$conf['menubar_tag_cloud_items_number'], $page['tag_ids']);
$tags = get_common_tags(
$page['items'],
$conf['menubar_tag_cloud_items_number'],
$page['tag_ids']
);
$tags = add_level_to_tags($tags);
foreach ($tags as $tag)
{
$block->data[] =
array_merge( $tag,
array(
'URL' => make_index_url(
array(
'tags' => array($tag)
$block->data[] = array_merge(
$tag,
array(
'U_ADD' => make_index_url(
array(
'tags' => array_merge(
$page['tags'],
array($tag)
)
),
'U_ADD' => make_index_url(
array(
'tags' => array_merge(
$page['tags'],
array($tag)
)
)
),
)
)
),
)
);
}
$block->template = 'menubar_tags.tpl';
Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 B

+4 -6
View File
@@ -2,15 +2,13 @@
<dd>
<div id="menuTagCloud">
{foreach from=$block->data item=tag}
<span>
{if !empty($tag.U_ADD) }
<a href="{$tag.U_ADD}"
<span style="margin-right:5px;">
<a class="tagLevel{$tag.level}" href="{$tag.U_ADD}"
title="{$pwg->l10n_dec('%d image is also linked to current tags', '%d images are also linked to current tags', $tag.counter)}"
rel="nofollow">
<img src="{$ROOT_URL}{$themeconf.icon_dir}/add_tag.png" alt="+">
+{$tag.name}
</a>
{/if}
<a href="{$tag.URL}" class="tagLevel{$tag.level}" title="{'See images linked to this tag only'|@translate}">{$tag.name}</a>{* there should be no space between end of a and span elements to avoid IE8 bug https://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=366567 *}</span>
</span>
{/foreach}
</div>
</dd>