aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/zurich/admin/problem_row.html
blob: 502a7bc39a970ecad4edcbbef5155861d49cd41e (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
46
47
48
49
50
51
52
[%- 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.get_or_check_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_display %]</td>
        <td>[% PROCESS format_date this_date=problem.created %]</td>
        <td>[% PROCESS format_date this_date=problem.lastupdate %]</td>
        <td>[% prettify_state(problem.state) %]
            [% IF problem.state == 'feedback pending';
            SET cs=problem.get_extra_metadata('closure_status');
            IF cs %] ([% prettify_state(cs) %]) [% END; END %]</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 %]
            [% FOR photo IN problem.photos %]
            <div class="update-img">
                <img height="60" width="90" alt="" src="[% c.cobrand.base_url %][% photo.url_temp %]">
            </div>
            [% END %]
        [% END %]
        </td>

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