aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/hounslow/front/stats.html
blob: 23d0355513f08a715ff236c9c91c188accb6dafb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[% USE Number.Format %]

[%
    stats = c.cobrand.front_stats_data();

    new_text =
        stats.recency == '1 week'
        ? nget(
            "<big>%s</big> report in past week",
            "<big>%s</big> reports in past week",
            stats.new
          )
        : nget(
            "<big>%s</big> report recently",
            "<big>%s</big> reports recently",
            stats.new
         );

    completed_text = nget(
        "<big>%s</big> completed in past month",
        "<big>%s</big> completed in past month",
        stats.completed
    );

    updates_text = nget(
        "<big>%s</big> update on reports",
        "<big>%s</big> updates on reports",
        stats.updates
    );

    new_n = stats.new | format_number;
    completed_n = stats.completed | format_number;
    updates_n = stats.updates | format_number;
%]

<div id="front_stats">
    <div>[% tprintf( new_text, decode(new_n) ) %]</div>
    <div>[% tprintf( completed_text, decode(completed_n) ) %]</div>
    <div>[% tprintf( updates_text, decode(updates_n) ) %]</div>
</div>