diff --git a/src/Controller/Teamer/Bookmark/IndexController.php b/src/Controller/Teamer/Bookmark/IndexController.php index e8c873a..90c6627 100644 --- a/src/Controller/Teamer/Bookmark/IndexController.php +++ b/src/Controller/Teamer/Bookmark/IndexController.php @@ -43,6 +43,7 @@ class IndexController extends AbstractController ); return $this->render('teamer/bookmark/index.html.twig', [ + 'teamer' => $teamer, 'pagination' => $pagination, ]); } diff --git a/src/Entity/Upload.php b/src/Entity/Upload.php index c10032e..2bd5cdf 100644 --- a/src/Entity/Upload.php +++ b/src/Entity/Upload.php @@ -85,6 +85,11 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface return $instance; } + public function __toString() + { + return $this->getDisplayName() ?? $this->getOriginalFilename(); + } + public function getId(): ?int { return $this->id; diff --git a/templates/teamer/bookmark/index.html.twig b/templates/teamer/bookmark/index.html.twig index f7a2f7a..9833eed 100644 --- a/templates/teamer/bookmark/index.html.twig +++ b/templates/teamer/bookmark/index.html.twig @@ -8,7 +8,7 @@
{% for assignment in pagination %} -
+
{{ icon('flag-' ~ assignment.destination.country, 'w-5 h-5 shrink-0') }} @@ -56,6 +56,12 @@ {{ label }}
+ {% set isBookmarked = teamer.bookmarks.contains(assignment) %} + + {{ icon('star', html_classes('w-5 h-5', { 'text-yellow-500': isBookmarked, 'text-gray-200': not isBookmarked } )) }} +
{% else %} ... ist leer diff --git a/templates/teamer/disposition/_table.html.twig b/templates/teamer/disposition/_list.html.twig similarity index 92% rename from templates/teamer/disposition/_table.html.twig rename to templates/teamer/disposition/_list.html.twig index 6339849..2a64d3a 100644 --- a/templates/teamer/disposition/_table.html.twig +++ b/templates/teamer/disposition/_list.html.twig @@ -31,9 +31,6 @@ {{ icon('info', 'w-4 h-4 shrink-0') }} Details - {% if teamer.bookmarks.contains(assignment) %} - {{ icon('star', 'w-5 h-5 text-yellow-500 absolute top-0 right-0 mt-2 mr-2') }} - {% endif %}
{% endfor %}
diff --git a/templates/teamer/disposition/detail.html.twig b/templates/teamer/disposition/detail.html.twig index b827bbe..2917f01 100644 --- a/templates/teamer/disposition/detail.html.twig +++ b/templates/teamer/disposition/detail.html.twig @@ -10,35 +10,62 @@ {% endmacro %} {% block content %} + {% set assignment = disposition.assignment %}

Einsatzdetails

-
- {% set assignment = disposition.assignment %} - {% include '_partials/_assignment_info.html.twig' %} -
-

+

Dein Einsatz wurde bestätigt!

-

+

Dein Ansprechpartner für alle reisebezogenen Themen ist: -
- {{ assignment.contact }}, {{ assignment.contact.email }} -

-

- - Hier kannst du den Einsatz in deinen Kalender eintragen (ICS). +

+ + + {% if disposition.assignment.documents|length %} +

+ Dokumente +

+ + {% endif %} +
+ {% include '_partials/_assignment_info.html.twig' %} +
+
+
{# Upload contract #} {% if workflow_has_marked_place(disposition, 'new') %} +

+ Honorarvertrag +

{% if workflow_can(disposition, 'upload_contract') %} -

- Hier findest du deinen Honorarvertrag -

Honorarvertrag @@ -68,10 +95,10 @@ {# Upload invoice #} {% if workflow_has_marked_place(disposition, 'confirmed') %} +

+ Honorarnote +

{% if workflow_can(disposition, 'upload_invoice') %} -

- Hier findest du deine Honorarnote -

- {% if teamer.bookmarks.contains(assignment) %} - {{ icon('star', 'w-5 h-5 text-yellow-500 absolute top-0 right-0 mt-2 mr-2') }} - {% endif %} + {% set isBookmarked = teamer.bookmarks.contains(assignment) %} + + {{ icon('star', html_classes('w-5 h-5', { 'text-yellow-500': isBookmarked, 'text-gray-200': not isBookmarked } )) }} +
{% endfor %}