futtern/templates/food_vendor/show.html.twig
lubiana 994d837de9
All checks were successful
/ ls (pull_request) Successful in 1m38s
/ ls (push) Successful in 1m34s
better readable forms
2025-07-07 18:22:30 +02:00

50 lines
1.6 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}FoodVendor{% endblock %}
{% block body %}
<h1 class="mb-4">FoodVendor</h1>
<table class="table table-bordered w-auto">
<tbody>
<tr>
<th>Name</th>
<td>{{ food_vendor.name }}</td>
</tr>
<tr>
<th>Menu</th>
<td><a href="{{ food_vendor.menuLink }}" target="_blank">{{ food_vendor.menuLink }}</a></td>
</tr>
</tbody>
</table>
<section class="mb-4">
<h2>known menuitems</h2>
<table class="table table-bordered w-auto">
<thead>
<tr>
<th>name</th>
<th>price</th>
</tr>
</thead>
<tbody>
{% for item in food_vendor.menuItems %}
<tr class="menu-item">
<td>
<a href="{{ path('app_menu_item_show', {'id': item.id}) }}">{{ item.name }}</a>
{% if(item.aliasOf) %}
<span class="text-muted">(alias of: {{ item.aliasOf.name }})</span>
{% endif %}
</td>
<td>{{ (item.priceCents / 100)|format_currency('EUR') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
<div class="d-flex gap-2">
<a class="btn btn-secondary" href="{{ path('app_food_vendor_index') }}">back to list</a>
<a class="btn btn-primary" href="{{ path('app_food_vendor_edit', {'id': food_vendor.id}) }}">edit</a>
</div>
{% endblock %}