[Rt-commit] r3598 - in rt/branches/QUEBEC-EXPERIMENTAL: . html/Ticket/Elements

alexmv at bestpractical.com alexmv at bestpractical.com
Wed Aug 3 18:39:17 EDT 2005


Author: alexmv
Date: Wed Aug  3 18:39:17 2005
New Revision: 3598

Added:
   rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowTime
Modified:
   rt/branches/QUEBEC-EXPERIMENTAL/   (props changed)
   rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowBasics
Log:
 r5629 at zoq-fot-pik:  chmrr | 2005-08-03 18:37:50 -0400
  * Show time in hours or days when needed


Modified: rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowBasics
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowBasics	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowBasics	Wed Aug  3 18:39:17 2005
@@ -55,18 +55,18 @@
 % if ($Ticket->TimeEstimated) {
   <tr>
     <td class="label"><&|/l&>Estimated</&>:</td>
-    <td class="value"><&|/l, $Ticket->TimeEstimated &>[_1] min</&></td>
+    <td class="value"><& ShowTime, minutes => $Ticket->TimeEstimated &></td>
   </tr>
 % }
 % if ($Ticket->TimeWorked) {
   <tr>
     <td class="label"><&|/l&>Worked</&>:</td>
-    <td class="value"><&|/l, $Ticket->TimeWorked &>[_1] min</&></td>
+    <td class="value"><& ShowTime, minutes => $Ticket->TimeWorked &></td>
   </tr>
 % }
   <tr>
     <td class="label"><&|/l&>Left</&>:</td>
-    <td class="value"><&|/l, $Ticket->TimeLeft &>[_1] min</&></td>
+    <td class="value"><& ShowTime, minutes => $Ticket->TimeLeft &></td>
   </tr>
   <tr>
     <td class="label"><&|/l&>Priority</&>:</td>

Added: rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowTime
==============================================================================
--- (empty file)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowTime	Wed Aug  3 18:39:17 2005
@@ -0,0 +1,10 @@
+% if ($minutes < 60) {
+<&|/l, $minutes &>[_1] min</&>
+% } elsif ($minutes < 60 * 24) {
+<&|/l, sprintf("%.1f",$minutes / 60) &>[quant,_1,hour]</&> (<&|/l, $minutes &>[_1] min</&>)
+% } else {
+<&|/l, sprintf("%.1f",$minutes / 60 / 24) &>[quant,_1,day]</&> (<&|/l, $minutes &>[_1] min</&>)
+% }
+<%ARGS>
+$minutes
+</%ARGS>
\ No newline at end of file


More information about the Rt-commit mailing list