go-bouquins/templates/index_books.html
2017-07-31 20:14:38 +02:00

30 lines
870 B
HTML

<table class="table table-striped">
<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>
{{ range . }}
<tr>
<td><span class="glyphicon glyphicon-book"></span>
<a href="/books/{{ .Id }}">{{ .Title }}</a></td>
<td>
{{ range .Authors }}
<span class="glyphicon glyphicon-user"></span>
<a href="/authors/{{ .Id }}">{{ .Name }}</a>
{{ end }}
</td>
<td>
{{ if .Series }}
<span class="glyphicon glyphicon-list"></span>
<a href="/series/{{ .Series.Id }}">{{ .Series.Name }}</a>
<span class="badge">{{ .Book.SeriesIndex }}</span>
{{ end }}
</td>
</tr>
{{ end }}
</table>