Commit f31272fc authored by Jitka Novotna's avatar Jitka Novotna

dropdown for lits

parent d5957ede
......@@ -18,6 +18,7 @@
{% whiteboard_messages %}
<ul class="nav nav-pills">
{% if user.is_authenticated %}
<li class="dropdown active">
......@@ -28,7 +29,9 @@
<li><a href="#projects" data-toggle="tab">{% trans "All projects" %}</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="#todo" data-toggle="tab">{% trans "todo component" %}</a></li>
{% for componentlist in componentlists %}
<li><a href="#todo" data-toggle="tab">{{ componentlist.title }}</a></li>
{% endfor %}
</ul>
</li>
{% else %}
......
......@@ -23,6 +23,7 @@ from datetime import datetime
import weblate
from weblate import appsettings
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
......@@ -40,7 +41,7 @@ def weblate_context(request):
login_redirect_url = request.get_full_path()
projects = Project.objects.all_acl(request.user)
componentlists = ComponentList.objects.all()
# Load user translations if user is authenticated
usersubscriptions = None
......@@ -92,4 +93,5 @@ def weblate_context(request):
'acl_projects': projects,
'usersubscriptions': usersubscriptions,
'userlanguages': userlanguages,
'componentlists': componentlists,
}
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