[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.4-441-g8bcffb1

Alex Vandiver alexmv at bestpractical.com
Tue Nov 9 15:39:15 EST 2010


The branch, 3.9-trunk has been updated
       via  8bcffb1e92ee79e8e21679dffd357412236faa2e (commit)
      from  b5c9161403307b263e5e0f010017a138162ca8d0 (commit)

Summary of changes:
 share/html/Elements/Menu |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 8bcffb1e92ee79e8e21679dffd357412236faa2e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Nov 9 12:33:23 2010 -0500

    Allow menu items to respect the ->target attribute, and absolute links

diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index 116f1e7..48cdc56 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -56,7 +56,8 @@ class="has-children" \
 % }
 >\
 % if ($child->link_item) {
-<a id="<%$item_id%>" <% $child->path ? ' href="'.RT->Config->Get('WebPath').$child->path.'"' : '' |n%>>\
+% my $url = (not $child->path or $child->path =~ m{^\w+:/}) ? $child->path : RT->Config->Get('WebPath').$child->path;
+<a id="<%$item_id%>" <% $child->path ? ' href="'.$url.'"' : '' |n%><% $child->target ? ' target="'.$child->target.'"' : '' %>>\
 % }
 % if ($child->escape_title) {
 <%$child->title%>\

-----------------------------------------------------------------------


More information about the Rt-commit mailing list