2016-12-18 17:28:19 +00:00
|
|
|
<!DOCTYPE html>
|
2016-12-30 18:14:44 +00:00
|
|
|
<html lang="fr">
|
2016-12-18 17:28:19 +00:00
|
|
|
<head>
|
2016-12-30 16:16:43 +00:00
|
|
|
<title>Bouquins</title>
|
2016-12-30 17:46:03 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
2016-12-18 17:28:19 +00:00
|
|
|
<meta charset="utf-8" />
|
2017-01-01 16:05:27 +00:00
|
|
|
<link rel="stylesheet" href="css/bootstrap.min.css">
|
|
|
|
<link rel="preload" href="js/index.min.js" as="script">
|
|
|
|
<link rel="preload" href="js/vue.min.js" as="script">
|
|
|
|
<link rel="prefetch" href="js/index.min.js">
|
|
|
|
<link rel="prefetch" href="js/vue.min.js">
|
2016-12-18 17:28:19 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2017-01-14 16:38:40 +00:00
|
|
|
<nav class="navbar navbar-inverse" id="nav">
|
|
|
|
<div class="container">
|
|
|
|
<ul class="nav navbar-nav">
|
|
|
|
<li class="active"><a href="#">Accueil</a></li>
|
|
|
|
<li><a href="search.html">Recherche</a></li>
|
|
|
|
<li><a href="#">A propos</a></li>
|
|
|
|
</ul>
|
|
|
|
<form class="navbar-form navbar-right" role="search" method="get" action="search.html">
|
|
|
|
<div class="form-group">
|
|
|
|
<input name="q" type="text" class="form-control" placeholder="Recherche">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</nav>
|
2016-12-30 18:14:44 +00:00
|
|
|
<div class="container" id="app">
|
|
|
|
<div class="jumbotron">
|
|
|
|
<h1>Bouquins</h1>
|
|
|
|
<p>Cette bibliothèque contient actuellement <strong>{{ booksCount }}</strong> livres et BD en format papier ou électronique.</p>
|
2017-01-07 11:42:52 +00:00
|
|
|
<button class="btn btn-primary" type="button" @click="showBooks">Livres</button>
|
2017-01-07 18:13:27 +00:00
|
|
|
<button class="btn btn-primary" type="button" @click="showAuthors">Auteurs</button>
|
2017-01-08 16:15:01 +00:00
|
|
|
<button class="btn btn-primary" type="button" @click="showSeries">Series</button>
|
2016-12-31 09:31:48 +00:00
|
|
|
</div>
|
2017-01-08 16:15:01 +00:00
|
|
|
<div class="table-responsive" v-if="books.length > 0 || authors.length > 0 || series.length > 0">
|
2016-12-31 16:19:47 +00:00
|
|
|
<nav aria-label="Pages">
|
|
|
|
<ul class="pager">
|
|
|
|
<li class="previous" v-bind:class="{ disabled: page <= 1 }"><a href="#" @click="prevPage"><span aria-hidden="true">←</span> Précédents</a></li>
|
|
|
|
<li class="next"><a href="#" @click="nextPage">Suivants <span aria-hidden="true">→</span></a></li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2017-01-08 16:15:01 +00:00
|
|
|
<table class="table table-striped" v-if="series.length > 0">
|
|
|
|
<tr>
|
2017-01-13 20:17:07 +00:00
|
|
|
<th>
|
|
|
|
<a href="#" @click="sortBy('name')">Nom</a>
|
|
|
|
<span v-if="sort_by == 'name'" :class="['glyphicon', { 'glyphicon-chevron-up': order_desc , 'glyphicon-chevron-down': !order_desc}]"></span>
|
|
|
|
</th>
|
2017-01-08 16:15:01 +00:00
|
|
|
<th>Livre(s)</th>
|
|
|
|
<th>Auteur(s)</th>
|
|
|
|
</tr>
|
|
|
|
<tr v-for="serie in series">
|
|
|
|
<td>
|
|
|
|
<span class="glyphicon glyphicon-list"></span>
|
|
|
|
<a :href="'series.html?id='+serie.id">{{ serie.name }}</a>
|
|
|
|
</td>
|
|
|
|
<td>{{ serie.count }}</td>
|
|
|
|
<td>
|
|
|
|
<template v-for="author in serie.authors">
|
|
|
|
<span class="glyphicon glyphicon-user"></span>
|
|
|
|
<a :href="'author.html?id='+author.id">{{ author.name }}</a>
|
|
|
|
</template>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2017-01-07 11:27:59 +00:00
|
|
|
<table class="table table-striped" v-if="authors.length > 0">
|
|
|
|
<tr>
|
2017-01-13 20:17:07 +00:00
|
|
|
<th>
|
|
|
|
<a href="#" @click="sortBy('name')">Nom</a>
|
|
|
|
<span v-if="sort_by == 'name'" :class="['glyphicon', { 'glyphicon-chevron-up': order_desc , 'glyphicon-chevron-down': !order_desc}]"></span>
|
|
|
|
</th>
|
2017-01-07 18:13:27 +00:00
|
|
|
<th>Livre(s)</th>
|
2017-01-07 11:27:59 +00:00
|
|
|
</tr>
|
|
|
|
<tr v-for="author in authors">
|
2017-01-07 20:19:45 +00:00
|
|
|
<td>
|
|
|
|
<span class="glyphicon glyphicon-user"></span>
|
|
|
|
<a :href="'author.html?id='+author.id">{{ author.name }}</a>
|
|
|
|
</td>
|
2017-01-07 18:13:27 +00:00
|
|
|
<td>{{ author.count }}</td>
|
2017-01-07 11:27:59 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<table class="table table-striped" v-if="books.length > 0">
|
2016-12-30 18:14:44 +00:00
|
|
|
<tr>
|
2017-01-13 20:17:07 +00:00
|
|
|
<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>
|
2016-12-30 18:14:44 +00:00
|
|
|
<th>Auteur(s)</th>
|
2016-12-31 09:31:48 +00:00
|
|
|
<th>Serie</th>
|
2016-12-30 18:14:44 +00:00
|
|
|
</tr>
|
|
|
|
<tr v-for="book in books">
|
2017-01-07 20:19:45 +00:00
|
|
|
<td><span class="glyphicon glyphicon-book"></span>
|
|
|
|
<a :href="'book.html?id='+book.id">{{ book.title }}</a></td>
|
2016-12-30 18:14:44 +00:00
|
|
|
<td>
|
|
|
|
<template v-for="author in book.authors">
|
2017-01-07 20:19:45 +00:00
|
|
|
<span class="glyphicon glyphicon-user"></span>
|
|
|
|
<a :href="'author.html?id='+author.id">{{ author.name }}</a>
|
2016-12-30 18:14:44 +00:00
|
|
|
</template>
|
|
|
|
</td>
|
2016-12-31 09:31:48 +00:00
|
|
|
<td>
|
2016-12-31 09:39:32 +00:00
|
|
|
<template v-if="book.series">
|
2017-01-08 16:15:01 +00:00
|
|
|
<span class="glyphicon glyphicon-list"></span>
|
|
|
|
<a :href="'series.html?id='+book.series.id">{{ book.series.name }}</a>
|
2016-12-31 09:39:32 +00:00
|
|
|
<span class="badge">{{ book.series ? book.series.idx : '' }}</span>
|
|
|
|
</template>
|
2016-12-31 09:31:48 +00:00
|
|
|
</td>
|
2016-12-30 18:14:44 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2017-01-14 08:22:18 +00:00
|
|
|
<nav aria-label="Pages">
|
|
|
|
<ul class="pager">
|
|
|
|
<li class="previous" v-bind:class="{ disabled: page <= 1 }"><a href="#" @click="prevPage"><span aria-hidden="true">←</span> Précédents</a></li>
|
|
|
|
<li class="next"><a href="#" @click="nextPage">Suivants <span aria-hidden="true">→</span></a></li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2016-12-30 18:14:44 +00:00
|
|
|
</div>
|
2016-12-30 17:18:11 +00:00
|
|
|
</div>
|
2017-01-01 16:05:27 +00:00
|
|
|
<script src="js/vue.min.js"></script>
|
|
|
|
<script src="js/index.min.js"></script>
|
2016-12-18 17:28:19 +00:00
|
|
|
</body>
|
|
|
|
</html>
|