<&|/Widgets/TitleBox,
    title => loc("Reminders due in 2 weeks") &>
<table width="100%">
% my $i =0;
% while (my $reminder = $reminders->Next) {
% $i++;
% if ($reminder->RefersTo->First) {
% my $ticket= $reminder->RefersTo->First->TargetObj;
<tr class="<%$i%2 ? 'evenline' : 'oddline'%>"><td><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$ticket->id%>"><%$reminder->Subject%></a><br />
<blockquote>
#<%$ticket->id%>: <%$ticket->Subject%><br />
<%$reminder->OwnerObj->Name %>  <%$reminder->DueObj->Unix >0 ? '&bull; '.$reminder->DueObj->AgeAsString : '' |n %>
</blockquote>
</td>
</tr>
% }}
</table>
</&>

<%init>
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") AND Due > "1970-01-01" and Due < "2 weeks"'); 
$reminders->OrderBy(FIELD => 'Due', ORDER => 'ASC');
</%init>
