mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-25 09:30:31 +00:00
Add series info to all book "meta" displays
This commit is contained in:
parent
54cf3652b0
commit
67dd4a72b0
@ -70,6 +70,14 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% if entry.series.__len__() > 0 %}
|
||||
<p class="series">
|
||||
<a href="{{url_for('web.books_list', data='series', sort='new', book_id=entry.series[0].id )}}">
|
||||
{{entry.series[0].name}}
|
||||
</a>
|
||||
({{entry.series_index}})
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if entry.ratings.__len__() > 0 %}
|
||||
<div class="rating">
|
||||
{% for number in range((entry.ratings[0].rating/2)|int(2)) %}
|
||||
@ -114,6 +122,14 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% if entry.series.__len__() > 0 %}
|
||||
<p class="series">
|
||||
<a href="{{url_for('web.books_list', data='series', sort='new', book_id=entry.series[0].id )}}">
|
||||
{{entry.series[0].name}}
|
||||
</a>
|
||||
({{entry.series_index}})
|
||||
</p>
|
||||
{% endif %}
|
||||
<div class="rating">
|
||||
{% for number in range((entry.average_rating)|float|round|int(2)) %}
|
||||
<span class="glyphicon glyphicon-star good"></span>
|
||||
|
@ -20,7 +20,7 @@
|
||||
{% if loop.index > g.config_authors_max and g.config_authors_max != 0 %}
|
||||
{% if not loop.first %}
|
||||
<span class="author-hidden-divider">&</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<a class="author-name author-hidden" href="{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
|
||||
{% if loop.last %}
|
||||
<a href="#" class="author-expand" data-authors-max="{{g.config_authors_max}}" data-collapse-caption="({{_('reduce')}})">(...)</a>
|
||||
|
@ -43,7 +43,14 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
{% if entry.series.__len__() > 0 %}
|
||||
<p class="series">
|
||||
<a href="{{url_for('web.books_list', data='series', sort='new', book_id=entry.series[0].id )}}">
|
||||
{{entry.series[0].name}}
|
||||
</a>
|
||||
({{entry.series_index}})
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="btn-group" role="group" aria-label="Download, send to Kindle, reading">
|
||||
|
@ -841,8 +841,9 @@ def books_table():
|
||||
@login_required_if_no_ano
|
||||
def author_list():
|
||||
if current_user.check_visibility(constants.SIDEBAR_AUTHOR):
|
||||
entries = calibre_db.session.query(db.Authors, func.count('books_authors_link.book').label('count')) \
|
||||
entries = calibre_db.session.query(db.Authors, func.count('books_authors_link.book').label('count'), db.Series) \
|
||||
.join(db.books_authors_link).join(db.Books).filter(calibre_db.common_filters()) \
|
||||
.join(db.books_series_link).join(db.Series).filter(calibre_db.common_filters()) \
|
||||
.group_by(text('books_authors_link.author')).order_by(db.Authors.sort).all()
|
||||
charlist = calibre_db.session.query(func.upper(func.substr(db.Authors.sort, 1, 1)).label('char')) \
|
||||
.join(db.books_authors_link).join(db.Books).filter(calibre_db.common_filters()) \
|
||||
|
Loading…
Reference in New Issue
Block a user