-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
navigation: adapt navigation structure and add wagtail setting for ea…
…sy language page, remove userindicator
- Loading branch information
Showing
10 changed files
with
183 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Changed | ||
- updated navigation for burger menu | ||
|
||
### Removed | ||
- userindicator (blue bar) |
28 changes: 28 additions & 0 deletions
28
meinberlin/apps/cms/migrations/0047_headerpages_easy_language_page.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 4.2.11 on 2025-01-08 15:20 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("wagtailcore", "0089_log_entry_data_json_null_to_object"), | ||
("meinberlin_cms", "0046_alter_docspage_body"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="headerpages", | ||
name="easy_language_page", | ||
field=models.ForeignKey( | ||
blank=True, | ||
help_text="Please add a link to the easy language page.", | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
related_name="easy_language_page", | ||
to="wagtailcore.page", | ||
verbose_name="Easy Language Form Page", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
meinberlin/apps/users/templates/meinberlin_users/user_indicator.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
meinberlin/assets/scss/components_user_facing/_navigation-meta.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.navigation-meta .heading { | ||
padding-bottom: 1.5em; | ||
padding-top: 1.5em; | ||
border-top: 1px solid $gray-lighter; | ||
border-bottom: 1px solid $gray-lighter; | ||
} | ||
|
||
.navigation-meta a { | ||
border-bottom: 1px solid $gray-lighter; | ||
} | ||
|
||
.navigation-meta li:last-child a { | ||
border-bottom: 0; | ||
} | ||
|
||
.navigation-meta:last-child li:last-child { | ||
border-bottom: 1px solid $gray-lighter; | ||
} | ||
|
||
.navigation-meta .heading:empty { | ||
height: 4.375em; | ||
} | ||
|
||
.navigation-meta .navigation-meta__link { | ||
margin: 3px; | ||
display: block; | ||
padding: 1em 0 1em 12px; | ||
|
||
@media screen and (min-width: $breakpoint-tablet-landscape) { | ||
padding: 1em 24px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{% load i18n %} | ||
|
||
<nav id="navigation-primary" class="js-navigation-primary"> | ||
<div class="tree-wrapper js-navigation-tree-wrapper"> | ||
<h3 class="aural">{% translate 'Page navigation' %}</h3> | ||
<ul class="navigation-tree"> | ||
<li class="{% if request.path == project_list %}active{% endif %}"> | ||
<a href="{% url 'meinberlin_plans:plan-list' %}">{% translate 'Project Overview' %}</a> | ||
</li> | ||
{% if settings.meinberlin_cms.HeaderPages.help_page %} | ||
<li class="{% if request.path == settings.meinberlin_cms.HeaderPages.help_page.get_url %}active{% endif %}"> | ||
<a href="{{ settings.meinberlin_cms.HeaderPages.help_page.get_url }}">{% translate 'Help & Support' %}</a> | ||
</li> | ||
{% endif %} | ||
{% if request.user.is_authenticated %} | ||
{% url 'account_actions' as activity_feed %} | ||
<li class="{% if request.path == activity_feed %}active{% endif %}"> | ||
<a href="{% url 'account_actions' %}">{% translate 'Activity Feed' %}</a> | ||
</li> | ||
{% endif %} | ||
{% for item in topnav %} | ||
<li class="{% if request.path == item.url %}active{% endif %}"> | ||
<a href="{{ item.url }}">{{ item.title }}</a> | ||
</li> | ||
{% endfor %} | ||
{% if request.user.is_authenticated %} | ||
<li> | ||
<a href="{% url 'account' %}">{% translate "Your account" %}</a> | ||
<ul class="navigation-tree"> | ||
<li> | ||
{% url 'account_profile' as account_url %} | ||
<a href="{% url 'account_profile' %}" class="{% if request.path == account_url %}active{% endif %}">{% translate "Account and security" %}</a> | ||
</li> | ||
<li> | ||
{% url 'search_profiles' as search_profiles_url %} | ||
<a href="{% url 'search_profiles' %}" class="{% if request.path == search_profiles_url %}active{% endif %}">{% translate "Search profiles" %}</a> | ||
</li> | ||
</ul> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
{% if request.user.organisations %} | ||
<div class="navigation-meta"> | ||
<h3 class="heading">{% translate 'Dashboard' %}</h3> | ||
<ul> | ||
{% for organisation in request.user.organisations %} | ||
<li> | ||
<a href="{% url 'a4dashboard:project-list' organisation_slug=organisation.slug %}">{{ organisation.name }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
<div class="navigation-meta"> | ||
<h3 class="heading">{% translate 'Accessibility' %}</h3> | ||
<ul> | ||
{% if settings.meinberlin_cms.HeaderPages.easy_language_page %} | ||
<li class="{% if request.path == settings.meinberlin_cms.HeaderPages.easy_language_page.get_url %}active{% endif %}"> | ||
<a href="{{ settings.meinberlin_cms.HeaderPages.easy_language_page.get_url }}">{% translate 'Easy language' %}</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
{% if request.user.is_superuser %} | ||
<div class="navigation-meta"> | ||
<h3 class="heading">{% translate "Further links" %}</h3> | ||
<ul> | ||
{% if request.user.is_superuser %} | ||
<li> | ||
<a href="{% url 'meinberlin_platformemails:create' %}">{% translate "Platform Email" %}</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
<div class="navigation-meta"> | ||
<h3 class="heading">{{ request.user.username }}</h3> | ||
<ul> | ||
{% if request.user.is_authenticated %} | ||
<li> | ||
<form class="block--nogap text--color-dark" action="{% url 'account_logout' %}" method="post" aria-label="{% translate 'Logout' %}"> | ||
{% csrf_token %} | ||
<input type="hidden" name="next" value="{{ redirect_field_value }}"> | ||
<button class="link navigation-meta__link" type="submit">{% translate "Logout" %}</button> | ||
</form> | ||
</li> | ||
{% endif %} | ||
{% if not request.user.is_authenticated %} | ||
<li> | ||
<a href="{% url 'account_login' %}?next={{ redirect_field_value|urlencode }}">{% translate "Login" %}</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'account_signup' %}?next={{ redirect_field_value|urlencode }}">{% translate "Register" %}</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'account_reset_password' %}?next={{ redirect_field_value|urlencode }}">{% translate "Forgot password" %}</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
</nav> |