Better bookdetail

This commit is contained in:
Sébastien Lucas 2014-02-09 21:17:04 +01:00
parent 04e22728fa
commit 034e4bd331
2 changed files with 45 additions and 37 deletions

View file

@ -78,7 +78,7 @@ function getCurrentCss () {
} }
function getCurrentTemplate () { function getCurrentTemplate () {
return "default"; return "bootstrap";
} }
function getUrlWithVersion ($url) { function getUrlWithVersion ($url) {

View file

@ -1,56 +1,63 @@
<article class="bookpopup"> <div class="row">
<span class="cover"> <div class="col-md-offset-2 col-md-2 col-sm-12">
{{? it.book.hasCover == 1}} {{? it.book.hasCover == 1}}
<a href="{{=it.book.coverurl}}"> <a href="{{=it.book.coverurl}}">
<img src="{{=it.book.thumbnailurl}}" alt="{{=it.c.i18n.coverAlt}}" /> <img class="img-responsive" src="{{=it.book.thumbnailurl}}" alt="{{=it.c.i18n.coverAlt}}" />
</a> </a>
{{?}} {{?}}
</span> </div>
<h2 class="download"> <div class="col-md-4 text-center">
{{~it.book.datas:data:i}} <h1><a title="{{=it.c.i18n.permalinkAlt}}" rel="bookmark" href="{{=str_format (it.c.url.detailUrl, it.book.id, it.databaseId)}}">
<a href="{{=data.url}}">{{=data.format}}</a> <span class="glyphicon glyphicon-link"></span></a>{{=htmlspecialchars (it.title)}}
{{? data.mail == 1}} </h1>
<a id="mailButton" title="Mail" href="empty.php" onclick="sendToMailAddress (this, {{=data.id}}); return false;"><i class="icon-envelope icon-large"></i></a> <h4>{{=it.c.i18n.authorsTitle}}:
{{?}}
{{? data.readerUrl != ""}}
<a title="Reader" href="{{=data.readerUrl}}" target="blank"><i class="icon-eye-open icon-large"></i></a>
{{?}}
<br />
{{~}}
</h2>
<h1><a title="{{=it.c.i18n.permalinkAlt}}" rel="bookmark" href="{{=str_format (it.c.url.detailUrl, it.book.id, it.databaseId)}}"><i class="icon-link"></i></a>{{=htmlspecialchars (it.title)}}</h1>
<p class="popupless">
<h3>{{=it.c.i18n.authorsTitle}}: </h3>
{{~it.book.authors:author:i}} {{~it.book.authors:author:i}}
{{? i > 0}}, {{?}}<a href="{{=author.url}}">{{=htmlspecialchars (author.name)}}</a> {{? i > 0}}, {{?}}<a href="{{=author.url}}">{{=htmlspecialchars (author.name)}}</a>
{{~}} {{~}}
</p> </h4>
{{? it.book.tagsName != ""}} {{? it.book.tagsName != ""}}
<p class="popupless"> <h4>{{=it.c.i18n.tagsTitle}}:
<h3>{{=it.c.i18n.tagsTitle}}: </h3>
{{~it.book.tags:tag:i}} {{~it.book.tags:tag:i}}
{{? i > 0}}, {{?}}<a href="{{=tag.url}}">{{=htmlspecialchars (tag.name)}}</a> {{? i > 0}}, {{?}}<a href="{{=tag.url}}">{{=htmlspecialchars (tag.name)}}</a>
{{~}} {{~}}
</p> </h4>
{{?}} {{?}}
{{? it.book.seriesName != ""}} {{? it.book.seriesName != ""}}
<p class="popupless"> <h4><a href="{{=it.book.seriesurl}}">{{=it.c.i18n.seriesTitle}}</a> : {{=htmlspecialchars (it.book.seriesCompleteName)}}</h4>
<h3><a href="{{=it.book.seriesurl}}">{{=it.c.i18n.seriesTitle}}</a> : </h3>{{=htmlspecialchars (it.book.seriesCompleteName)}}
</p>
{{?}} {{?}}
</div>
<div class="col-md-2 col-sm-12">
<div class="btn-group pull-right">
{{~it.book.datas:data:i}}
<a href="{{=data.url}}" class="btn btn-primary btn-sm" role="button">{{=data.format}}</a>
{{? data.mail == 1}}
<a id="mailButton" class="btn btn-primary btn-sm" role="button" title="Mail" href="empty.php" onclick="sendToMailAddress (this, {{=data.id}}); return false;">
<span class="glyphicon glyphicon-envelope"></span></a>
{{?}}
{{? data.readerUrl != ""}}
<a title="Reader" class="btn btn-primary btn-sm" role="button" href="{{=data.readerUrl}}" target="blank">
<span class="glyphicon glyphicon-eye-open"></span></a>
{{?}}
{{~}}
</div>
</div>
</div>
<div class="row">
<div class="col-md-offset-2 col-md-8 col-sm-12">
{{? it.book.publisherName != ""}} {{? it.book.publisherName != ""}}
<p class="popupless"> <p>
<h3>{{=it.c.i18n.publisherName}}: </h3><a href="{{=it.book.publisherurl}}">{{=htmlspecialchars (it.book.publisherName)}}</a> <h4>{{=it.c.i18n.publisherName}}: </h4><a href="{{=it.book.publisherurl}}">{{=htmlspecialchars (it.book.publisherName)}}</a>
</p> </p>
{{?}} {{?}}
{{? it.book.pubDate != ""}} {{? it.book.pubDate != ""}}
<p class="popupless"> <p>
<h3>{{=it.c.i18n.pubdateTitle}}: </h3>{{=it.book.pubDate}} <h4>{{=it.c.i18n.pubdateTitle}}: </h4>{{=it.book.pubDate}}
</p> </p>
{{?}} {{?}}
{{? it.book.languagesName != ""}} {{? it.book.languagesName != ""}}
<p class="popupless"> <p>
<h3>{{=it.c.i18n.languagesTitle}}: </h3>{{=it.book.languagesName}} <h4>{{=it.c.i18n.languagesTitle}}: </h4>{{=it.book.languagesName}}
</p> </p>
{{?}} {{?}}
{{? it.book.content != ""}} {{? it.book.content != ""}}
@ -58,4 +65,5 @@
<h4>{{=it.c.i18n.contentTitle}}</h4> <h4>{{=it.c.i18n.contentTitle}}</h4>
<div>{{=it.book.content}}</div> <div>{{=it.book.content}}</div>
{{?}} {{?}}
</article> </div>
</div>