Complete navbar with link to the services.
This commit is contained in:
parent
8875e160f2
commit
2e283cd39e
|
@ -1,15 +1,23 @@
|
|||
from django.contrib.auth.mixins import UserPassesTestMixin
|
||||
from django.views.generic.base import ContextMixin
|
||||
|
||||
from . import get_version
|
||||
from . import api, get_version
|
||||
from .auth import SESSION_KEY_TOKEN
|
||||
|
||||
|
||||
class CustomContextMixin(ContextMixin):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
# TODO generate menu items
|
||||
# generate services menu items
|
||||
services_menu = [
|
||||
{'pattern_name': 'musician:dashboard', 'title': 'Domains & websites'},
|
||||
{'pattern_name': 'musician:mails', 'title': 'Mails'},
|
||||
{'pattern_name': 'musician:mailing-lists', 'title': 'Mailing lists'},
|
||||
{'pattern_name': 'musician:databases', 'title': 'Databases'},
|
||||
{'pattern_name': 'musician:saas', 'title': 'SaaS'},
|
||||
]
|
||||
context.update({
|
||||
'services_menu': services_menu,
|
||||
'version': get_version(),
|
||||
})
|
||||
|
||||
|
|
|
@ -38,11 +38,13 @@
|
|||
<h4>{{ version }}</h4>
|
||||
<div class="dropdown-divider"></div>
|
||||
{# <!-- services menu --> #}
|
||||
{% for item in services_menu %}
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Domains & websites</a>
|
||||
<a class="nav-link active" href="{% url item.pattern_name %}">{{ item.title }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endfor %}
|
||||
{# <!-- user profile menu --> #}
|
||||
<div class="dropdown-divider mt-5"></div>
|
||||
<ul class="nav flex-column">
|
||||
|
|
Loading…
Reference in New Issue