go-bouquins/templates/author.html

61 lines
1.9 KiB
HTML
Raw Normal View History

2017-07-30 16:09:27 +00:00
{{ template "header.html" . }}
2017-08-04 16:57:15 +00:00
<div class="container" id="author">
2017-08-03 18:36:46 +00:00
{{ if .Id }}
<div class="page-header">
2017-07-30 16:09:27 +00:00
<h1>
<span class="glyphicon glyphicon-user"></span>
2017-08-03 18:36:46 +00:00
{{ .Name }}
2017-07-30 16:09:27 +00:00
</h1>
</div>
<ul class="nav nav-pills">
<li role="presentation" :class="{ active: tab == 'books' }"><a href="#" @click="showBooks">Livres</a></li>
2017-08-04 16:57:15 +00:00
{{ if gt (len .Series) 0 }}
2017-08-03 18:36:46 +00:00
<li role="presentation" :class="{ active: tab == 'series' }"><a href="#" @click="showSeries">Series</a></li>
2017-08-04 16:57:15 +00:00
{{ end }}
{{ if gt (len .CoAuthors) 0 }}
2017-08-03 18:36:46 +00:00
<li role="presentation" :class="{ active: tab == 'authors' }"><a href="#" @click="showAuthors">Co-auteurs</a></li>
2017-08-04 16:57:15 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
</ul>
<div class="panel panel-default" :class="{ hidden: tab != 'books' }">
<div class="panel-body">
2017-08-03 18:36:46 +00:00
{{ range .Books }}
<ul class="list-unstyled">
2017-07-30 16:09:27 +00:00
<li><span class="glyphicon glyphicon-book"></span>
2017-08-03 18:36:46 +00:00
<a href="/books/{{ .Id }}">{{ .Title }}</a>
2017-07-30 16:09:27 +00:00
</li>
2017-07-30 13:39:20 +00:00
</ul>
2017-08-03 18:36:46 +00:00
{{ end }}
2017-07-30 13:39:20 +00:00
</div>
2017-07-30 16:09:27 +00:00
</div>
2017-08-04 16:57:15 +00:00
{{ if gt (len .Series) 0 }}
2017-07-30 16:09:27 +00:00
<div class="panel panel-default" :class="{ hidden: tab != 'series' }">
<div class="panel-body">
2017-08-04 16:57:15 +00:00
{{ range .Series }}
2017-08-03 18:36:46 +00:00
<ul class="list-unstyled">
2017-07-30 16:09:27 +00:00
<li><span class="glyphicon glyphicon-list"></span>
2017-08-03 18:36:46 +00:00
<a href="/series/{{ .Id }}">{{ .Name }}</a>
2017-07-30 16:09:27 +00:00
</li>
</ul>
2017-08-03 18:36:46 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
</div>
</div>
2017-08-04 16:57:15 +00:00
{{ end }}
{{ if gt (len .CoAuthors) 0 }}
2017-07-30 16:09:27 +00:00
<div class="panel panel-default" :class="{ hidden: tab != 'authors' }">
<div class="panel-body">
2017-08-04 16:57:15 +00:00
{{ range .CoAuthors }}
2017-08-03 18:36:46 +00:00
<ul class="list-unstyled">
2017-07-30 16:09:27 +00:00
<li> <span class="glyphicon glyphicon-user"></span>
2017-08-03 18:36:46 +00:00
<a href="/authors/{{ .Id }}">{{ .Name }}</a>
2017-07-30 16:09:27 +00:00
</li>
</ul>
2017-08-03 18:36:46 +00:00
{{ end }}
2017-07-30 16:09:27 +00:00
</div>
</div>
2017-08-04 16:57:15 +00:00
{{ end }}
2017-08-03 18:36:46 +00:00
{{ else }}
<div class="alert alert-danger" role="alert">Aucun auteur sélectionné</div>
{{ end }}
2017-07-30 16:09:27 +00:00
</div>
{{ template "footer.html" . }}