[Rt-commit] r6563 - in rt/branches/3.6-RELEASE: .
jesse at bestpractical.com
jesse at bestpractical.com
Fri Dec 1 13:54:14 EST 2006
Author: jesse
Date: Fri Dec 1 13:54:14 2006
New Revision: 6563
Modified:
rt/branches/3.6-RELEASE/ (props changed)
rt/branches/3.6-RELEASE/html/Prefs/MyRT.html
Log:
r45287 at pinglin (orig r6497): clkao | 2006-11-22 06:33:42 -0500
Allow resetting myrt.
Modified: rt/branches/3.6-RELEASE/html/Prefs/MyRT.html
==============================================================================
--- rt/branches/3.6-RELEASE/html/Prefs/MyRT.html (original)
+++ rt/branches/3.6-RELEASE/html/Prefs/MyRT.html Fri Dec 1 13:54:14 2006
@@ -54,6 +54,14 @@
<& /Elements/ListActions, actions => \@actions &>
<br />
+
+<form method="post" action="MyRT.html">
+<input type="hidden" name="Reset" value="1" />
+<input type="submit" class="button" value="<%loc('Reset to default')%>"
+</form>
+
+<br />
+
% for my $pane (@panes) {
<&|/Widgets/TitleBox, title => loc('RT at a glance').': '.loc($pane->{Name}), bodyclass => "" &>
<& /Widgets/SelectionBox:show, self => $pane, nojs => 1 &></&>
@@ -70,11 +78,14 @@
my $title = loc("Customize").' '.loc("RT at a glance");
my $user = $session{'CurrentUser'}->UserObj;
+if ($ARGS{Reset}) {
+ $user->SetPreferences('HomepageSettings', {});
+ delete $session{'my_rt_portlets'};
+}
+
unless (exists $session{'my_rt_portlets'}) {
- my $portlets;
-
my ($default_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
- $portlets = $default_portlets ? $default_portlets->Content : {};
+ my $portlets = $default_portlets ? $default_portlets->Content : {};
$session{'my_rt_portlets'} = $user->Preferences('HomepageSettings', $portlets);
}
if ($ARGS{SummaryRows}) {
More information about the Rt-commit
mailing list