Commit a639cb48 authored by Jitka Novotna's avatar Jitka Novotna

Dashboard buttom default text

parent 5490aad0
......@@ -22,14 +22,14 @@
<ul class="nav nav-pills">
<li class="dropdown active">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="views-title">
"TODO" <span class="caret"></span>
{{dashboard_default_view}}<span class="caret"></span>
</a>
<ul class="dropdown-menu" id="views-menu">
<li><a href="#projects" data-toggle="tab">{% trans "All projects" %}</a></li>
{% if user.is_authenticated %}
{% if user.is_authenticated %}
<li><a href="#your-languages" data-toggle="tab">{% trans "Your languages" %}</a></li>
<li><a href="#your-subscriptions" data-toggle="tab">{% trans "Your subscriptions" %}</a></li>
{% endif %}
{% endif %}
{% for componentlist in componentlists %}
<li><a href="#list-{{ componentlist.slug }}" data-toggle="tab">{{ componentlist.name }}</a></li>
{% endfor %}
......
......@@ -26,6 +26,7 @@ from weblate.trans.site import get_site_url
from weblate.trans.models.componentlist import ComponentList
from weblate.trans.models.project import Project
from weblate.trans.models.translation import Translation
from weblate.accounts.models import Profile
URL_BASE = 'https://weblate.org/?utm_source=weblate&utm_term=%s'
URL_DONATE = 'https://weblate.org/donate/?utm_source=weblate&utm_term=%s'
......@@ -66,6 +67,7 @@ def weblate_context(request):
).select_related()
return {
'version': weblate.VERSION,
......@@ -98,4 +100,6 @@ def weblate_context(request):
'usersubscriptions': usersubscriptions,
'userlanguages': userlanguages,
'componentlists': componentlists,
'dashboard_default_view': dict(Profile.DASHBOARD_CHOICES)[request.user.profile.dashboard_view],
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment