0001-pwa-mark-navigation-entry-as-selected-for-current-pa.patch
combo/apps/pwa/templates/combo/pwa/navigation.html | ||
---|---|---|
4 | 4 |
<div> |
5 | 5 |
<ul> |
6 | 6 |
{% for entry in entries %} |
7 |
<li class="{{ entry.css_class_names }}" data-entry-pk="{{ entry.pk }}" |
|
7 |
<li class="{{ entry.css_class_names }}{% if entry.get_url == page.get_online_url %} selected{% endif %}" data-entry-pk="{{ entry.pk }}"
|
|
8 | 8 |
{% if entry.notification_count %}data-notification-count-url="{{site_base}}/api/notification/count/"{% endif %} |
9 | 9 |
{% if entry.use_user_name_as_label %}data-include-user-name{% endif %}> |
10 | 10 |
<a href="{% if entry.link_page_id %}{{ site_base }}{% endif %}{{ entry.get_url }}" |
combo/apps/pwa/templatetags/pwa.py | ||
---|---|---|
29 | 29 |
pwa_navigation_template = template.loader.get_template('combo/pwa/navigation.html') |
30 | 30 |
entries = list(PwaNavigationEntry.objects.all()) |
31 | 31 |
context = { |
32 |
'page': context['page'], |
|
32 | 33 |
'entries': entries, |
33 | 34 |
'include_user_name': bool([x for x in entries if x.use_user_name_as_label]), |
34 | 35 |
'user': context.get('user'), |
35 |
- |