rt 4.2.13 ticket#13852
[freeside.git] / rt / share / html / Elements / MyReminders
index 83c9454..f5fb7e8 100755 (executable)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-%# DEPRECATED
 <&|/Widgets/TitleBox,
     class => 'reminders',
-    title => loc("Reminders") &>
-<table width="100%">
-% my $i =0;
-% while (my $reminder = $reminders->Next) {
-% $i++;
-% if ($reminder->RefersTo->First) {
-% my $ticket= $reminder->RefersTo->First->TargetObj;
-% if ( $ticket ) {
-<tr class="<%$i%2 ? 'evenline' : 'oddline'%>"><td><a href="<%RT->Config->Get('WebPath')%>/Ticket/Display.html?id=<%$ticket->id%>"><%$reminder->Subject%></a><br />
-<blockquote>
-#<%$ticket->id%>: <%$ticket->Subject%><br />
-<& /Elements/ShowUser, User => $reminder->OwnerObj &>  <%$reminder->DueObj->Unix >0 ? '&bull; '.$reminder->DueObj->AgeAsString : '' |n %>
-</blockquote>
-</td>
-</tr>
-% }
-% else {
-    <div class="error"><div class="error">
-Couldn't find TargetObj for reminder <% $reminder->id %>.<br/>
-Maybe Organization config was changed? Please contact administrator.
-    </div></div>
-% }}}
-</table>
+    title => loc("My reminders"),
+    title_href => RT->Config->Get('WebPath') . '/Tools/MyReminders.html' &>
+
+<& /Elements/ShowReminders &>
+
 </&>
 
 <%init>
 return unless RT->Config->Get('EnableReminders');
-my $reminders = RT::Tickets->new($session{'CurrentUser'});
-$reminders->FromSQL('(Owner = "Nobody" OR Owner = "'.$session{'CurrentUser'}->Name.'")' .
-    ' AND Type = "reminder" AND (Status = "new" OR Status = "open")'); 
-$reminders->OrderBy(FIELD => 'Due', ORDER => 'ASC');
 </%init>