-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbase.html
More file actions
34 lines (31 loc) · 1.18 KB
/
base.html
File metadata and controls
34 lines (31 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{% extends 'base.html' %}
{% load i18n static %}
{% block nav_user_pages %}
<li class="nav-item">
{# URL provided by django-allauth/account/urls.py #}
{% url 'users:detail' request.user.username as url_profile %}
<a href="{{ url_profile }}"
class="nav-link
{% if request.path == url_profile %}active{% endif %}">{% trans 'Profile' %}</a>
</li>
{# lazy way to check if user is logged in with github #}
{% for provider in socialaccount_providers %}
{% if provider.id == 'github' %}
<li class="nav-item">
{% url 'webiscite:my-bills' as url_proposals %}
<a href="{{ url_proposals }}"
class="nav-link
{% if request.path == url_proposals %}active{% endif %}">{% trans 'Proposals' %}</a>
</li>
{% endif %}
{% endfor %}
<li class="nav-item">
{% url 'webiscite:my-bill-votes' as url_my_votes %}
<a href="{{ url_my_votes }}"
class="nav-link
{% if request.path == url_my_votes %}active{% endif %}">{% trans 'Votes Cast' %}</a>
</li>
{% endblock nav_user_pages %}
{% block extra_css %}
<link href="{% static 'css/webiscite.css' %}" rel="stylesheet" />
{% endblock extra_css %}