[Rt-commit] r19201 - in rt/3.8/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Apr 14 22:58:32 EDT 2009


Author: sartak
Date: Tue Apr 14 22:58:31 2009
New Revision: 19201

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

Log:
 r82165 at onn:  sartak | 2009-04-14 22:58:19 -0400
 Add missing DashboardTabs file


Added: rt/3.8/trunk/share/html/Elements/DashboardTabs
==============================================================================
--- (empty file)
+++ rt/3.8/trunk/share/html/Elements/DashboardTabs	Tue Apr 14 22:58:31 2009
@@ -0,0 +1,37 @@
+<%init>
+my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
+
+# limit to a maximum of 7 dashboards
+my $more = 0;
+if (@dashboards > 7) {
+    $more = 1;
+    splice @dashboards, 7;
+}
+
+my $position = 0;
+my $tabs = {
+    map {
+        ++$position;
+        my $key = sprintf 'D-%03d', $position;
+        $key => {
+            title => '"' . $_->Name . '"',
+            path  => 'Dashboards/' . $_->Id . '/' . $_->Name,
+        }
+    }
+    @dashboards
+};
+
+$tabs->{"A"} = {
+    # every dashboard gets its name surrounded with "", so it's better to be
+    # consistent here, even though the language may not use ""s
+    title => '"' . loc('Home') . '"',
+    path  => 'index.html',
+};
+
+if ($more) {
+    $tabs->{"D-more"} = {
+        title => loc('More'),
+        path  => 'Dashboards/index.html',
+    }
+}
+</%init>


More information about the Rt-commit mailing list