Opds Improvements
This commit is contained in:
@@ -63,7 +63,66 @@
|
||||
term="{{tag.name}}"
|
||||
label="{{tag.name}}"/>
|
||||
{% endfor %}
|
||||
{% if entry.Books.comments[0] %}<summary>{{entry.Books.comments[0].text|striptags}}</summary>{% endif %}
|
||||
<summary>
|
||||
{% if entry.Books.tags|length > 0 %}
|
||||
TAGS: {% for tag in entry.Books.tags %}{{tag.name}}{{ ", " if not loop.last else "" }}{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% if entry.Books.series.__len__() > 0 %}
|
||||
SERIES: {{entry.Books.series[0].name}} [{{entry.Books.series_index|formatfloat(2)}}]
|
||||
|
||||
{% endif %}
|
||||
{% if entry.Books.ratings.__len__() > 0 %}
|
||||
RATING: {% for number in range((entry.Books.ratings[0].rating/2)|int(2)) %}
|
||||
★
|
||||
{% if loop.last and loop.index < 5 %}
|
||||
{% for numer in range(5 - loop.index) %}
|
||||
★
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% if cc|length > 0 %}
|
||||
{% for c in cc %}
|
||||
{% if entry.Books['custom_column_' ~ c.id]|length > 0 %}
|
||||
{{ c.name }}:
|
||||
{% for column in entry.Books['custom_column_' ~ c.id] %}
|
||||
{% if c.datatype == 'rating' %}
|
||||
{{ (column.value / 2)|formatfloat }}
|
||||
{% else %}
|
||||
{% if c.datatype == 'bool' %}
|
||||
{% if column.value == true %}
|
||||
✓
|
||||
{% else %}
|
||||
✕
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if c.datatype == 'float' %}
|
||||
{{ column.value|formatfloat(2) }}
|
||||
{% elif c.datatype == 'datetime' %}
|
||||
{{ column.value|formatdate }}
|
||||
{% elif c.datatype == 'comments' %}
|
||||
{{ column.value|safe }}
|
||||
{% elif c.datatype == 'series' %}
|
||||
{{ '%s [%s]' % (column.value, column.extra|formatfloat(2)) }}
|
||||
{% elif c.datatype == 'text' %}
|
||||
{{ column.value.strip() }}{% if not loop.last %}, {% endif %}
|
||||
{% else %}
|
||||
{{ column.value }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if entry.Books.comments[0] %}
|
||||
{{entry.Books.comments[0].text|striptags}}
|
||||
{% endif %}
|
||||
</summary>
|
||||
{% if entry.Books.has_cover %}
|
||||
<link type="image/jpeg" href="{{url_for('opds.feed_get_cover', book_id=entry.Books.id)}}" rel="http://opds-spec.org/image"/>
|
||||
<link type="image/jpeg" href="{{url_for('opds.feed_get_cover', book_id=entry.Books.id)}}" rel="http://opds-spec.org/image/thumbnail"/>
|
||||
|
||||
Reference in New Issue
Block a user