aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/zurich/admin/problem_row.html
blob: 71b64839a5138df27bac6521e04c2c9f044ba374 (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
41
42
43
44
45
[%- FOR problem IN problems %]
    [% SET p_body = problem.bodies.values.0 %]
    <tr[%
        SET classes = [];
        classes.push('adminhidden') IF problem.state == 'hidden';
        classes.push('overdue') IF c.cobrand.overdue( problem );
        classes.push('row-link') IF NOT no_edit;
        ' class="' _ classes.join(' ') _ '"' IF classes.size;
    %]>
        <td class="record-id">
          [% IF no_edit AND problem.is_visible %]
            <a href="[% c.uri_for_email( '/report', problem.id ) %]">[% problem.id %]</a>
          [% ELSE %]
            [% problem.id %]
          [% END %]
        </td>
        <td>[% PROCESS value_or_nbsp value=problem.title %]</td>
        <td>[% PROCESS value_or_nbsp value=problem.category %]</td>
        <td>[% PROCESS format_date this_date=problem.created %]</td>
        <td>[% PROCESS format_date this_date=problem.lastupdate %]</td>
        <td>[% states.${problem.state} %]</td>

        [% IF include_subdiv %]
            <td>
                [%- IF p_body.parent.parent.id -%][%# ...it's a subdivision %]
                    [% PROCESS value_or_nbsp value=p_body.name %]
                [%- ELSIF problem.external_body %]
                    [% PROCESS value_or_nbsp value=problem.body(c).name %]
                [%- ELSE -%]
                    &nbsp;
                [%- END -%]
            </td>
        [% END %]

        <td>
        [% IF problem.photo %]
            <img class="img" height="60" width="90" src="[% c.cobrand.base_url %]/photo/[% problem.photo %].temp.jpeg" alt="">
        [% END %]
        </td>

        [% IF NOT no_edit %]
            <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td>
        [% END %]
    </tr>
[%- END -%]