2022-11-06 18:58:35 +01:00
|
|
|
{% extends "packages/package_base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2022-11-06 19:51:33 +01:00
|
|
|
{{ _("Statistics") }} - {{ package.title }}
|
2022-11-06 18:58:35 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2023-06-14 23:47:08 +02:00
|
|
|
{% from "macros/stats.html" import render_package_stats, render_package_stats_js,
|
|
|
|
render_package_selector, render_daterange_selector with context %}
|
2022-11-09 19:47:44 +01:00
|
|
|
|
2022-11-06 18:58:35 +01:00
|
|
|
{% block scriptextra %}
|
2022-11-09 19:47:44 +01:00
|
|
|
{{ render_package_stats_js() }}
|
2022-11-06 18:58:35 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2023-08-22 20:58:43 +02:00
|
|
|
<div class="float-end">
|
|
|
|
<a class="btn btn-secondary me-2" href="{{ package.get_url('packages.stats_csv') }}">
|
|
|
|
<i class="fas fa-download me-1"></i>
|
2022-11-09 19:58:58 +01:00
|
|
|
{{ _("Download (.csv)") }}
|
|
|
|
</a>
|
2023-06-15 10:00:11 +02:00
|
|
|
{{ render_daterange_selector(options, start or end) }}
|
2022-11-09 19:58:58 +01:00
|
|
|
{{ render_package_selector(package.author, package=package) }}
|
|
|
|
</div>
|
2022-11-06 19:51:33 +01:00
|
|
|
<h2 class="mt-0">{{ _("Statistics") }}</h2>
|
2023-06-18 22:56:19 +02:00
|
|
|
{{ render_package_stats(package.get_url('api.package_stats', start=start, end=end), package.downloads, start or end) }}
|
2022-11-06 18:58:35 +01:00
|
|
|
{% endblock %}
|