|
5 | 5 | {% accessibility_header request=request %}
|
6 | 6 | <header class="header" aria-label="Navigatie header">
|
7 | 7 | <div class="header__container">
|
8 |
| - |
9 | 8 | <div class="header__menu">
|
10 | 9 | <button class="header__button">
|
11 | 10 | <div class="header__menu-icon">
|
|
28 | 27 |
|
29 | 28 | <dialog class="header__submenu">
|
30 | 29 |
|
| 30 | + {% if cms_apps.products %} |
31 | 31 | <nav class="header__actions" aria-label="Zoek navigatie mobiel">
|
32 | 32 | {% url 'search:search' as search_url %}
|
33 | 33 | {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=False %}
|
34 | 34 | {% input search_form.query no_label=True %}
|
35 | 35 | {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %}
|
36 | 36 | {% endrender_form %}
|
37 | 37 | </nav>
|
38 |
| - |
39 |
| -{# * * * Start DISABLED * * * Django CMS dynamic mobile menu#} |
40 |
| -{# <nav class="primary-navigation" aria-label="Hoofd navigatie">#} |
41 |
| -{# <ul class="primary-navigation__list">#} |
42 |
| -{# {% show_menu 0 100 100 100 "cms/menu/primary.html" %}#} |
43 |
| -{##} |
44 |
| -{# {% if has_general_faq_questions %}#} |
45 |
| -{# <li class="primary-navigation__list-item">#} |
46 |
| -{# {% link text=_('FAQ') href='general_faq' icon="help_outline" icon_position="before" icon_outlined=True %}#} |
47 |
| -{# </li>#} |
48 |
| -{# {% endif %}#} |
49 |
| -{# </ul>#} |
50 |
| -{##} |
51 |
| -{# <section class="header__actions" aria-label="Navigatie mobiel voor inloggen en uitloggen">#} |
52 |
| -{# <div class="header__text-actions">#} |
53 |
| -{# <p class="p">#} |
54 |
| -{# {% if request.user.is_authenticated %}{% icon icon="person" icon_position="before" icon_outlined=True %}{% trans "Ingelogd als" %} {{ request.user.get_short_name }}{% endif %}#} |
55 |
| -{# </p>#} |
56 |
| -{##} |
57 |
| -{# {% if request.user.is_authenticated %}#} |
58 |
| -{# <ul class="header__list">#} |
59 |
| -{# <li class="header__list-item">#} |
60 |
| -{# {% trans "Logout" as logout %}#} |
61 |
| -{# {% link text=logout href=request.user.get_logout_url icon="arrow_forward" icon_position="before" primary=True %}#} |
62 |
| -{# </li>#} |
63 |
| -{# </ul>#} |
64 |
| -{# {% elif config.login_show %}#} |
65 |
| -{# <ul class="header__list">#} |
66 |
| -{# <li class="header__list-item">#} |
67 |
| -{# {% url 'login' as login_url %}#} |
68 |
| -{# {% trans "Inloggen" as login %}#} |
69 |
| -{# {% button text="Inloggen" href=login_url icon="person" icon_position="before" primary=True icon_outlined=True transparent=True %}#} |
70 |
| -{# </li>#} |
71 |
| -{# </ul>#} |
72 |
| -{# {% endif %}#} |
73 |
| -{# </div>#} |
74 |
| -{# </section>#} |
75 |
| -{# </nav>#} |
76 |
| -{# * * * End of DISABLED * * * Django CMS dynamic mobile menu#} |
| 38 | + {% endif %} |
77 | 39 |
|
78 | 40 | <nav class="primary-navigation" aria-label="Hoofd navigatie">
|
79 | 41 | <ul class="primary-navigation__list">
|
80 | 42 |
|
81 | 43 | <li class="primary-navigation__list-item">
|
82 | 44 | {% trans "Overzicht" as link_text %}
|
83 |
| - {% url 'root' as link %} |
84 |
| - {% link text=link_text href=link icon="grid_view" icon_position="before" %} |
| 45 | + {% link text=link_text href="/" icon="grid_view" icon_position="before" %} |
85 | 46 | </li>
|
| 47 | + |
| 48 | + {% if cms_apps.products and categories %} |
86 | 49 | <li class="primary-navigation__list-item dropdown-nav__toggle">
|
87 | 50 | <a href="#" class="link link--toggle link--icon link--icon-position-before" aria-label="{% trans "Onderwerpen" %}" title="{% trans "Onderwerpen" %}">
|
88 | 51 | <span >{% trans "Onderwerpen" %}</span>
|
89 | 52 | <span aria-hidden="true" class="material-icons-outlined ">description</span>
|
90 | 53 | {% icon icon="expand_more" icon_position="after" icon_outlined=True %}
|
91 | 54 | </a>
|
92 | 55 |
|
93 |
| - {% if categories %} |
94 | 56 | <ul class="primary-navigation__list subpage-list">
|
95 | 57 | {% for category in categories %}
|
96 | 58 | <li class="primary-navigation__list-item">
|
|
99 | 61 | </li>
|
100 | 62 | {% endfor %}
|
101 | 63 | </ul>
|
102 |
| - {% endif %} |
103 | 64 | </li>
|
| 65 | + {% endif %} |
104 | 66 |
|
105 |
| - {% if request.user.is_authenticated %} |
106 |
| - <li class="primary-navigation__list-item"> |
107 |
| - {% link text=_("Mijn profiel") href='profile:detail' icon="inventory_2" icon_position="before" icon_outlined=True %} |
108 |
| - </li> |
109 |
| - <li class="primary-navigation__list-item"> |
110 |
| - {% link text=_('Mijn berichten') href='inbox:index' icon="inbox" icon_position="before" %} |
111 |
| - {% with request.user.get_new_messages_total as total_messages %} |
112 |
| - {% if total_messages %} |
113 |
| - {% with ""|addstr:total_messages|addstr:"" as message_total %} |
114 |
| - <span class="indicator">{% link text=message_total href='inbox:index' secondary=True extra_classes="indicator__link" %}<span class="indicator__dot"></span></span> |
115 |
| - {% endwith %} |
116 |
| - {% endif %} |
117 |
| - {% endwith %} |
118 |
| - </li> |
| 67 | + {% show_menu_below_id "home" 0 100 100 100 "cms/menu/primary.html" %} |
119 | 68 |
|
120 |
| - {% if request.user.bsn and config.show_cases %} |
121 |
| - <li class="primary-navigation__list-item"> |
122 |
| - {% link text=_('Mijn aanvragen') href='cases:open_cases' icon="inventory_2" icon_position="before" icon_outlined=True %} |
123 |
| - </li> |
124 |
| - {% endif %} |
125 |
| - {% if show_plans %} |
126 |
| - <li class="primary-navigation__list-item"> |
127 |
| - {% link text=_('Samenwerken') href='collaborate:plan_list' icon="people" icon_outlined=True icon_position="before" %} |
128 |
| - {% with request.user.get_plan_contact_new_count as plan_count %} |
129 |
| - {% if plan_count %} |
130 |
| - {% with ""|addstr:plan_count|addstr:"" as plan_count %} |
131 |
| - <span class="indicator">{% link text=plan_count href='collaborate:plan_list' secondary=True %}<span class="indicator__dot"></span></span> |
132 |
| - {% endwith %} |
133 |
| - {% endif %} |
134 |
| - {% endwith %} |
135 |
| - </li> |
136 |
| - {% endif %} |
137 |
| - {% endif %} |
138 | 69 | {% if has_general_faq_questions %}
|
139 | 70 | <li class="primary-navigation__list-item">
|
140 | 71 | {% link text=_('FAQ') href='general_faq' icon="help_outline" icon_position="before" icon_outlined=True %}
|
|
170 | 101 | {% firstof config.logo.default_alt_text config.name as logo_alt_text %}
|
171 | 102 | <div class="logo__desktop">{% logo src=config.logo.file.url alt=logo_alt_text svg_height=75 %}</div>
|
172 | 103 |
|
173 |
| - {% primary_navigation categories=categories request=request has_general_faq_questions=has_general_faq_questions show_plans=show_plans %} |
| 104 | + {% primary_navigation categories=categories request=request has_general_faq_questions=has_general_faq_questions cms_apps=cms_apps show_plans=show_plans %} |
174 | 105 |
|
| 106 | + {% if cms_apps.products %} |
175 | 107 | <nav class="header__actions" aria-label="Zoek navigatie desktop">
|
176 | 108 | {% url 'search:search' as search_url %}
|
177 | 109 | {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=True %}
|
178 | 110 | {% input search_form.query no_label=True %}
|
179 | 111 | {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %}
|
180 | 112 | {% endrender_form %}
|
181 | 113 | </nav>
|
| 114 | + {% endif %} |
182 | 115 |
|
183 | 116 | {% navigation_authenticated categories=categories request=request has_general_faq_questions=has_general_faq_questions show_plans=show_plans %}
|
184 | 117 |
|
185 | 118 | </div>
|
186 | 119 | </header>
|
| 120 | + |
| 121 | +{% if cms_apps.products %} |
187 | 122 | <section class="search search__mobile">
|
188 | 123 | <nav class="search__actions " aria-label="Zoek navigatie mobiel">
|
189 | 124 | {% url 'search:search' as search_url %}
|
|
193 | 128 | {% endrender_form %}
|
194 | 129 | </nav>
|
195 | 130 | </section>
|
| 131 | +{% endif %} |
0 commit comments