[Rt-commit] r8299 - in rt/branches/3.7-EXPERIMENTAL-TUNIS: .
html/Ticket
thayes at bestpractical.com
thayes at bestpractical.com
Thu Jul 26 11:08:12 EDT 2007
Author: thayes
Date: Thu Jul 26 11:08:12 2007
New Revision: 8299
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/ (props changed)
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Elements/ShowLock
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Display.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Update.html
Log:
r8450 at toth: toth | 2007-07-26 11:07:58 -0400
* Fixed stylistic issues
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Elements/ShowLock
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Elements/ShowLock (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Elements/ShowLock Thu Jul 26 11:08:12 2007
@@ -1,10 +1,10 @@
-% if ($duration ||($u->id && $u->id == $session{'CurrentUser'}->id)) {
+% if ($Duration ||($u->id && $u->id == $session{'CurrentUser'}->id)) {
<div class="locked-by-you">
-% if(defined $duration) {
+% if(defined $Duration) {
<&|/l, $ago &>You had this ticket locked for [_1]. It is now unlocked</&>.
% } else {
<&|/l, $ago &>You have had this ticket locked for [_1]</&>.
-% unless($ARGS{'noUnlock'}) {
+% if($Unlock) {
[<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->id%>&Lock=remove"><&|/l&>Unlock</&></a>]
% }
% }
@@ -17,15 +17,15 @@
%}
<%init>
my $Lock;
-return unless defined $duration || ($Lock = $Ticket->Locked());
+return unless defined $Duration || ($Lock = $Ticket->Locked());
my $u = RT::User->new($session{'CurrentUser'});
$u->Load($Lock->Content->{'User'}) if $Lock;
my $date = RT::Date->new($session{'CurrentUser'});
my $ago;
-if(defined $duration) {
- $ago = $date->DurationAsString($duration);
+if(defined $Duration) {
+ $ago = $date->DurationAsString($Duration);
} elsif($Lock) {
$ago = $date->DurationAsString(time() - $Lock->Content->{'Timestamp'});
} else {
@@ -34,5 +34,6 @@
</%init>
<%args>
$Ticket
-$duration => undef
+$Duration => undef
+$Unlock => 1;
</%args>
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 Jul 26 11:08:12 2007
@@ -52,8 +52,8 @@
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 &>
+% $Duration ||= $ARGS{'Duration'};
+<& /Elements/ShowLock, Ticket => $TicketObj, Duration => $Duration &>
<& /Elements/ListActions, actions => \@Actions &>
<& Elements/ShowUpdateStatus, Ticket => $TicketObj &>
@@ -91,7 +91,7 @@
$m->callback( TicketObj => $TicketObj, ARGSRef => \%ARGS, CallbackName => 'Initial' );
my (@Actions, $Tickets);
-my $duration;
+my $Duration;
unless ($id || $TicketObj) {
Abort('No ticket specified');
@@ -153,12 +153,11 @@
}
} elsif ( $ARGS{'Lock'} eq 'remove' ) {
my $lock = $TicketObj->Locked();
- if ( !$lock ) {
+ unless($lock) {
push @Actions, loc('This ticket was not locked');
-
} elsif ( $lock->Content->{'User'} == $session{'CurrentUser'}->id ) {
- $duration = time() - $lock->Content->{'Timestamp'};
- $duration = time() - $lock->Content->{'Timestamp'};
+ $Duration = time() - $lock->Content->{'Timestamp'};
+ $Duration = time() - $lock->Content->{'Timestamp'};
$TicketObj->Unlock();
push @Actions, loc('You have unlocked this ticket');
} else {
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 Jul 26 11:08:12 2007
@@ -50,7 +50,7 @@
Ticket => $TicketObj,
Title=> $title &>
-<& /Elements/ShowLock, Ticket => $TicketObj, noUnlock => 1 &>
+<& /Elements/ShowLock, Ticket => $TicketObj, Unlock => 0 &>
<form action="Update.html" name="TicketUpdate"
method="post" enctype="multipart/form-data">
More information about the Rt-commit
mailing list