Commit d7fc93d7 authored by Michal Čihař's avatar Michal Čihař

Merge branch 'master' into bootstrap

parents 46799ab7 70eeade6
......@@ -23,9 +23,7 @@
<div class="panel-heading"><h4 class="panel-title">{% trans "Projects" %}</h4></div>
<div class="panel-body">
{% with object.translation_set.enabled as translations %}
{% include "list-translations.html" %}
{% endwith %}
</div>
</div>
......
......@@ -45,6 +45,10 @@ def show_language(request, lang):
dicts = Dictionary.objects.filter(
language=obj
).values_list('project', flat=True).distinct()
projects = Project.objects.all_acl(request.user)
translations = obj.translation_set.enabled().filter(
subproject__project__in=projects
)
return render(
request,
......@@ -56,8 +60,7 @@ def show_language(request, lang):
'rss-language', kwargs={'lang': obj.code}
),
'last_changes_url': urlencode({'lang': obj.code}),
'dicts': Project.objects.all_acl(request.user).filter(
id__in=dicts
),
'dicts': projects.filter(id__in=dicts),
'translations': translations,
}
)
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