[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.5-306-gee3731f
sartak at bestpractical.com
sartak at bestpractical.com
Thu Oct 15 14:32:29 EDT 2009
The branch, 3.8-trunk has been updated
via ee3731ffdcc5cdbdd4027ae8821888112f4ba4a0 (commit)
from 0c6959ab9ad12d4dcd2fc53960ab1c40d6bdc18d (commit)
Summary of changes:
share/html/Elements/DashboardTabs | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit ee3731ffdcc5cdbdd4027ae8821888112f4ba4a0
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Thu Oct 15 14:32:06 2009 -0400
Callback for massaging the dashboard tabs on the homepage and dashboards
diff --git a/share/html/Elements/DashboardTabs b/share/html/Elements/DashboardTabs
index e54a7cf..10a3ad8 100644
--- a/share/html/Elements/DashboardTabs
+++ b/share/html/Elements/DashboardTabs
@@ -3,12 +3,19 @@ $CurrentDashboard => undef
</%args>
<%init>
my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
+my $limit = 7;
+
+$m->callback(
+ Dashboards => \@dashboards,
+ Limit => \$limit,
+ CallbackName => 'MassageDashboards',
+);
# limit to a maximum of 7 dashboards
my $more = 0;
-if (@dashboards > 7) {
+if (@dashboards > $limit) {
$more = 1;
- splice @dashboards, 7;
+ splice @dashboards, $limit;
}
# always include the current dashboard, even if it's not in the initial list
@@ -39,7 +46,6 @@ if ($more) {
$tabs->{"D-more"} = {
title => loc('More'),
path => 'Dashboards/index.html',
-
}
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list