I was talking about adding it in the 'Search - Unowned Tickets'.
I tried that :
@Attributes = ( { Name => 'Search - Unowned Tickets', Description =>
'[_1] newest unowned tickets', # loc Content => { Format => "'__id__/TITLE:#', '__Subject__/TITLE:Subject',
QueueName, ExtendedStatus, CreatedRelative, '__loc(Take)__
__loc(Delete)__
/TITLE: ' ", Query => " Owner = 'Nobody' AND ( Status = 'new' OR Status =
'open')", OrderBy => 'Created', Order => 'DESC' }, },);
...but when I click on "Delete", it redirects me to the page displaying the
deleted ticket, instead of staying in the 'Search - Unowned Tickets'.
From: michael.st...@livetext.com
Date: Wed, 20 Jun 2012 19:47:11 -0500
Subject: Re: [rt-users] Add a "Delete" link next to the "Take" link
To: arthur_ra...@hotmail.com
If you're talking about adding it to Display.html, I used the following for RT
3.8 to add stalled and deleted buttons.
path/to/rt3/local/html/Callbacks/yourdir/Ticket/Elements/Tabs/Default
<%init>
if ($Ticket) {
#if ($Ticket->CurrentUserHasRight('ModifyTicket') && ($Ticket->Status ne
'stalled')) {
#$actions->{'stall'} = {
#title => loc('Stall'),
#path =>
'Ticket/Update.html?Action=Comment&DefaultStatus=stalled&id='.$Ticket->id,
#};
#}
if ($Ticket->CurrentUserHasRight('DeleteTicket') && ($Ticket->Status ne
'deleted')) {
$actions->{'delete'} = {
title => loc('Delete'),
path => 'Ticket/Display.html?Status=deleted&id='.$Ticket->id,
};
}
}
<%args>
$Ticket => undef
$tabs => undef
$actions => undef
On Tue, Jun 19, 2012 at 10:21 AM, Arthur Rance wrote:
Hello,
I'd like to add a "Delete" link (to delete a ticket) next to the "Take" link.
How would you do that ?