-
Notifications
You must be signed in to change notification settings - Fork 18
/
navigation.twig
87 lines (85 loc) · 3.78 KB
/
navigation.twig
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
<ul class="{% if not account %}sp-nav{% else %}sp-text-end{% endif %} sp-ps-0">
{% if not account %}
<li>
<a href="{{ route('core.frontend.home') }}" {% if route starts with 'core.frontend.home' %}class="current"{% endif %}>
{{ Lang.get('general.home') }}
</a>
</li>
{% endif %}
{% if auth_check() %}
<li>
<a href="{{ route('user.profile') }}" {% if route starts with 'user.profile' %}class="current"{% endif %}>
{{ Lang.choice('general.account', 1) }}
</a>
</li>
{% if auth_user().password is not empty and not auth_user().loggedInViaSSO() %}
<li>
<a href="{{ route('user.change_password') }}" {% if route starts with 'user.change_password' %}class="current"{% endif %}>
{{ Lang.get('user.change_password') }}
</a>
</li>
{% if not auth_user().twofa_enabled or not Config.get('settings.force_2fa_users') %}
<li>
<a href="{{ route('user.twofa') }}" {% if route starts with 'user.twofa' %}class="current"{% endif %}>
{{ Lang.get('user.two_fa') }}
</a>
</li>
{% endif %}
{% endif %}
{% if not socialite_providers.isEmpty() %}
<li>
<a href="{{ route('user.linked_account') }}" {% if route starts with 'user.linked_account' %}class="current"{% endif %}>
{{ Lang.get('user.linked_accounts') }}
</a>
</li>
{% endif %}
{% if auth_user().email_verified %}
<li>
<a href="{{ route('user.email_history') }}" {% if route starts with 'user.email_history' %}class="current"{% endif %}>
{{ Lang.get('user.email_history') }}
</a>
</li>
{% endif %}
{% if Config.get('settings.organisations_enabled') and auth_user().organisation_id is not null and auth_user().organisation_access_level == 0 %}
<li>
<a href="{{ route('user.organisation') }}" {% if route starts with 'user.organisation' %}class="current"{% endif %}>
{{ Lang.choice('user.organisation', 1) }}
</a>
</li>
{% endif %}
{% if isModuleEnabled('Ticket') %}
<li>
<a href="{{ route('ticket.frontend.ticket.index') }}" {% if route starts with 'ticket.frontend.ticket.index' or route starts with 'ticket.frontend.ticket.show' %}class="current"{% endif %}>
{{ Lang.choice('ticket.ticket', 2) }}
</a>
</li>
{% endif %}
<li>
<a class="logout-link" data-url="{{ route('user.logout') }}" data-method="post">
{{ Lang.get('user.logout') }}
</a>
</li>
{% elseif not account %}
<li>
<a href="{{ route('user.login') }}" {% if route starts with 'user.login' %}class="current"{% endif %}>
{{ Lang.get('user.login') }}
</a>
</li>
{% if Config.get('settings.registration_enabled') == 1 %}
<li>
<a href="{{ route('user.register') }}" {% if route starts with 'user.register' %}class="current"{% endif %}>
{{ Lang.get('user.register') }}
</a>
</li>
{% endif %}
{% endif %}
{% if Config.get('settings.website_url') is not empty %}
<li class="lg:sp-hidden">
<hr class="sp-mx-0 sp-my-4 sp-border-primary-200" />
<a href="{{ Config.get('settings.website_url') }}">
{{ Lang.get('core.back_to_website') }}
</a>
</li>
{% endif %}
{{ View.fireHook('frontend.navigation') }}
</ul>