Commit 328d9ad3 authored by Jitka Novotna's avatar Jitka Novotna

list project in own file

parent db9e8540
......@@ -68,6 +68,9 @@ $("#views-menu li a").click(function(){
{% include "list-translations.html" %}
{% endwith %}
{% else %}
{% with usersubscriptions as projects %}
{% include "list-projects.html" %}
{% endwith %}
<p class="help-block">{% trans "Choose your languages in preferences and you will get an overview here of available translations for those languages in your subscribed projects." %}</p>
{% endif %} {# usersubscriptions #}
<p>
......@@ -94,24 +97,7 @@ $("#views-menu li a").click(function(){
<div class="tab-pane active" id="projects">
{% endif %} {# user.is_authenticated #}
<table class="sort table">
<thead>
<tr>
<th>{% trans "Project" %}</th>
<th colspan="2">{% trans "Translated" %}</th>
</tr>
<tbody>
{% for prj in projects %}
{% with prj.get_translated_percent as percent and prj.get_fuzzy_percent as fuzzy and prj.get_failing_checks_percent as check_percent %}
<tr>
<th><a href="{{ prj.get_absolute_url }}">{{ prj }}</a></th>
<td class="progress-cell">{% translation_progress prj %}</td>
<td class="percent">{{ percent }}%</td>
</tr>
{% endwith %}
{% endfor %}
</tbody>
</table>
{% include "list-projects.html" %}
<p>
{% include "legend.html" %}
......@@ -129,7 +115,10 @@ $("#views-menu li a").click(function(){
{% include "list-translations.html" %}
{% endwith %}
{% else %}
<p class="help-block">{% trans "Choose your languages in preferences and you will get an overview here of available translations for those languages in TODO." %}</p>
{% with componentlist.get_components as projects %}
{% include "list-projects.html" %}
{% endwith %}
<p class="help-block">{% trans "Choose your languages in preferences and you will get an overview here of available translations for those languages." %}</p>
{% endif %} {# userlanguages #}
<p><a class="btn btn-default" href="{% url 'profile' %}#languages">{% trans "Manage your languages" %}</a></p>
</div>{% endfor %}
......
......@@ -45,6 +45,9 @@ class ComponentList(models.Model):
components = models.ManyToManyField('SubProject')
def get_components(self):
return self.components.filter(slug=self.slug)
def clean(self):
if not self.name:
raise ValidationError(_('Name must be specified'))
......
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