Commit 941e3f33 authored by Joost Rijneveld's avatar Joost Rijneveld
Browse files

Merge branch '40-hide-for-members-for-non-members' into 'master'

Resolve "Hide 'for members' submenu for non-members"

Closes #41

For the future it might be good to make this permissions based but this merge request will achieve feature equivalence

See merge request !30
parents e42f08ae f34e31b0
......@@ -13,7 +13,8 @@ main = [
{'title': _('Become a Member'), 'name': 'become-a-member'},
{'title': _('Thabloid'), 'name': '#'},
]},
{'title': _('For Members'), 'name': '#', 'submenu': [
{'title': _('For Members'), 'name': '#', 'authenticated': True,
'submenu': [
{'title': _('Photos'), 'name': 'photos:index'},
{'title': _('Statistics'), 'name': '#'},
{'title': _('Become Active'), 'name': 'become-active'},
......
......@@ -6,6 +6,7 @@
<!-- menu -->
<ul class="nav">
{% for item in menu %}
{% if not item.authenticated or request.user.is_authenticated %}
{% url item.name as path %}
<li {% if request.path == path %}class="nav-path-selected"{% endif %}>
<a href="{{ path }}" target="_self" {% if request.path == path %}class="nav-path-selected"{% endif %}>
......@@ -15,6 +16,7 @@
{% include 'menu/submenu.html' with submenu=item.submenu %}
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
<!-- /menu -->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment