[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.5-210-g16e6cfe
sartak at bestpractical.com
sartak at bestpractical.com
Thu Oct 1 11:09:49 EDT 2009
The branch, 3.8-trunk has been updated
via 16e6cfefcd3d7dd447ee66cabe11c0384ce1b779 (commit)
from f7f6a610f5105185c4bd1777090b653e1b9f48e3 (commit)
Summary of changes:
share/html/Dashboards/Render.html | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 16e6cfefcd3d7dd447ee66cabe11c0384ce1b779
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Thu Oct 1 11:09:28 2009 -0400
Use the user's search preferences for number of dashboard rows
diff --git a/share/html/Dashboards/Render.html b/share/html/Dashboards/Render.html
index 73e5feb..1893b53 100644
--- a/share/html/Dashboards/Render.html
+++ b/share/html/Dashboards/Render.html
@@ -100,7 +100,7 @@ my ($ok, $msg) = $DashboardObj->LoadById($id);
Abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg)) if !$ok;
my $SubscriptionObj = RT::Attribute->new($session{'CurrentUser'});
-my $rows = 20;
+my $rows;
# try to load the subscription to this id to get a better idea of number of rows
for my $sub ($session{'CurrentUser'}->UserObj->Attributes->Named('Subscription')) {
@@ -110,6 +110,12 @@ for my $sub ($session{'CurrentUser'}->UserObj->Attributes->Named('Subscription')
last;
}
+# otherwise honor their search preferences.. otherwise 20 rows
+if (!$rows) {
+ my $prefs = $session{'CurrentUser'}->UserObj->Preferences("SearchDisplay") || {};
+ $rows = defined($prefs->{'RowsPerPage'}) ? $prefs->{'RowsPerPage'} : 20;
+}
+
my $title = loc 'Dashboard [_1]', $DashboardObj->Name;
my $show_cb = sub {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list