mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 22:47:36 +01:00
Stats: Make date range dropdown blue when active
This commit is contained in:
parent
2596253535
commit
cb352fad47
@ -30,9 +30,9 @@
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
{% macro render_daterange_selector(options) %}
|
{% macro render_daterange_selector(options, is_active) %}
|
||||||
<nav class="dropdown d-inline-block">
|
<nav class="dropdown d-inline-block mr-2">
|
||||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownDateRange" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<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...") }}
|
{{ _("Date range...") }}
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownDateRange">
|
<div class="dropdown-menu" aria-labelledby="dropdownDateRange">
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<i class="fas fa-download mr-1"></i>
|
<i class="fas fa-download mr-1"></i>
|
||||||
{{ _("Download (.csv)") }}
|
{{ _("Download (.csv)") }}
|
||||||
</a>
|
</a>
|
||||||
{{ render_daterange_selector(options) }}
|
{{ render_daterange_selector(options, start or end) }}
|
||||||
{{ render_package_selector(package.author, package=package) }}
|
{{ render_package_selector(package.author, package=package) }}
|
||||||
</div>
|
</div>
|
||||||
<h2 class="mt-0">{{ _("Statistics") }}</h2>
|
<h2 class="mt-0">{{ _("Statistics") }}</h2>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
{{ render_daterange_selector(options) }}
|
{{ render_daterange_selector(options, start or end) }}
|
||||||
{{ render_package_selector(user, package=None) }}
|
{{ render_package_selector(user, package=None) }}
|
||||||
</div>
|
</div>
|
||||||
<h2 class="mt-0">{{ self.title() }}</h2>
|
<h2 class="mt-0">{{ self.title() }}</h2>
|
||||||
|
Loading…
Reference in New Issue
Block a user