[Rt-commit] r14935 - rt/3.8/trunk/share/html/Elements

ruz at bestpractical.com ruz at bestpractical.com
Fri Aug 8 21:07:39 EDT 2008


Author: ruz
Date: Fri Aug  8 21:07:16 2008
New Revision: 14935

Modified:
   rt/3.8/trunk/share/html/Elements/PageLayout

Log:
* add support for external links in tabs and targets

Modified: rt/3.8/trunk/share/html/Elements/PageLayout
==============================================================================
--- rt/3.8/trunk/share/html/Elements/PageLayout	(original)
+++ rt/3.8/trunk/share/html/Elements/PageLayout	Fri Aug  8 21:07:16 2008
@@ -91,8 +91,14 @@
          push @li, 'post-separator' if $postsep;
          push @li, 'last' if $tab eq $tabs[-1];
          $class->{li} = join ' ', @li;
+
+         my $href = $path;
+         $href = RT->Config->Get('WebPath') .'/'. $href
+            unless $path =~ /^\w+:/;
+         my $target = $page_tabs->{$tab}->{'target'} || '';
+         $target = $m->interp->apply_escapes( $target, 'h' );
 </%perl>
-    <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && "&#183; "|n%><a href="<%RT->Config->Get('WebPath')%>/<%$page_tabs->{$tab}->{'path'}%>"<%$class->{a}|n%><% $class->{a} ? ' name="focus"' : ''|n %>><% $page_tabs->{$tab}->{'title'} %></a></li>
+    <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && "&#183; "|n%><a href="<% $href %>"<%$class->{a}|n%><% $class->{a} ? ' name="focus"' : ''|n %><% $target? " target='$target'": '' |n %>><% $page_tabs->{$tab}->{'title'} %></a></li>
 %
 %         if ($sep) {
     <li class="separator">&#183;&#183;&#183;</li>


More information about the Rt-commit mailing list