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