Display author book count
This commit is contained in:
parent
74ab124903
commit
0caf6f03d2
@ -16,7 +16,7 @@
|
|||||||
<h1>Bouquins</h1>
|
<h1>Bouquins</h1>
|
||||||
<p>Cette bibliothèque contient actuellement <strong>{{ booksCount }}</strong> livres et BD en format papier ou électronique.</p>
|
<p>Cette bibliothèque contient actuellement <strong>{{ booksCount }}</strong> livres et BD en format papier ou électronique.</p>
|
||||||
<button class="btn btn-primary" type="button" @click="showBooks">Livres</button>
|
<button class="btn btn-primary" type="button" @click="showBooks">Livres</button>
|
||||||
<button class="btn btn-primary" type="button" @click="showAuthors">Authors</button>
|
<button class="btn btn-primary" type="button" @click="showAuthors">Auteurs</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive" v-if="books.length > 0 || authors.length > 0">
|
<div class="table-responsive" v-if="books.length > 0 || authors.length > 0">
|
||||||
<nav aria-label="Pages">
|
<nav aria-label="Pages">
|
||||||
@ -27,12 +27,12 @@
|
|||||||
</nav>
|
</nav>
|
||||||
<table class="table table-striped" v-if="authors.length > 0">
|
<table class="table table-striped" v-if="authors.length > 0">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Id</th>
|
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
|
<th>Livre(s)</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="author in authors">
|
<tr v-for="author in authors">
|
||||||
<td>{{ author.id }}</td>
|
<td><span class="glyphicon glyphicon-user"></span>{{ author.name }}</td>
|
||||||
<td>{{ author.name }}</td>
|
<td>{{ author.count }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table class="table table-striped" v-if="books.length > 0">
|
<table class="table table-striped" v-if="books.length > 0">
|
||||||
|
Loading…
Reference in New Issue
Block a user