fix: cohort translations

This commit is contained in:
Jannat Patel
2022-10-13 17:28:22 +05:30
parent f9748cb723
commit 3df08b99b3
2 changed files with 33 additions and 34 deletions

View File

@@ -18,8 +18,9 @@
{% if is_mentor %}
{% set sg = mentor.get_subgroup() %}
<div class="alert alert-info medium">
<a href="{{sg.get_url()}}">{{ _("You are a mentor of {0} subgroup.").format(frappe.bold(sg.title)) }}</a>
<a href="{{sg.get_url()}}">
{{ _("You are a mentor of {0} subgroup.").format(frappe.bold(sg.title)) }}
</a>
</div>
{% endif %}
@@ -42,38 +43,36 @@
{% endblock %}
{% macro render_subgroups() %}
<ul class="list-group">
{% for sg in cohort.get_subgroups(include_counts=True) %}
<li class="list-group-item">
<div>
<a class="subgroup-title"
style="font-weight: 700; color: inherit;"
href="/courses/{{course.name}}/subgroups/{{cohort.slug}}/{{sg.slug}}"
>{{sg.title}}</a>
</div>
<div style="font-size: 0.8em;">
{{sg.num_mentors}} Mentors
|
{{sg.num_students}} Students
|
{{sg.num_join_requests}} Join Requests
</div>
</li>
{% endfor %}
</ul>
<ul class="list-group">
{% for sg in cohort.get_subgroups(include_counts=True) %}
<li class="list-group-item">
<div>
<a class="subgroup-title" style="font-weight: 700; color: inherit;"
href="/courses/{{course.name}}/subgroups/{{cohort.slug}}/{{sg.slug}}">
{{ sg.title }}
</a>
</div>
<div style="font-size: 0.8em;">
{{ sg.num_mentors }} {{ _("Mentors") }}
|
{{sg.num_students}} {{ _(Students) }}
|
{{sg.num_join_requests}} {{ _("Join Requests") }}
</div>
</li>
{% endfor %}
</ul>
{% endmacro %}
{% macro render_navitem(title, link, page, count=-1) %}
<li class="nav-item">
<a
class="nav-link {{ 'active' if link==page }}"
href="/courses/{{course.name}}/cohorts/{{cohort.slug}}/{{link}}"
>{{title}}
{% if count != -1 %}
<span
class="badge {{'badge-primary' if link==page else 'badge-secondary'}}"
>{{count}}</span>
{% endif %}
</a>
</li>
<li class="nav-item">
<a class="nav-link {{ 'active' if link==page }}" href="/courses/{{course.name}}/cohorts/{{cohort.slug}}/{{link}}">
{{ title }}
{% if count != -1 %}
<span class="badge {{'badge-primary' if link==page else 'badge-secondary'}}">
{{ count }}
</span>
{% endif %}
</a>
</li>
{% endmacro %}

View File

@@ -108,7 +108,7 @@
{% endfor %}
</table>
{% else %}
<p><em>There are no pending join requests.</em></p>
<div> {{ _("There are no pending join requests.") }} </div>
{% endif %}
{% set rejected_requests = subgroup.get_join_requests(status="Rejected") %}