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 %}
|
2022-11-09 19:58:58 +01:00
|
|
|
<div class="float-right">
|
|
|
|
<a class="btn btn-secondary mr-2" href="{{ package.getURL('packages.stats_csv') }}">
|
|
|
|
<i class="fas fa-download mr-1"></i>
|
|
|
|
{{ _("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-15 09:45:28 +02:00
|
|
|
{{ render_package_stats(package.getURL('api.package_stats', start=start, end=end), package.downloads, start or end) }}
|
2022-11-06 18:58:35 +01:00
|
|
|
{% endblock %}
|