contentdb/app/templates/packages/stats.html

26 lines
854 B
HTML
Raw Normal View History

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 %}
{% 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 %}
<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>
{{ render_daterange_selector(options) }}
{{ render_package_selector(package.author, package=package) }}
</div>
2022-11-06 19:51:33 +01:00
<h2 class="mt-0">{{ _("Statistics") }}</h2>
{{ 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 %}