[Rt-commit] r8578 - in rt/branches/3.7-EXPERIMENTAL-TUNIS: .
html/Ticket/Elements
thayes at bestpractical.com
thayes at bestpractical.com
Thu Aug 16 13:08:12 EDT 2007
Author: thayes
Date: Thu Aug 16 13:08:11 2007
New Revision: 8578
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/ (props changed)
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Display.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Elements/Tabs
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Forward.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/History.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Modify.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyAll.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyDates.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyLinks.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyPeople.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Reminders.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Update.html
Log:
r8739 at toth: toth | 2007-08-15 18:45:09 -0400
* Modified various files to use callbacks for the TicketLocking extension
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Display.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Display.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Display.html Thu Aug 16 13:08:11 2007
@@ -52,8 +52,7 @@
current_tab => 'Ticket/Display.html?id='.$TicketObj->id,
Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &>
-% $Duration ||= $ARGS{'Duration'};
-<& /Elements/ShowLock, Ticket => $TicketObj, Duration => $Duration &>
+% $m->callback(CallbackName => 'ShowLock', %ARGS, Ticket => $TicketObj);
<& /Elements/ListActions, actions => \@Actions &>
<& Elements/ShowUpdateStatus, Ticket => $TicketObj &>
@@ -91,8 +90,6 @@
$m->callback( TicketObj => $TicketObj, ARGSRef => \%ARGS, CallbackName => 'Initial' );
my (@Actions, $Tickets);
-my $Duration;
-my $time;
unless ($id || $TicketObj) {
Abort('No ticket specified');
@@ -132,6 +129,12 @@
push(@Actions, $msg);
}
}
+
+ $m->callback(CallbackName => 'ProcessLockArgument',
+ Ticket => $TicketObj,
+ ARGSref => \%ARGS,
+ Actions => \@Actions);
+
# if ( defined $ARGS{'Lock'} ) {
# if ( $ARGS{'Lock'} eq 'add' ) {
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Elements/Tabs
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Elements/Tabs (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Elements/Tabs Thu Aug 16 13:08:11 2007
@@ -60,7 +60,7 @@
my $actions;
if ( $Ticket) {
-
+
my $id = $Ticket->id();
if ( defined $session{'tickets'} ) {
@@ -72,7 +72,7 @@
if ($updatesession) {
$session{'i'}++;
- $session{'tickets'}->PrepForSerialization();
+ $session{'tickets'}->PrepForSerialization();
}
# Don't display prev links if we're on the first ticket
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Forward.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Forward.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Forward.html Thu Aug 16 13:08:11 2007
@@ -51,7 +51,7 @@
Title => $Title,
&>
-<& /Elements/ShowLock, Ticket => $TicketObj, Unlock => 0 &>
+% $m->callback(CallbackName => 'ShowLock', Ticket => $TicketObj);
<& /Elements/ListActions, actions => \@results &>
<form action="Forward.html" name="ForwardMessage" method="post">
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/History.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/History.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/History.html Thu Aug 16 13:08:11 2007
@@ -50,7 +50,7 @@
Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id,
Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
-<& /Elements/ShowLock, Ticket => $Ticket, Unlock => 0 &>
+% $m->callback(CallbackName => 'ShowLock', Ticket => $Ticket);
<br />
@@ -74,7 +74,7 @@
my $Ticket = LoadTicket ($id);
unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
- Abort("No permission to view ticket");
+ Abort("No permission to view ticket");
}
my $attachments = $m->comp('Elements/FindAttachments', Ticket => $Ticket);
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Modify.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Modify.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Modify.html Thu Aug 16 13:08:11 2007
@@ -50,7 +50,8 @@
Ticket => $TicketObj, current_subtab => "Ticket/Modify.html?id=".$TicketObj->Id,
Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
-<& /Elements/ShowLock, Ticket => $TicketObj, Unlock => 0 &>
+% $m->callback(CallbackName => 'ShowLock', Ticket => $TicketObj);
+
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="Modify.html" enctype="multipart/form-data">
% $m->callback( CallbackName => 'FormStart', ARGSRef => \%ARGS );
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyAll.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyAll.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyAll.html Thu Aug 16 13:08:11 2007
@@ -51,7 +51,7 @@
current_tab => "Ticket/ModifyAll.html?id=".$Ticket->Id,
Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &>
-<& /Elements/ShowLock, Ticket => $Ticket, Unlock => 0 &>
+% $m->callback(CallbackName => 'ShowLock', Ticket => $Ticket);
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="ModifyAll.html" enctype="multipart/form-data">
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyDates.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyDates.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyDates.html Thu Aug 16 13:08:11 2007
@@ -51,7 +51,7 @@
current_tab => "Ticket/ModifyDates.html?id=".$TicketObj->Id,
Title => loc('Modify dates for #[_1]', $TicketObj->Id) &>
-<& /Elements/ShowLock, Ticket => $TicketObj, Unlock => 0 &>
+% $m->callback(CallbackName => 'ShowLock', Ticket => $TicketObj);
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="ModifyDates.html">
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyLinks.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyLinks.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyLinks.html Thu Aug 16 13:08:11 2007
@@ -51,7 +51,7 @@
current_tab => "Ticket/ModifyLinks.html?id=".$Ticket->Id,
Title => loc("Link ticket #[_1]", $Ticket->Id) &>
-<& /Elements/ShowLock, Ticket => $Ticket, Unlock => 0 &>
+% $m->callback(CallbackName => 'ShowLock', Ticket => $Ticket);
<& /Elements/ListActions, actions => \@results &>
<form action="ModifyLinks.html" method="post">
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyPeople.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyPeople.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/ModifyPeople.html Thu Aug 16 13:08:11 2007
@@ -51,7 +51,7 @@
current_tab => "Ticket/ModifyPeople.html?id=".$Ticket->Id,
Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &>
-<& /Elements/ShowLock, Ticket => $Ticket, Unlock => 0 &>
+% $m->callback(CallbackName => 'ShowLock', Ticket => $Ticket);
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="ModifyPeople.html">
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Reminders.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Reminders.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Reminders.html Thu Aug 16 13:08:11 2007
@@ -51,7 +51,7 @@
current_tab => "Ticket/Reminders.html?id=".$Ticket->Id,
Title => loc("Reminders for ticket #[_1]", $Ticket->Id) &>
-<& /Elements/ShowLock, Ticket => $Ticket, Unlock => 0 &>
+% $m->callback(CallbackName => 'ShowLock', Ticket => $Ticket);
<form action="<%RT->Config->Get('WebPath')%>/Ticket/Reminders.html" method="post">
<&|/Widgets/TitleBox, title => loc("Reminders"),
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Update.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Update.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Update.html Thu Aug 16 13:08:11 2007
@@ -50,7 +50,7 @@
Ticket => $TicketObj,
Title=> $title &>
-<& /Elements/ShowLock, Ticket => $TicketObj, Unlock => 0 &>
+% $m->callback(CallbackName => 'ShowLock', Ticket => $TicketObj);
<form action="Update.html" name="TicketUpdate"
method="post" enctype="multipart/form-data">
@@ -200,14 +200,14 @@
# {{{ deal with deleting uploaded attachments
foreach my $key (keys %ARGS) {
if ($key =~ m/^DeleteAttach-(.+)$/) {
- delete $session{'Attachments'}{$1};
+ delete $session{'Attachments'}{$1};
}
$session{'Attachments'} = { %{$session{'Attachments'} || {}} };
}
# }}}
# {{{ store the uploaded attachment in session
-if ($ARGS{'Attach'}) { # attachment?
+if ($ARGS{'Attach'}) { # attachment?
$session{'Attachments'} = {} unless defined $session{'Attachments'};
my $subject = "$ARGS{'Attach'}";
@@ -223,7 +223,7 @@
);
$session{'Attachments'} = { %{$session{'Attachments'} || {}},
- $ARGS{'Attach'} => $attachment };
+ $ARGS{'Attach'} => $attachment };
}
# }}}
More information about the Rt-commit
mailing list