Changeset 5703


Ignore:
Timestamp:
Apr 8, 2010, 10:26:34 AM (14 years ago)
Author:
plg
Message:

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.

Location:
trunk
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/menubar.inc.php

    r5293 r5703  
    113113  if ( $block!=null and 'tags'==@$page['section'] and !empty($page['items']) )
    114114  {
    115     $tags = get_common_tags($page['items'],
    116           $conf['menubar_tag_cloud_items_number'], $page['tag_ids']);
     115    $tags = get_common_tags(
     116      $page['items'],
     117      $conf['menubar_tag_cloud_items_number'],
     118      $page['tag_ids']
     119      );
    117120    $tags = add_level_to_tags($tags);
    118121
    119122    foreach ($tags as $tag)
    120123    {
    121       $block->data[] =
    122         array_merge( $tag,
    123           array(
    124             'URL' => make_index_url(
    125               array(
    126                 'tags' => array($tag)
     124      $block->data[] = array_merge(
     125        $tag,
     126        array(
     127          'U_ADD' => make_index_url(
     128            array(
     129              'tags' => array_merge(
     130                $page['tags'],
     131                array($tag)
    127132                )
    128               ),
    129             'U_ADD' => make_index_url(
    130                   array(
    131                     'tags' => array_merge(
    132                       $page['tags'],
    133                       array($tag)
    134                       )
    135                     )
    136                   ),
    137             )
     133              )
     134            ),
     135          )
    138136        );
    139137    }
  • trunk/themes/default/template/menubar_tags.tpl

    r5178 r5703  
    33        <div id="menuTagCloud">
    44                {foreach from=$block->data item=tag}
    5                 <span>
    6                         {if !empty($tag.U_ADD) }
    7                         <a href="{$tag.U_ADD}"
     5                <span style="margin-right:5px;">
     6                        <a class="tagLevel{$tag.level}" href="{$tag.U_ADD}"
    87                                title="{$pwg->l10n_dec('%d image is also linked to current tags', '%d images are also linked to current tags', $tag.counter)}"
    98                                rel="nofollow">
    10                                 <img src="{$ROOT_URL}{$themeconf.icon_dir}/add_tag.png" alt="+">
     9                                +{$tag.name}
    1110                        </a>
    12                         {/if}
    13                         <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>
     11                </span>
    1412                {/foreach}
    1513        </div>
Note: See TracChangeset for help on using the changeset viewer.