feat: replace some partials with twig components
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
<span>{{ application.teamer }}</span>
|
||||
{{ icon('info', 'w-4 h-4') }}
|
||||
</button>
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': application.teamer } %}
|
||||
<twig:RatingStars averageRating="{{ application.teamer.averageRating }}" />
|
||||
</td>
|
||||
<td>
|
||||
{{ application.pickup|bpn_pickup_label|default('-') }}
|
||||
@@ -138,7 +138,7 @@
|
||||
<span>{{ disposition.teamer }}</span>
|
||||
{{ icon('info', 'w-4 h-4') }}
|
||||
</button>
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': disposition.teamer } %}
|
||||
<twig:RatingStars averageRating="{{ disposition.teamer.averageRating }}" />
|
||||
</td>
|
||||
<td>
|
||||
{{ disposition.remarks|nl2br|default('-') }}
|
||||
|
||||
@@ -149,40 +149,38 @@
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
<span class="whitespace-nowrap">{{ disposition.teamer }}</span>
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': disposition.teamer } %}
|
||||
<twig:RatingStars averageRating="{{ disposition.teamer.averageRating }}" />
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
{% embed '_partials/_dropdown.html.twig' %}
|
||||
{% block items %}
|
||||
<button type="button"
|
||||
class="text-red-500 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
hx-get="{{ path('app_administrative_assignment_delete', { 'uuid': assignment.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
löschen
|
||||
</button>
|
||||
<a href="{{ path('app_administrative_assignment_duplicate', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
<twig:DropDown>
|
||||
<button type="button"
|
||||
class="text-red-500 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
hx-get="{{ path('app_administrative_assignment_delete', { 'uuid': assignment.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
löschen
|
||||
</button>
|
||||
<a href="{{ path('app_administrative_assignment_duplicate', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
|
||||
role="menuitem"
|
||||
tabindex="-1">
|
||||
duplizieren
|
||||
</a>
|
||||
{% if is_granted('EDIT', assignment) %}
|
||||
<a href="{{ path('app_administrative_assignment_edit', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
|
||||
role="menuitem"
|
||||
tabindex="-1">
|
||||
duplizieren
|
||||
bearbeiten
|
||||
</a>
|
||||
{% if is_granted('EDIT', assignment) %}
|
||||
<a href="{{ path('app_administrative_assignment_edit', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
|
||||
role="menuitem"
|
||||
tabindex="-1">
|
||||
bearbeiten
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
{% endif %}
|
||||
</twig:DropDown>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
{{ icon('user', 'w-10 h-10 text-gray-200') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': teamer } %}
|
||||
<twig:RatingStars averageRating="{{ teamer.averageRating }}" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
{{ icon('user', 'w-32 h-32 text-gray-200') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': teamer } %}
|
||||
<twig:RatingStars averageRating="{{ teamer.averageRating }}"/>
|
||||
<ul class="pb-8 divide-y divide-gray-200">
|
||||
{% if teamer.communication.phone %}
|
||||
<li class="py-2">
|
||||
|
||||
Reference in New Issue
Block a user