go-bouquins/templates/index_books.html

28 lines
1.0 KiB
HTML
Raw Normal View History

2017-08-05 09:16:19 +00:00
<table id="books" class="table table-striped" v-if="books.length > 0">
2017-07-31 18:14:38 +00:00
<tr>
<th>
<a href="#" @click="sortBy('title')">Nom</a>
<span v-if="sort_by == 'title'" :class="['glyphicon', { 'glyphicon-chevron-up': order_desc , 'glyphicon-chevron-down': !order_desc}]"></span>
</th>
<th>Auteur(s)</th>
<th>Serie</th>
</tr>
2017-08-05 09:16:19 +00:00
<tr v-for="book in books">
2017-07-31 18:14:38 +00:00
<td><span class="glyphicon glyphicon-book"></span>
2017-08-05 09:16:19 +00:00
<a :href="'/books/'+book.id">{{ "{{" }} book.title {{ "}}" }}</a></td>
2017-07-31 18:14:38 +00:00
<td>
2017-08-05 09:16:19 +00:00
<template v-for="author in book.authors">
2017-07-31 18:14:38 +00:00
<span class="glyphicon glyphicon-user"></span>
2017-08-05 09:16:19 +00:00
<a :href="'/authors/'+author.id">{{ "{{" }} author.name {{ "}}" }}</a>
</template>
2017-07-31 18:14:38 +00:00
</td>
<td>
2017-08-05 09:16:19 +00:00
<template v-if="book.series">
<span class="glyphicon glyphicon-list"></span>
<a :href="'/series/'+book.series.id">{{ "{{" }} book.series.name {{ "}}" }}</a>
<span class="badge">{{ "{{" }} book.series ? book.series.idx : '' {{ "}}" }}</span>
</template>
2017-07-31 18:14:38 +00:00
</td>
</tr>
</table>