X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FListMenu;h=34ef1c7053d6b5b939ce87c824c77fd6a0ac2f47;hb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;hp=57489e31fb285f89a124e0fab671c6f9fa6d7ea2;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/share/html/Elements/ListMenu b/rt/share/html/Elements/ListMenu index 57489e31f..34ef1c705 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-2013 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; +}; +