~ubuntu-branches/ubuntu/intrepid/bugzilla/intrepid

« back to all changes in this revision

Viewing changes to template/en/default/bug/time.html.tmpl

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Bossek
  • Date: 2008-06-27 22:34:34 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080627223434-0ib57vstn43bb4a3
Tags: 3.0.4.1-1
* Update of French, Russian and German translations. (closes: #488251)
* Added Bulgarian and Belarusian translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
[%# 1.0@bugzilla.org %]
2
 
[%# The contents of this file are subject to the Mozilla Public
3
 
  # License Version 1.1 (the "License"); you may not use this file
4
 
  # except in compliance with the License. You may obtain a copy of
5
 
  # the License at http://www.mozilla.org/MPL/
6
 
  #
7
 
  # Software distributed under the License is distributed on an "AS
8
 
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
 
  # implied. See the License for the specific language governing
10
 
  # rights and limitations under the License.
11
 
  #
12
 
  # The Original Code is the Bugzilla Bug Tracking System.
13
 
  #
14
 
  # The Initial Developer of the Original Code is Netscape Communications
15
 
  # Corporation. Portions created by Netscape are
16
 
  # Copyright (C) 1998 Netscape Communications Corporation. All
17
 
  # Rights Reserved.
18
 
  #
19
 
  # Contributor(s): Jeff Hedlund <jeff.hedlund@matrixsi.com>
20
 
  #
21
 
  #%]
22
 
                                      
23
 
[% BLOCK formattimeunit %]
24
 
  [%# INTERFACE:
25
 
    # time_unit:  the number converting, converts to 2 decimal places
26
 
    #             unless the last character is a 0, then it truncates to 
27
 
    #             1 decimal place
28
 
    #%]
29
 
  [% time_unit = time_unit FILTER format('%.2f') %]
30
 
  [% IF time_unit.match('0\Z') %]
31
 
    [% time_unit FILTER format('%.1f') %]
32
 
  [% ELSE %]
33
 
    [% time_unit FILTER format('%.2f') %]
34
 
  [% END %]
35
 
[% END %]
36
 
 
37
 
[% BLOCK calculatepercentage %]
38
 
  [%# INTERFACE:
39
 
    # act:   actual time  
40
 
    # rem:   remaining time
41
 
    # %]
42
 
  [% IF (act + rem) > 0 %]
43
 
    [% (act / (act + rem)) * 100 
44
 
       FILTER format("%d") %]
45
 
  [% ELSE %]
46
 
    0
47
 
  [% END %]
48
 
[% END %]