Feat: Enable bookmark toggling from overview, improve disposition detail

This commit is contained in:
Björn Fromme
2023-10-20 18:26:25 +02:00
parent 30ce617cf7
commit 69a6e0a0b6
8 changed files with 68 additions and 29 deletions
+7 -1
View File
@@ -8,7 +8,7 @@
</h1>
<div class="grid sm:grid-cols-2 md:grid-cols-3 gap-4 pb-4">
{% for assignment in pagination %}
<div class="flex flex-col justify-between rounded-md border border-gray-200 bg-gray-100 p-4">
<div class="relative flex flex-col justify-between rounded-md border border-gray-200 bg-gray-100 p-4">
<div class="flex flex-col space-y-2 pb-2">
<div class="flex items-start space-x-2">
{{ icon('flag-' ~ assignment.destination.country, 'w-5 h-5 shrink-0') }}
@@ -56,6 +56,12 @@
<span>{{ label }}</span>
</a>
</div>
{% set isBookmarked = teamer.bookmarks.contains(assignment) %}
<a href="{{ path('app_teamer_bookmark_toggle', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="absolute top-0 right-0 mt-2 mr-2"
title="{{ isBookmarked ? 'Von der Merkliste löschen' : 'Auf die Merkliste setzen' }}">
{{ icon('star', html_classes('w-5 h-5', { 'text-yellow-500': isBookmarked, 'text-gray-200': not isBookmarked } )) }}
</a>
</div>
{% else %}
... ist leer