aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/my/my.html
blob: 4d5fed1cd23530a587184c836c2a90f5c3058b9f (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[%
    SET bodyclass = 'mappage';
    PROCESS "maps/${map.type}.html" IF problems.size;
    INCLUDE 'header.html', title = loc('Your Reports')
%]

[% IF problems.size %]
    [% map_html %]
    </div>
    <div id="map_sidebar">
        <div id="side">
[% ELSE %]
    <div id="map_sidebar">
        <div id="skipped-map">
[% END %]

<h1>[% loc('Your account') %]</h1>

<p>[% c.user.name %] [% c.user.email %]</p>

<p class="my-account-buttons">
  <a href="/auth/change_password">[% loc('Change password') %]</a>
  <a href="/auth/sign_out">[% loc('Sign out') %]</a>
</p>

<h2>[% loc('Your reports') %]</h2>

[% IF ! has_content %]
[% tprintf( loc('You haven&rsquo;t created any reports yet.  <a href="%s">Report a problem now.</a>'),
    c.uri_for('/') ) %]
[% END %]

[% IF c.cobrand.moniker == 'hart' %]
    [% INCLUDE '_hart_hants_note.html' %]
[% END %]

[% INCLUDE "reports/_list-filters.html", use_section_wrapper = 1 %]

[% INCLUDE 'pagination.html',
    pager = problems_pager,
    param = 'p'
%]

[% INCLUDE 'my/_problem-list.html' %]

[% FOREACH u IN updates %]
    [% IF loop.first %]
        <h2>[% loc('Your updates') %]</h2>
        [% INCLUDE 'pagination.html',
            pager = updates_pager,
            param = 'u'
        %]
        <ul class="item-list item-list--updates full-width">
    [% END %]

    <li class="item-list__item item-list__item--updates">
        <div class="item-list__update-wrap">
            [% INCLUDE 'report/photo.html' object=u %]
            <div class="item-list__update-text">
                [% add_links( u.text ) | html_para %]

                <p class="meta-2">
                    [% tprintf( loc("Added %s"), prettify_dt( u.confirmed, 'date' ) ) %]
                    &ndash;
                    <a href="[% c.uri_for( '/report', u.problem_id ) %]#update_[% u.id %]">
                        [% u.problem.title | html %]
                    </a>
                </p>
            </div>
        </div>
    </li>
    [% "</ul>" IF loop.last %]
[% END %]

        </div>
    </div>

[% INCLUDE 'footer.html' %]