[Rt-commit] rt branch, 3.8-trunk, updated. fc668bfe85dbf11f6bcf28f8803ce80cd34ea3ff

sartak at bestpractical.com sartak at bestpractical.com
Mon Aug 17 22:17:21 EDT 2009


The branch, 3.8-trunk has been updated
       via  fc668bfe85dbf11f6bcf28f8803ce80cd34ea3ff (commit)
      from  7a5c5c9109e63792c18fefe8dff2cfd99d2803df (commit)

Summary of changes:
 share/html/Elements/PageLayout |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit fc668bfe85dbf11f6bcf28f8803ce80cd34ea3ff
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Aug 17 22:15:49 2009 -0400

    Support for pre_separator

diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index 4ab89ad..981e58a 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -73,8 +73,10 @@
 <%perl>
  if ($page_tabs) {
      my @tabs = ( sort grep { $_ !~ /^(?:current_toptab|this)$/ } keys %{$page_tabs});
+     my $tab_idx = -1;
      foreach my $tab ( @tabs ) {
          $count++;
+         $tab_idx++;
 
          my $current = $page_tabs->{current_toptab} || "";
          my $path    = $page_tabs->{$tab}->{'path'} || "";
@@ -83,6 +85,12 @@
          $current =~ s#(/index\.html)?(\?)?$##gi;
          
          $sep = $toptabs->{$tab}->{'separator'} ? 1 : 0;
+
+         my $next_tab = $tabs[$tab_idx+1];
+         if ($next_tab && $toptabs->{$next_tab}->{'pre_separator'}) {
+            $sep = 1;
+         }
+
          $class->{a} = $path eq $current ? ' class="selected"' : undef;
 
          my @li;
@@ -124,10 +132,18 @@
 
  if ($type && %$type) {
      my @actions  = sort keys %{$type};
+     my $action_idx = -1;
      foreach my $action (@actions) {
          $count++;
+         $action_idx++;
+
          $sep = $type->{$action}->{'separator'} ? 1 : 0;
 
+         my $next_action = $actions[$action_idx+1];
+         if ($next_action && $type->{$next_action}->{'pre_separator'}) {
+            $sep = 1;
+         }
+
          my @li;
          push @li, 'first' if $count == 1;
          push @li, 'pre-separator' if $sep;

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


More information about the Rt-commit mailing list