mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 13:08:19 -04:00
added van api and front end
This commit is contained in:
15
python/van_inventory/templates/partials/meal_rows.html
Normal file
15
python/van_inventory/templates/partials/meal_rows.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Name</th><th>Ingredients</th><th>Instructions</th><th></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for meal in meals %}
|
||||
<tr>
|
||||
<td><a href="/meals/{{ meal.id }}">{{ meal.name }}</a></td>
|
||||
<td>{{ meal.ingredients | length }}</td>
|
||||
<td>{{ (meal.instructions or "")[:50] }}</td>
|
||||
<td><button class="danger" hx-delete="/meals/{{ meal.id }}" hx-target="#meal-list" hx-swap="innerHTML" hx-confirm="Delete {{ meal.name }}?">X</button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user