aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/around/display_location.html
blob: 7c54f4b7614e2cc51810423d5451296d07cdcd08 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[%

    rss_alt   = loc('RSS feed');
    rss_title = loc('RSS feed of recent local problems');

    rss_url
        = pc
        ? c.uri_for( "/rss/pc", pc )
        : c.uri_for( "/rss/l/$latitude,$longitude" );
            
    email_url = c.uri_for(
        '/alert/list',
        {
            lat  => latitude,
            lon  => longitude,
            feed => "local:$latitude:$longitude",
        }
    );

    url_skip = c.uri_for(
        '/report/new',
        {
            pc         => pc
            latitude   => latitude,
            longitude  => longitude,
            skipped    => 1,
        }
    );

    PROCESS "maps/${map.type}.html" around_page = 1;

    SET bodyclass = 'mappage';
    SET rss = [ tprintf(loc('Recent local problems, %s', "%s is the site name"), site_name), rss_url ];
    INCLUDE 'header.html',
        title  => loc('Viewing a location')
        robots => 'noindex,nofollow';

    allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body);
%]

[% IF allow_creation %]
<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate" novalidate>
    <input type="hidden" name="token" value="[% csrf_token %]">
    [% IF c.req.params.map_override %]
        <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]">
    [% END %]
    <input type="hidden" name="pc" value="[% pc | html %]">

    <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% latitude | html %]">
    <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% longitude | html %]">
[% END %]

    [% map_html %]

        <p id='sub_map_links'>
            [% map_sub_links %]
            [% IF c.req.params.no_pins %]
                <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 0 } ) %]'>[% loc('Show pins') %]</a>
            [% ELSE %]
                <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a>
            [% END %]
            [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %]
                <span class="hidden">|</span>
                [% IF c.req.params.all_pins %]
                    <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide old') %]</a>
                [% ELSE %]
                    <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Show old') %]</a>
                [% END %]
            [% END %]
        </p>

    </div>




    <div id="side">

        [% IF allow_creation %]
            [% INCLUDE 'around/_report_banner.html' %]
            [% TRY %][% INCLUDE 'around/extra_text.html' %][% CATCH file %][% END %]
        [% END %]

        [% INCLUDE 'around/_updates.html' %]

        <section class="full-width">
            [% INCLUDE "around/tabbed_lists.html" %]
        </section>
    </div>

    [% IF allow_creation %]
    <div style="display:none" id="side-form">
    [% INCLUDE "report/new/fill_in_details_form.html"
        js = 1,
        report.used_map = 1
        report.name = c.user.name
    %]
    </div>
    [% END %]

[% IF allow_creation %]
</form>
[% END %]

[% INCLUDE 'footer.html' %]