Stats: Make date range dropdown blue when active

This commit is contained in:
rubenwardy 2023-06-15 09:00:11 +01:00
parent 2596253535
commit cb352fad47
3 changed files with 5 additions and 5 deletions

@ -30,9 +30,9 @@
{% 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">
{% macro render_daterange_selector(options, is_active) %}
<nav class="dropdown d-inline-block mr-2">
<button class="btn {% if is_active %}btn-primary{% else %}btn-secondary{% endif %} 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">

@ -17,7 +17,7 @@
<i class="fas fa-download mr-1"></i>
{{ _("Download (.csv)") }}
</a>
{{ render_daterange_selector(options) }}
{{ render_daterange_selector(options, start or end) }}
{{ render_package_selector(package.author, package=package) }}
</div>
<h2 class="mt-0">{{ _("Statistics") }}</h2>

@ -13,7 +13,7 @@
{% block content %}
<div class="float-right">
{{ render_daterange_selector(options) }}
{{ render_daterange_selector(options, start or end) }}
{{ render_package_selector(user, package=None) }}
</div>
<h2 class="mt-0">{{ self.title() }}</h2>