X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FListMenu;h=7c9af5c5d491c4d2054cd0471e5409ddc6a1b088;hb=43a06151e47d2c59b833cbd8c26d97865ee850b6;hp=57489e31fb285f89a124e0fab671c6f9fa6d7ea2;hpb=6587f6ba7d047ddc1686c080090afe7d53365bd4;p=freeside.git diff --git a/rt/share/html/Elements/ListMenu b/rt/share/html/Elements/ListMenu index 57489e31f..7c9af5c5d 100644 --- a/rt/share/html/Elements/ListMenu +++ b/rt/share/html/Elements/ListMenu @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -46,13 +46,45 @@ %# %# END BPS TAGGED BLOCK }}} <%args> -$items +$menu + +<%INIT> +my $web_path = RT->Config->Get('WebPath'); +my $interp = $m->interp; +my $show_link = sub { + my $e = shift; + my $res = ''; + if ( $e->path) { + $res .= 'path or $e->path =~ m{^\w+:/}) + ? $e->path + : $web_path . $e->path; + $res .= ' href="'. $interp->apply_escapes($url, 'h') .'"' + if $url; + + if ( $e->target ) { + $res .= ' target="'. $interp->apply_escapes( $e->target, 'h' ) .'"'; + } + $res .= '>'; + } + + my $title = $e->title; + $title = $interp->apply_escapes( $title, 'h' ); + $res .= $title; + + if ( $e->path) { + $res .= ''; + } + return $res; +}; +