{% extends "base.html" %} {% load i18n static review_extras %} {% block head %} {% endblock %} {% block title %}{% trans "Review statistics" %}{% endblock %} {% block page_id %}page-review-stats{% endblock %} {% block contents %}
{# KPI strip — one card per key metric #}

{% trans "KPI overview" %}

{% trans "Open requests" %}
{{ open_requests }}
{% trans "Overdue" %}
{{ overdue_requests }}
{% trans "Approval rate" %}
{{ approval_rate|floatformat:0 }}%
{% trans "New (30d)" %}
{{ requests_last_30d }}
{% trans "Closed (30d)" %}
{{ closed_last_30d }}
{% trans "Votes (30d)" %}
{{ votes_last_30d }}
{# Review time overview #}

{% trans "Review time overview" %}

{% trans "Avg. time to decision" %}
{{ avg_time_to_decision|default:"—" }}
{% trans "Median time to decision" %}
{{ median_time_to_decision|default:"—" }}
{% trans "Fastest" %}
{{ fastest_decision|default:"—" }}
{% trans "Slowest" %}
{{ slowest_decision|default:"—" }}
{# Aggregate counts #}

{% trans "Totals" %}

{% trans "Total requests" %}
{{ total_requests }}
{% trans "Total votes" %}
{{ total_votes }}
{% trans "Cases reviewed" %}
{{ total_items }}
{# Chart payload (consumed by charts.js) #} {# Charts #}

{% trans "Requests by state" %}

{% trans "Activity (last 30 days)" %}

{% trans "Top reviewers" %}

{% if not top_reviewers %}

{% trans "No votes cast yet." %}

{% endif %}

{% trans "Top requesters" %}

{% if not top_requesters %}

{% trans "No review requests yet." %}

{% endif %}
{# Detail tables (kept for copy/paste and a11y fallback) #}

{% trans "Requests by state (table)" %}

{% for label, count in by_state.items %} {% endfor %}
{% trans "State" %}{% trans "Count" %}
{{ label }} {{ count }}

{% trans "Top reviewers (table)" %}

{% if top_reviewers %}
{% for row in top_reviewers %} {% endfor %}
{% trans "Reviewer" %}{% trans "Votes cast" %}
{{ row.reviewer__username }} {{ row.vote_count }}
{% else %}

{% trans "No votes cast yet." %}

{% endif %}
{% endblock %}