[Rt-commit] r13581 - in rt/3.8/trunk: share/html/Dashboards/Elements
sartak at bestpractical.com
sartak at bestpractical.com
Tue Jun 24 20:57:02 EDT 2008
Author: sartak
Date: Tue Jun 24 20:56:59 2008
New Revision: 13581
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/share/html/Dashboards/Elements/ShowDashboards
Log:
r63212 at onn: sartak | 2008-06-24 20:46:30 -0400
Refactor ShowDashboards so only that its table display (sans titlebox) can be used
Modified: rt/3.8/trunk/share/html/Dashboards/Elements/ShowDashboards
==============================================================================
--- rt/3.8/trunk/share/html/Dashboards/Elements/ShowDashboards (original)
+++ rt/3.8/trunk/share/html/Dashboards/Elements/ShowDashboards Tue Jun 24 20:56:59 2008
@@ -46,9 +46,30 @@
%#
%# END BPS TAGGED BLOCK }}}
<&| /Widgets/TitleBox, title => loc("[_1] Dashboards", $Type) &>
+<& SELF:table, %ARGS &>
+</&>
+<%ARGS>
+$Type => undef
+</%ARGS>
+
+<%METHOD table>
+<%ARGS>
+$Dashboards => undef
+$Verbose => 1
+</%ARGS>
+<%INIT>
+# map each subscription to a dashboard ID
+my %subscription_for;
+
+for my $attr ($session{'CurrentUser'}->UserObj->Attributes->Named('Subscription')) {
+ $subscription_for{$attr->SubValue('DashboardId')} = $attr;
+}
+</%INIT>
% if (@$Dashboards == 0) {
- <p><% loc("No dashboards.") %></p>
+% if ($Verbose) {
+ <p><% loc("No dashboards.") %></p>
+% }
% } else {
<table class="collection-as-table">
<tr class="collection-as-table">
@@ -82,19 +103,5 @@
</table>
% }
-
-</&>
-
-<%ARGS>
-$Type => "Personal"
-$Dashboards => undef
-</%ARGS>
-<%INIT>
-# map each subscription to a dashboard ID
-my %subscription_for;
-
-for my $attr ($session{'CurrentUser'}->UserObj->Attributes->Named('Subscription')) {
- $subscription_for{$attr->SubValue('DashboardId')} = $attr;
-}
-</%INIT>
+</%METHOD>
More information about the Rt-commit
mailing list