%# "All flesh is grass" %# -- Isiah %# Smoke a friend today. <& /Work/Elements/104Header, Title => 'My Approvals', Method => 'POST', Action => 'Update.html' &> <& /Work/Tickets/Elements/ShowQueue, QueueObj => $Ticket->QueueObj, TicketObj => $Ticket &> <& /Work/Tickets/Elements/ShowBasics, Ticket => $Ticket, ReadOnly => 1 &>

<& /Work/Tickets/Elements/EditCustomFields, Ticket => $Ticket, ReadOnly => 0, ShowOrAdd => 'Show' &>

<& /Work/Tickets/Elements/ShowHistory, Ticket => $Ticket, Collapsed => $ARGS{'Collapsed'}, ShowHeaders => $ARGS{'ShowHeaders'} &> % if ($Approval->Status eq 'new' or $Approval->Status eq 'open') { <& /Work/Approvals/Elements/Approve, Ticket => $Approval &> % }
<& /Work/Elements/BackButton &> % if ($Approval->Status eq 'new' or $Approval->Status eq 'open') { % }
<%INIT> my $Approval = RT::Ticket->new($session{'CurrentUser'}); unless ($id) { Abort('No ticket specified'); } $Approval = LoadTicket($ARGS{'id'}); unless ($Approval->CurrentUserHasRight('ShowTicket')) { Abort("No permission to view ticket"); } Abort('Not an approval ticket') unless $Approval->Type eq 'approval'; my $Ticket = $Approval->OriginObj or Abort('Root ticket not found'); <%ARGS> $id => undef