Styled book form and added an ux dropzone component.
This commit is contained in:
@@ -3,29 +3,40 @@
|
||||
{% block title %}Book index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Book index</h1>
|
||||
<div class="d-flex flex-row justify-content-between align-items-center">
|
||||
<div>
|
||||
<h1>Book index</h1>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{{ path('app_book_new') }}" class="btn btn-primary">Create new</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Cover</th>
|
||||
<th>Id</th>
|
||||
<th>Title</th>
|
||||
<th>Language</th>
|
||||
<th>Description</th>
|
||||
<th>Publisher</th>
|
||||
<th>Publish_date</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cover</th>
|
||||
<th>Id</th>
|
||||
<th>Title</th>
|
||||
<th>Language</th>
|
||||
<th>Description</th>
|
||||
<th>Publisher</th>
|
||||
<th>Publish_date</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for book in books %}
|
||||
<tr>
|
||||
<td>{% if file_exists(asset('book_covers/cover_' ~ book.id ~ '.jpg')) %}<img class="img-thumbnail" style="max-width: 80px" src="{{ asset('book_covers/cover_' ~ book.id ~ '.jpg' ) }}" /> {% endif %}</td>
|
||||
<td>{% if file_exists(asset('book_covers/cover_' ~ book.id ~ '.jpg')) %}<img class="img-thumbnail"
|
||||
style="max-width: 80px"
|
||||
src="{{ asset('book_covers/cover_' ~ book.id ~ '.jpg' ) }}" /> {% endif %}
|
||||
</td>
|
||||
<td>{{ book.id }}</td>
|
||||
<td>{{ book.Title }}</td>
|
||||
<td>{{ book.language }}</td>
|
||||
<td>{{ book.description }}</td>
|
||||
<td>{{ book.description | slice(0, 200) }}</td>
|
||||
<td>{{ book.publisher }}</td>
|
||||
<td>{{ book.publishDate ? book.publishDate|date('Y-m-d') : '' }}</td>
|
||||
<td>
|
||||
@@ -40,6 +51,4 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_book_new') }}">Create new</a>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user