Files
fet2020/fet2020/templates/finance/resolution_list.html
2025-07-16 22:33:12 +02:00

126 lines
6.3 KiB
HTML

{% extends "base.html" %}
{% block title %}Beschlusssammlung{% endblock %}
{% block content %}
<!-- Main Content -->
<main class="container mx-auto w-full px-4 my-8 flex-1 max-w-5xl">
<h1 class="page-title">Beschlusssammlung</h1>
<a href="{% url 'finance:resolution_create' %}" class="page-subtitle block btn-small btn-primary max-w-xs mx-auto sm:w-max sm:mr-0 sm:ml-auto">
<i class="fa-solid fa-plus mr-1"></i> Beschluss eingeben
</a>
<form action="" method="GET">
<div class="grid grid-cols-1 sm:gap-x-6 gap-x-0 gap-y-6 lg:grid-cols-6 sm:grid-cols-3 pb-6 lg:pt-0 pt-4">
<button
id="filterDropdownButton"
data-dropdown-toggle="filterDropdown"
class="w-full md:w-auto flex items-center justify-center py-2 px-4 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"
type="button"
>
<i class="h-4 w-4 mr-2 fa-solid fa-filter"></i>
Filter
<i class="-mr-1 ml-1.5 mt-1 w-5 h-5 fa-solid fa-chevron-down"></i>
</button>
<div id="filterDropdown" class="z-10 hidden w-56 p-3 bg-white rounded-lg shadow dark:bg-gray-700">
<h6 class="mb-3 text-sm font-medium text-gray-900 dark:text-white">Beschluss</h6>
<ul class="space-y-2 text-sm" aria-labelledby="filterDropdownButton">
{% for option in options %}
<li class="flex items-center">
<input
id="item_{{ forloop.counter0 }}"
type="checkbox"
name="options"
value="{{ option.1 }}"
{% for selected_option in selected_options %}
{% if selected_option in option.1 %}
checked
{% endif %}
{% endfor %}
class="w-4 h-4 bg-gray-100 border-gray-300 rounded text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500"
>
<label for="item_{{ forloop.counter0 }}" class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-100">{{ option.1 }}</label>
</li>
{% endfor %}
</ul>
</div>
<div class="col-span-2">
<input
type="text"
name="q"
value="{{ q }}"
placeholder="Suche"
class="w-full h-full"
autofocus
>
</div>
<button type="submit" class="block btn btn-primary" name="" value="Submit">Anwenden</button>
</div>
<div class="mx-auto max-w-5xl">
<div class="overflow-x-scroll shadow rounded">
<table class="w-full">
<thead>
<tr>
<th class="text-left">Nummer</th>
<th class="text-left">Bezeichnung</th>
<th class="text-left">Abstimmungsverhalten</th>
<th class="text-left">Beschluss</th>
<th></th>
</tr>
</thead>
<tbody>
{% for result in object_list %}
<tr>
<td class="text-right">{{ result.id }}</td>
<td class="text-blue-700 dark:text-blue-200 no-underline hover:underline"><a href="{% url 'finance:resolution_detail' result.id %}">{{ result.name }}</a></td>
<td class="text-left">{{ result.voting }}</td>
<td class="text-left">{{ result.get_option_display }}</td>
<td>
<a href="{% url 'finance:resolution_update' result.id %}" class="btn btn-small btn-tertiary"><i class="fa-solid fa-pen-to-square" aria-label="Bearbeiten" title="Bearbeiten"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="mt-4 w-full flex flex-col-reverse sm:flex-row gap-y-4 justify-between items-center">
<div class="flex items-center gap-2">
<label for="displaySelector" class="text-gray-700 dark:text-gray-300">Anzeigen:</label>
<select id="displaySelector" name="paginate_by" class="text-sm">
{% for elem in per_page_values %}
<option
value={{ elem }}
{% if per_page == elem %}
selected
{% endif %}
>{{ elem }}</option>
{% endfor %}
</select>
<button type="submit" class="btn btn-small btn-primary" name="" value="Submit"><i class="fa-solid fa-arrows-rotate"></i></button>
</div>
{% if is_paginated %}
<div class="pagination pagination-container">
{% if page_obj.has_previous %}
<a href="{{ prev_page }}"><i class="fa-solid fa-arrow-left" aria-label="Eine Seite zurück"></i> Zurück</a>
<a href="{{ first_page }}">1</a>
{% endif %}
<a href="#" class="active">{{ page_obj.number }}</a>
{% if page_obj.has_next %}
<a href="{{ last_page }}">{{ page_obj.paginator.num_pages }}</a>
<a href="{{ next_page }}">Vor <i class="fa-solid fa-arrow-right" aria-label="Eine Seite vor"></i></a>
{% endif %}
</div>
{% endif %}
</div>
</div>
</form>
</main>
{% endblock content %}