Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
fb2036c8
Unverified
Commit
fb2036c8
authored
Aug 17, 2016
by
Thom Wiggers
📐
Browse files
Allow to set static urls in the menu
Closes
#42
parent
dc613930
Changes
3
Hide whitespace changes
Inline
Side-by-side
website/thaliawebsite/menus.py
View file @
fb2036c8
...
...
@@ -18,7 +18,7 @@ main = [
{
'title'
:
_
(
'Photos'
),
'name'
:
'photos:index'
},
{
'title'
:
_
(
'Statistics'
),
'name'
:
'#'
},
{
'title'
:
_
(
'Become Active'
),
'name'
:
'become-active'
},
{
'title'
:
_
(
'Wiki'
),
'
name'
:
'#
'
},
{
'title'
:
_
(
'Wiki'
),
'
url'
:
'/wiki/
'
},
]},
{
'title'
:
_
(
'Calendar'
),
'name'
:
'#'
},
{
'title'
:
_
(
'Career'
),
'name'
:
'partners:index'
,
'submenu'
:
[
...
...
website/thaliawebsite/templates/menu/menu.html
View file @
fb2036c8
...
...
@@ -9,7 +9,8 @@
{% 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
%}
>
<a
href=
"{% if path %}{{ path }}{% else %}{{ item.url }}{% endif %}"
target=
"_self"
{%
if
request.path =
=
path
%}
class=
"nav-path-selected"
{%
endif
%}
>
{{ item.title }}
</a>
{% if 'submenu' in item %}
...
...
website/thaliawebsite/templates/menu/submenu.html
View file @
fb2036c8
...
...
@@ -2,7 +2,7 @@
{% for item in submenu %}
{% url item.name as path %}
<li
{%
if
request.path =
=
path
%}
class=
"nav-selected nav-path-selected"
{%
endif
%}
>
<a
href=
"{
{ path }
}"
<a
href=
"{
% if path %}{{ path }}{% else %}{{ item.url }}{% endif %
}"
target=
"_self"
{%
if
request.path =
=
path
%}
class=
"nav-selected nav-path-selected"
{%
endif
%}
>
{{ item.title }}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment