Commit a639cb48 authored by Jitka Novotna's avatar Jitka Novotna

Dashboard buttom default text

parent 5490aad0
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
<ul class="nav nav-pills"> <ul class="nav nav-pills">
<li class="dropdown active"> <li class="dropdown active">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="views-title"> <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="views-title">
"TODO" <span class="caret"></span> {{dashboard_default_view}}<span class="caret"></span>
</a> </a>
<ul class="dropdown-menu" id="views-menu"> <ul class="dropdown-menu" id="views-menu">
<li><a href="#projects" data-toggle="tab">{% trans "All projects" %}</a></li> <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-languages" data-toggle="tab">{% trans "Your languages" %}</a></li>
<li><a href="#your-subscriptions" data-toggle="tab">{% trans "Your subscriptions" %}</a></li> <li><a href="#your-subscriptions" data-toggle="tab">{% trans "Your subscriptions" %}</a></li>
{% endif %} {% endif %}
{% for componentlist in componentlists %} {% for componentlist in componentlists %}
<li><a href="#list-{{ componentlist.slug }}" data-toggle="tab">{{ componentlist.name }}</a></li> <li><a href="#list-{{ componentlist.slug }}" data-toggle="tab">{{ componentlist.name }}</a></li>
{% endfor %} {% endfor %}
......
...@@ -26,6 +26,7 @@ from weblate.trans.site import get_site_url ...@@ -26,6 +26,7 @@ from weblate.trans.site import get_site_url
from weblate.trans.models.componentlist import ComponentList from weblate.trans.models.componentlist import ComponentList
from weblate.trans.models.project import Project from weblate.trans.models.project import Project
from weblate.trans.models.translation import Translation 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_BASE = 'https://weblate.org/?utm_source=weblate&utm_term=%s'
URL_DONATE = 'https://weblate.org/donate/?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): ...@@ -66,6 +67,7 @@ def weblate_context(request):
).select_related() ).select_related()
return { return {
'version': weblate.VERSION, 'version': weblate.VERSION,
...@@ -98,4 +100,6 @@ def weblate_context(request): ...@@ -98,4 +100,6 @@ def weblate_context(request):
'usersubscriptions': usersubscriptions, 'usersubscriptions': usersubscriptions,
'userlanguages': userlanguages, 'userlanguages': userlanguages,
'componentlists': componentlists, '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