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

feature 1583: (tag navigation ergonomy) in the page title, always display the
"remove tag" icon, whatever the number of tags.

File:
1 edited

Legend:

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

    r5682 r5706  
    412412      .'</a>';
    413413
    414     if ( count($page['tags'])>2 )
     414    $remove_url = null;
     415    if (count($page['tags']) == 1)
     416    {
     417      $remove_url = get_root_url().'tags.php';
     418    }
     419    else
    415420    {
    416421      $other_tags = $page['tags'];
    417       unset ( $other_tags[$i] );
    418       $title.=
    419         '<a href="'
    420         .make_index_url(
    421           array(
    422             'tags' => $other_tags
    423             )
     422      unset($other_tags[$i]);
     423      $remove_url = make_index_url(
     424        array(
     425          'tags' => $other_tags
    424426          )
    425         .'" style="border:none;" title="'
    426         .l10n('remove this tag from the list')
    427         .'"><img src="'
     427        );
     428    }
     429   
     430    $title.=
     431      '<a href="'.$remove_url.'" style="border:none;" title="'
     432      .l10n('remove this tag from the list')
     433      .'"><img src="'
    428434        .get_root_url().get_themeconf('icon_dir').'/remove_s.png'
    429         .'" alt="x" style="vertical-align:bottom;" class="button">'
    430         .'</a>';
    431     }
    432 
     435      .'" alt="x" style="vertical-align:bottom;" class="button">'
     436      .'</a>';
    433437  }
    434438  return $title;
Note: See TracChangeset for help on using the changeset viewer.