Add migration and books
This commit is contained in:
@@ -5,8 +5,27 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for item in items %}
|
||||
<li><a class="dropdown-item" href="{{ item.1 }}">{{ item.0 }}</a></li>
|
||||
<li><a class="dropdown-item" href="{{ item.1 }}">{{ item.0 }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro book_dropdown_button(book, show = true) %}
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Actions
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% if show %}
|
||||
<li><a class="dropdown-item" href="/books/{{ book.id }}">Voir</a></li>
|
||||
{% endif %}
|
||||
<li><a class="dropdown-item" href="/books/{{ book.id }}/edit">Edit</a></li>
|
||||
<li>
|
||||
<form method="post" action="/books/{{ book.id }}/delete">
|
||||
<input class="dropdown-item" type="submit" value="Delete">
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user