aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/main_nav_items.html
blob: 6b5e09e56f536ecb2f7ab3a0e33d82a2cffd37c3 (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
[%~ INCLUDE navitem uri='/' label=loc('Report a problem') attrs='class="report-a-problem-btn"' ~%]

[%~ IF c.user_exists ~%]
    [%~ INCLUDE navitem uri='/my' label=loc('Your account') ~%]
[%~ ELSE ~%]
    [%~ INCLUDE navitem uri='/auth' label=loc('Sign in') ~%]
[%~ END ~%]

[%~ IF c.user_exists AND c.user.has_body_permission_to('planned_reports') ~%]
    [%~ INCLUDE navitem uri='/my/planned' label=loc('Shortlist') ~%]
[%~ END ~%]


[%~ UNLESS hide_all_reports_link ~%]
  [%~
    IF c.user_exists AND c.user.categories.size;
      categories = c.user.categories.join(",") | uri;
      cat_suffix = "?filter_category=" _ categories;
    END;

    reports_uri = '/reports';
    IF body_name;
       body_name = body_name | uri;
       reports_uri = "${reports_uri}/${body_name}";
    END;

    INCLUDE navitem uri=reports_uri label=loc('All reports') suffix=cat_suffix;
  ~%]
[%~ END ~%]

[%~
  IF pc;
    pc_uri = pc | uri;
    pc_suffix = "/list?pc=" _ pc_uri;
  END;

  INCLUDE navitem uri='/alert' label=loc('Local alerts') suffix=pc_suffix;
~%]

[%~ INCLUDE navitem uri='/faq' label=loc('Help') ~%]

[%~ UNLESS hide_privacy_link ~%]
  [%~ INCLUDE navitem uri='/privacy' label=loc('Privacy') liattrs='class="nav-menu__item--privacy"' ~%]
[%~ END ~%]

[%~ IF c.user_exists AND c.cobrand.admin_allow_user(c.user) ~%]
  [%~ INCLUDE navitem uri='/admin' label=loc('Admin') ~%]
[%~ END ~%]