[Rt-commit] r8362 - in rt/branches/3.7-EXPERIMENTAL-TUNIS: .

thayes at bestpractical.com thayes at bestpractical.com
Wed Aug 1 15:28:11 EDT 2007


Author: thayes
Date: Wed Aug  1 15:28:10 2007
New Revision: 8362

Modified:
   rt/branches/3.7-EXPERIMENTAL-TUNIS/   (props changed)
   rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Elements/ShowLock

Log:
 r8535 at toth:  toth | 2007-08-01 15:27:53 -0400
 * The lock status message now doesn't display time locked for times less than 5 seconds, so that we don't get the somewhat undesirable "You have had this ticket locked for 0 seconds" (< 5 seconds because occasionally, when creating a lock, it will take a little time to render, giving a "You have had this ticket locked for 1 second")
 


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	Wed Aug  1 15:28:10 2007
@@ -2,11 +2,18 @@
 <div class="locked-by-you">
 % if(defined $Duration && !$Lock) {
 	<&|/l, $ago &>You had this ticket locked for [_1]. It is now unlocked</&>.
-% } else {
+% #Do not display time if it is very little time, since such a short time probably 
+% #means the lock was just created.
+% } elsif($ago < 5) {	
+		<&|/l &>You have locked this ticket</&>.
+%	if($Unlock) {
+		[<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->id%>&Lock=remove"><&|/l&>Unlock</&></a>]
+%	}
+% }	else {
 	<&|/l, $ago &>You have had this ticket locked for [_1]</&>.
-% 		if($Unlock) {
-			[<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->id%>&Lock=remove"><&|/l&>Unlock</&></a>]
-%		}
+% 	if($Unlock) {
+		[<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->id%>&Lock=remove"><&|/l&>Unlock</&></a>]
+%	}
 % }
 
 </div>


More information about the Rt-commit mailing list