aurweb/templates/tu/index.html
Kevin Morris 49c5a3facf
feat: display stats about total & active TUs on proposals
This patch brings in two new features:
- when viewing proposal listings, there is a new Statistics section,
  containing the total and active number of Trusted Users found in the
  database.
- when viewing a proposal directly, the number of active trusted users
  assigned when the proposal was added is now displayed in the details
  section.

Closes #323

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-03-08 20:28:09 -08:00

51 lines
1.5 KiB
HTML

{% extends "partials/layout.html" %}
{% block pageContent %}
<div class="box">
<h2>{{ "Statistics" | tr }}</h2>
<table class="no-width">
<tbody>
<tr>
<td class="text-right">{{ "Total" | tr }} {{ "Trusted Users" | tr }}:</td>
<td>{{ trusted_user_count }}</td>
</tr>
<tr>
<td class="text-right">{{ "Active" | tr }} {{ "Trusted Users" | tr }}:</td>
<td>{{ active_trusted_user_count }}</td>
</tr>
</tbody>
</table>
</div>
{%
with table_class = "current-votes",
total_votes = current_votes_count,
results = current_votes,
off_param = "coff",
by_param = "cby",
by_next = current_by_next,
title = "Current Votes",
off = current_off,
by = current_by
%}
{% include "partials/tu/proposals.html" %}
{% endwith %}
{%
with table_class = "past-votes",
total_votes = past_votes_count,
results = past_votes,
off_param = "poff",
by_param = "pby",
by_next = past_by_next,
title = "Past Votes",
off = past_off,
by = past_by
%}
{% include "partials/tu/proposals.html" %}
{% endwith %}
{% with title = "Last Votes by TU", votes = last_votes_by_tu %}
{% include "partials/tu/last_votes.html" %}
{% endwith %}
{% endblock %}