[rt-users] Add a "Delete" link next to the "Take" link

Arthur Rance arthur_rance at hotmail.com
Thu Jun 21 04:16:49 EDT 2012


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 => "'<a href=\"__WebPath__/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#', '<a href=\"__WebPath__/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject', QueueName, ExtendedStatus, CreatedRelative, '<A HREF=\"__WebPath__/Ticket/Display.html?Action=Take&id=__id__\">__loc(Take)__</a> <A HREF=\"__WebPath__/Ticket/Display.html?Status=deleted&id=__id__\">__loc(Delete)__</a> /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.steen at 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_rance at 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,
        };
    }
}

</%init>

<%args>
$Ticket => undef
$tabs => undef
$actions => undef
</%args>

On Tue, Jun 19, 2012 at 10:21 AM, Arthur Rance <arthur_rance at hotmail.com> wrote:






Hello,
I'd like to add a "Delete" link (to delete a ticket) next to the "Take" link. How would you do that ?



 		 	   		  

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120621/1b32ec25/attachment.htm>


More information about the rt-users mailing list