[Rt-commit] r19208 - in rt/3.8/trunk: share/html/Dashboards/Elements

sartak at bestpractical.com sartak at bestpractical.com
Wed Apr 15 18:53:12 EDT 2009


Author: sartak
Date: Wed Apr 15 18:53:12 2009
New Revision: 19208

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/share/html/Dashboards/Elements/DashboardTabs
   rt/3.8/trunk/share/html/Dashboards/Elements/Tabs

Log:
 r82184 at onn:  sartak | 2009-04-15 18:53:02 -0400
 Always include the current dashboard in the tabs, even if it's not in the initial seven


Modified: rt/3.8/trunk/share/html/Dashboards/Elements/DashboardTabs
==============================================================================
--- rt/3.8/trunk/share/html/Dashboards/Elements/DashboardTabs	(original)
+++ rt/3.8/trunk/share/html/Dashboards/Elements/DashboardTabs	Wed Apr 15 18:53:12 2009
@@ -1,3 +1,6 @@
+<%args>
+$CurrentDashboard => undef
+</%args>
 <%init>
 my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
 
@@ -8,7 +11,13 @@
     splice @dashboards, 7;
 }
 
+# always include the current dashboard, even if it's not in the initial list
+push @dashboards, $CurrentDashboard
+    if $CurrentDashboard
+    && 0 == grep { $_->Id == $CurrentDashboard->Id } @dashboards;
+
 my $position = 0;
+
 my $tabs = {
     map {
         ++$position;

Modified: rt/3.8/trunk/share/html/Dashboards/Elements/Tabs
==============================================================================
--- rt/3.8/trunk/share/html/Dashboards/Elements/Tabs	(original)
+++ rt/3.8/trunk/share/html/Dashboards/Elements/Tabs	Wed Apr 15 18:53:12 2009
@@ -65,7 +65,7 @@
     my $render    = "Dashboards/$id/$name";
     my $subscribe = "Dashboards/Subscription.html?DashboardId=$id";
 
-    $subtabs = $m->comp('DashboardTabs');
+    $subtabs = $m->comp('DashboardTabs', CurrentDashboard => $DashboardObj);
     $current_subtab = $render;
 
     $actions = {


More information about the Rt-commit mailing list