snapshot: preserve dashboard filters and realtime search
This commit is contained in:
@@ -112,7 +112,7 @@
|
||||
{% endif %}
|
||||
|
||||
<section class="content-grid">
|
||||
<section class="table-card">
|
||||
<section class="table-card" id="vorgaenge">
|
||||
<div class="table-head">
|
||||
<div>
|
||||
<h2>{% trans "Vorgänge" %}</h2>
|
||||
@@ -123,14 +123,50 @@
|
||||
<div class="table-controls">
|
||||
<div class="table-controls-grid">
|
||||
<div class="control-stack">
|
||||
<form method="get" action="/requests/" class="search-form">
|
||||
<form method="get" action="/requests/#vorgaenge" class="search-form">
|
||||
<div class="search-box">
|
||||
<input type="search" name="q" value="{{ search_query }}" placeholder="{% trans "Nach Name oder E-Mail suchen" %}" aria-label="{% trans "Nach Name oder E-Mail suchen" %}" />
|
||||
</div>
|
||||
<div class="filter-grid">
|
||||
<div class="filter-field">
|
||||
<label for="type-filter">{% trans "Typ" %}</label>
|
||||
<select id="type-filter" name="type">
|
||||
<option value="">{% trans "Alle" %}</option>
|
||||
<option value="onboarding" {% if selected_type == 'onboarding' %}selected{% endif %}>{% trans "Onboarding" %}</option>
|
||||
<option value="offboarding" {% if selected_type == 'offboarding' %}selected{% endif %}>{% trans "Offboarding" %}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-field">
|
||||
<label for="status-filter">{% trans "Status" %}</label>
|
||||
<select id="status-filter" name="status">
|
||||
<option value="">{% trans "Alle" %}</option>
|
||||
{% for choice in status_choices %}
|
||||
<option value="{{ choice.value }}" {% if selected_status == choice.value %}selected{% endif %}>{{ choice.label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-field">
|
||||
<label for="department-filter">{% trans "Abteilung" %}</label>
|
||||
<select id="department-filter" name="department">
|
||||
<option value="">{% trans "Alle" %}</option>
|
||||
{% for department in departments %}
|
||||
<option value="{{ department }}" {% if selected_department == department %}selected{% endif %}>{{ department }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-field">
|
||||
<label for="date-from-filter">{% trans "Von" %}</label>
|
||||
<input id="date-from-filter" type="date" name="date_from" value="{{ date_from }}" />
|
||||
</div>
|
||||
<div class="filter-field">
|
||||
<label for="date-to-filter">{% trans "Bis" %}</label>
|
||||
<input id="date-to-filter" type="date" name="date_to" value="{{ date_to }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="intro-actions">
|
||||
<button class="btn btn-primary" type="submit">{% trans "Suchen" %}</button>
|
||||
{% if search_query %}
|
||||
<a class="btn btn-secondary" href="/requests/">{% trans "Zurücksetzen" %}</a>
|
||||
{% if has_filters %}
|
||||
<a class="btn btn-secondary" href="/requests/#vorgaenge">{% trans "Zurücksetzen" %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user