[Rt-commit] r6529 - in rt/branches/3.7-EXPERIMENTAL: .
html/Ticket/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Sun Nov 26 17:47:04 EST 2006
Author: ruz
Date: Sun Nov 26 17:47:04 2006
New Revision: 6529
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Display.html
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowBasics
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowHistory
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowMessageHeaders
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowMessageStanza
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowRequestor
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Modify.html
Log:
r4186 at cubic-pc: cubic | 2006-11-27 01:50:56 +0300
r3519 at cubic-pc: cubic | 2006-06-30 18:47:14 +0400
* switch to $m->rt_callback interface
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Display.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Display.html (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Display.html Sun Nov 26 17:47:04 2006
@@ -58,7 +58,7 @@
<br />
-<& /Elements/Callback, _CallbackName => 'BeforeShowHistory', Ticket => $TicketObj, %ARGS &>
+% $m->rt_callback( Ticket => $TicketObj, %ARGS, CallbackName => 'BeforeShowHistory' );
<& /Ticket/Elements/ShowHistory ,
Ticket => $TicketObj,
@@ -80,7 +80,7 @@
<%INIT>
-$m->comp('/Elements/Callback', _CallbackName => 'Initial', TicketObj => $TicketObj, ARGSRef => \%ARGS);
+$m->rt_callback( TicketObj => $TicketObj, ARGSRef => \%ARGS, CallbackName => 'Initial' );
my (@Actions, $Tickets);
@@ -149,8 +149,12 @@
delete $session{"Actions"};
}
-$m->comp('/Elements/Callback', _CallbackName => 'BeforeDisplay',
- TicketObj => \$TicketObj, Tickets => \$Tickets, ARGSRef => \%ARGS);
+$m->rt_callback(
+ CallbackName => 'BeforeDisplay',
+ TicketObj => \$TicketObj,
+ Tickets => \$Tickets,
+ ARGSRef => \%ARGS,
+);
my $attachments = $m->comp('Elements/FindAttachments', Ticket => $TicketObj, Tickets => $Tickets);
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowBasics
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowBasics (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowBasics Sun Nov 26 17:47:04 2006
@@ -76,7 +76,7 @@
<td class="label queue"><&|/l&>Queue</&>:</td>
<td class="value queue"><%$Ticket->QueueObj->Name%></td>
</tr>
-<& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $Ticket, %ARGS &>
+% $m->rt_callback( %ARGS, CallbackName => 'EndOfList', TicketObj => $Ticket );
</table>
<%ARGS>
$Ticket => undef
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowHistory
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowHistory (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowHistory Sun Nov 26 17:47:04 2006
@@ -84,12 +84,14 @@
while ( my $Transaction = $Transactions->Next ) {
my $skip = 0;
- $m->comp( '/Elements/Callback',
- _CallbackName => 'SkipTransaction',
- Transaction => $Transaction,
- skip => \$skip,
- %ARGS );
+ $m->rt_callback(
+ %ARGS,
+ Transaction => $Transaction,
+ skip => \$skip,
+ CallbackName => 'SkipTransaction',
+ );
next if $skip;
+
$i++;
my @trans_attachments = grep { $_->TransactionId == $Transaction->Id } @attachments;
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowMessageHeaders
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowMessageHeaders (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowMessageHeaders Sun Nov 26 17:47:04 2006
@@ -61,11 +61,11 @@
my %display_headers = map { lc($_) => 1 } @DisplayHeaders;
-$m->comp( '/Elements/Callback',
- message => $Message,
- headers => \@headers,
- display_headers => \%display_headers,
- );
+$m->rt_callback(
+ message => $Message,
+ headers => \@headers,
+ display_headers => \%display_headers,
+);
unless ( $display_headers{'_all'} ) {
@headers = grep $display_headers{ lc $_->{'Tag'} }, @headers;
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowMessageStanza
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowMessageStanza (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowMessageStanza Sun Nov 26 17:47:04 2006
@@ -70,7 +70,9 @@
my $print_content = sub {
my $ref = shift;
- $m->comp('/Elements/Callback', content => $ref, %ARGS);
+ return unless defined $$ref && length $$ref;
+
+ $m->rt_callback( content => $ref, %ARGS );
$m->comp('/Elements/MakeClicky', content => $ref, ticket => $ticket, %ARGS);
$$ref =~ s{$}{<br />}mg if defined $$ref;
$m->out( $$ref );
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowRequestor
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowRequestor (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowRequestor Sun Nov 26 17:47:04 2006
@@ -63,7 +63,7 @@
&>
%# Additional information about this user. Empty by default.
-<& /Elements/Callback, _CallbackName => 'AboutThisUser', requestor => $requestor, %ARGS &>
+% $m->rt_callback( requestor => $requestor, %ARGS, CallbackName => 'AboutThisUser' );
<&|/l&>Comments about this user</&>:<br />
<b><% ($requestor->Comments || loc("No comment entered about this user")) %></b><br />
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction Sun Nov 26 17:47:04 2006
@@ -52,7 +52,7 @@
</td>
<td class="date"><% $transdate|n %></td>
% my $desc = $Transaction->BriefDescription;
-% $m->comp('/Elements/Callback', _CallbackName => 'ModifyDisplay', text => \$desc, Transaction => $Transaction, %ARGS);
+% $m->rt_callback( text => \$desc, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyDisplay' );
<td class="description">
<%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$desc%>
</td>
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments Sun Nov 26 17:47:04 2006
@@ -46,7 +46,7 @@
<%PERL>
# Find all the attachments which have parent $Parent
# For each of these attachments
-foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) {
+foreach my $message ( grep $_->__Value('Parent') == $Parent, @$Attachments ) {
$m->comp( 'ShowMessageHeaders',
Message => $message,
DisplayHeaders => \@DisplayHeaders,
@@ -146,7 +146,8 @@
# }}}
$m->comp(
- 'ShowTransactionAttachments', %ARGS,
+ $m->current_comp,
+ %ARGS,
Parent => $message->id,
ParentObj => $message
);
@@ -171,14 +172,14 @@
$ParentObj => undef
</%ARGS>
<%INIT>
-my @DisplayHeaders=qw( _all);
+my @DisplayHeaders=qw(_all);
if ( $Transaction->Type =~ /EmailRecord$/ ) {
@DisplayHeaders = qw(To Cc Bcc);
}
# If the transaction has anything attached to it at all
elsif (!$ShowHeaders) {
- @DisplayHeaders = qw(To From RT-Send-Cc Cc Bcc Date Subject);
+ @DisplayHeaders = qw(To From RT-Send-Cc Cc Bcc Date Subject);
}
my $size_to_str = sub {
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs Sun Nov 26 17:47:04 2006
@@ -43,7 +43,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Callback, Ticket => $Ticket, actions=> $actions, tabs => $tabs, %ARGS &>
+% $m->rt_callback( Ticket => $Ticket, actions=> $actions, tabs => $tabs, %ARGS );
<& /Elements/Tabs,
tabs => $tabs,
actions => $actions,
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Modify.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Modify.html (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Modify.html Sun Nov 26 17:47:04 2006
@@ -50,7 +50,7 @@
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="Modify.html" enctype="multipart/form-data">
-<& /Elements/Callback, _CallbackName => 'FormStart', ARGSRef => \%ARGS &>
+% $m->rt_callback( CallbackName => 'FormStart', ARGSRef => \%ARGS );
<input type="hidden" class="hidden" name="id" value="<% $TicketObj->Id %>" />
<&| /Widgets/TitleBox, title => loc('Modify ticket #[_1]',$TicketObj->Id) &>
@@ -66,7 +66,7 @@
my $CustomFields = $TicketObj->QueueObj->TicketCustomFields();
# Now let callbacks have a chance at editing %ARGS
-$m->comp('/Elements/Callback', TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef => \%ARGS);
+$m->rt_callback( TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef => \%ARGS );
my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS);
my @cf_results = ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS);
More information about the Rt-commit
mailing list