X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FListMenu;h=5c11284e706ca86d5f344f7d2ffd647a3e6315e0;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hp=57489e31fb285f89a124e0fab671c6f9fa6d7ea2;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/rt/share/html/Elements/ListMenu b/rt/share/html/Elements/ListMenu index 57489e31f..5c11284e7 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-2019 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -46,13 +46,49 @@ %# %# END BPS TAGGED BLOCK }}} <%args> -$items +$menu +$show_children => undef + +<%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; +}; +