Stats: Add ability to select date range

This commit is contained in:
rubenwardy
2023-06-14 22:47:08 +01:00
parent 516361345e
commit 80c42637df
9 changed files with 102 additions and 22 deletions

View File

@@ -30,6 +30,20 @@
{% endmacro %}
{% macro render_daterange_selector(options) %}
<nav class="dropdown d-inline-block">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownDateRange" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ _("Date range...") }}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownDateRange">
{% for option in options %}
<a class="dropdown-item" href="{{ option[1] }}">{{ option[0] }}</a>
{% endfor %}
</div>
</nav>
{% endmacro %}
{% macro render_package_stats(source, downloads) %}
<noscript>
<p class="alert alert-danger">