field=models.ManyToManyField(help_text='Choose languages you can understand, strings in those languages will be shown in addition to the source string.',related_name='secondary_profile_set',verbose_name='Secondary languages',to='lang.Language',blank=True),
{% if opts.model_name == 'project' or opts.model_name == 'subproject' or opts.model_name == 'advertisement' or opts.model_name == 'whiteboardmessage' or opts.model_name == 'groupacl' %}
{% if opts.model_name == 'project' or opts.model_name == 'subproject' or opts.model_name == 'advertisement' or opts.model_name == 'whiteboardmessage' or opts.model_name == 'groupacl' or opts.model_name == 'componentlist' %}
<li><ahref="#search"data-toggle="tab">{% trans "Search" %}</a></li>
<li><ahref="#history"data-toggle="tab">{% trans "History" %}</a></li>
<li><ahref="#activity"data-toggle="tab"data-load="activity"data-yearly="{% url 'yearly_activity' %}"data-monthly="{% url 'monthly_activity' %}">{% trans "Activity" %}</a></li>
...
...
@@ -44,51 +54,63 @@
<divclass="tab-content">
{% if user.is_authenticated %}
<divclass="tab-pane active"id="your">
{% if usertranslations %}
{% with usertranslations as translations and 2 as show_language and user.profile.hide_completed as hide_completed %}
{% include "list-translations.html" %}
{% endwith %}
<div{%active_tab"your-subscriptions"%}>
{% if subscribed_projects %}
{% if usersubscriptions %}
{% with usersubscriptions as translations and 2 as show_language and user.profile.hide_completed as hide_completed %}
{% include "list-translations.html" %}
{% endwith %}
{% else %}
{% with subscribed_projects as projects %}
{% include "list-projects.html" %}
{% endwith %}
{% endif %}
{% else %}
<pclass="help-block">{% trans "Choose your languages in preferences and you will get an overview here of available translations for those languages." %}</p>
<pclass="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 %}
<p><aclass="btn btn-default"href="{% url 'profile' %}#languages">{% trans "Manage your translations" %}</a></p>
<p>
<aclass="btn btn-default"href="{% url 'profile' %}#languages">{% trans "Manage your languages" %}</a>
<aclass="btn btn-default"href="{% url 'profile' %}#subscriptions">{% trans "Manage your subscriptions" %}</a>
</p>
</div>
<divclass="tab-pane"id="projects">
{% else %}
<divclass="tab-pane active"id="projects">
{% endif %}
<tableclass="sort table">
<thead>
<tr>
<th>{% trans "Project" %}</th>
<thcolspan="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 %}
{% with userlanguages as translations and 2 as show_language and user.profile.hide_completed as hide_completed %}
{% include "list-translations.html" %}
{% endwith %}
{% endfor %}
</tbody>
</table>
<p>
{% include "legend.html" %}
</p>
{% else %}
<pclass="help-block">{% trans "Choose your languages in preferences and you will get an overview here of available translations for those languages in all projects." %}</p>
{% endif %} {# userlanguages #}
<p><aclass="btn btn-default"href="{% url 'profile' %}#languages">{% trans "Manage your languages" %}</a></p>
</div>
{% endif %} {# user.is_authenticated #}
{# All projects#}
<div{%active_tab"projects"%}>
{% include "list-projects.html" %}
<p>{% include "legend.html" %}</p>
{% if offer_hosting %}
<p><aclass="btn btn-default"href="{% url 'hosting' %}">{% trans "Ask for project hosting" %}</a>
{% endif %}
</div>
{% for componentlist in componentlists %}
<div{%active_tabcomponentlist.tab_slug%}>
{% if userlanguages %}
{% with componentlist.translations as translations and 2 as show_language and user.profile.hide_completed as hide_completed %}
{% include "list-translations.html" %}
{% endwith %}
{% else %}
{% with componentlist.components.all as projects %}
{% include "list-projects.html" %}
{% endwith %}
<pclass="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><aclass="btn btn-default"href="{% url 'profile' %}#languages">{% trans "Manage your languages" %}</a></p>