mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
- fixes https://github.com/boostorg/website-v2/issues/1285 - Use a django tag to render an avatar component.
88 lines
2.4 KiB
HTML
88 lines
2.4 KiB
HTML
{% extends "admin/base_site.html" %}
|
|
{% load static avatar_tags %}
|
|
{% block extrahead %}
|
|
<link href="{% static 'css/styles.css' %}" rel="stylesheet" />
|
|
{% endblock extrahead %}
|
|
{% block content %}
|
|
{{ block.super }}
|
|
<div class='container mx-auto'>
|
|
<h1>
|
|
{{ object.name }} Stats
|
|
</h1>
|
|
|
|
<div class="flex gap-x-4 flex-wrap">
|
|
<div>
|
|
<h3 class="mb-2">
|
|
Commit Count By Release
|
|
</h3>
|
|
<div class="flex flex-col gap-y-1">
|
|
{% for release in commits_per_release %}
|
|
<div>
|
|
{{ release.version_name }}: {{ release.count }}
|
|
</div>
|
|
{% endfor %}
|
|
<div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 class="mb-2">
|
|
Top Contributors Overall
|
|
</h3>
|
|
<div class="flex flex-col gap-y-1">
|
|
{% for author in commits_per_author %}
|
|
<div class="flex gap-x-1">
|
|
{% avatar commitauthor=author %}
|
|
<div>
|
|
{{ author.name }}: {{ author.count }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 class="mb-2">
|
|
Top 3 Contributors Per Release
|
|
</h3>
|
|
<div class="flex flex-col gap-y-1">
|
|
{% for item in commits_per_author_release %}
|
|
{% ifchanged item.version__name %}
|
|
<h3 class="my-2">
|
|
{{ item.version__name }}
|
|
</h3>
|
|
<hr>
|
|
{% endifchanged %}
|
|
<div class="flex gap-x-1">
|
|
{% base_avatar name=item.commit__author__name image_url=item.commit__author__avatar_url href=None %}
|
|
<div>
|
|
{{ item.commit__author__name }}: {{ item.count }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 class="mb-2">
|
|
New Contributors Per Release
|
|
</h3>
|
|
<div class="flex flex-col gap-y-1">
|
|
{% for lv in new_contributor_counts %}
|
|
<div class="grid grid-cols-2 gap-2">
|
|
<div>
|
|
{{ lv.version.display_name }}
|
|
</div>
|
|
<div>
|
|
{{ lv.count }} new contributors ({{ lv.up_to_count }} total)
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
{% endblock content %}
|