[rt-users] Is it possible to delete 'reply' button?

Hajime Takase takase at axlbit.net
Tue Mar 4 01:29:36 EST 2014


Maciej,

Thank you!

2014-03-01 2:44 GMT+09:00 Maciej Dobrzanski <reg.bestpractical at posterus.com>
:

> Hajime,
>
> > Is it possible to not show 'reply' button when the $TransactionObj->Type
> is 'Comment'?
> Of course it is possible. In 4.0 you can use ModifyCommand callback from
> /Ticket/Elements/ShowTransaction to modify the list of transaction
> actions. In this callback you will be able to remove the 'Reply' link using
> a regular expression, for example:
>
> <%INIT>
> return unless $TransactionObj->Type eq 'Comment';
>
> $$titlebar_cmd =~ s/\[.*?Action=Respond.*?\]//;
> </%INIT>
> <%ARGS>
> $TransactionObj => undef
> $titlebar_cmd => undef
> </%ARGS>
>
> This won't work with 4.2 though, because ModifyCommand has been removed
> and ShowTransaction changed location. You will have to use Default callback
> from /Elements/ShowTransaction instead. The callback provides access to
> @Actions - an array of hashes representing various actions. Removing the
> link will be a matter of looping over the array and removing the right
> element (e.g. where class field will be equal to 'reply-link').
>
> Maciek
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140304/584b8d65/attachment.htm>


More information about the rt-users mailing list