feat: Add numbering to "standings" table

This commit is contained in:
Suraj Shetty 2019-04-14 21:38:11 +05:30
parent df61ed3ebe
commit 7f54312ec0

View file

@ -2,7 +2,7 @@
<h3>{{ _('Top Performer') }} 🏆 </h3>
<p> {{ frappe.get_fullname(top_performer.user) }}
<span class="text-muted">
{{ frappe._('gained {} points'.format(frappe.utils.cint(top_performer.energy_points))) }}
{{ frappe._('gained {0} points').format(frappe.utils.cint(top_performer.energy_points)) }}
</span>
</p>
{% endif %}
@ -11,7 +11,7 @@
<h3>{{ _('Top Reviewer') }} ❤️ </h3>
<p> {{ frappe.get_fullname(top_reviewer.user) }}
<span class="text-muted">
{{ frappe._('gave {} points'.format(frappe.utils.cint(top_reviewer.given_points))) }}
{{ frappe._('gave {0} points').format(frappe.utils.cint(top_reviewer.given_points)) }}
</span>
</p>
@ -19,16 +19,18 @@
{% endif %}
<h3>{{ _('Standings') }}</h3>
<h3>{{ _('Standings') }} ({{ _('Top {0}').format(standings|length) }}) </h3>
<table class='table table-bordered'>
<tr>
<th> # </th>
<th style='width: 70%'>{{ frappe._('User') }}</th>
<th style='width: 15%'>{{ frappe._('Energy Points') }}</th>
<th style='width: 15%'>{{ frappe._('Points Given') }}</th>
</tr>
{% for user in standings %}
<tr>
<td>{{ loop.index }}</td>
<td>{{ frappe.get_fullname(user.user) }}</td>
<td>{{ frappe.utils.cint(user.energy_points) }}</td>
<td>{{ frappe.utils.cint(user.given_points) }}</td>