Fix for #2325 (author sort order differs from authors order with readonly database)

This commit is contained in:
Ozzie Isaacs
2022-03-12 16:51:50 +01:00
parent 3a0dacc6a6
commit 2b31b6a306
9 changed files with 65 additions and 58 deletions
+2 -2
View File
@@ -47,7 +47,7 @@
<p title="{{ entry.title }}" class="title">{{entry.title|shortentitle}}</p>
</a>
<p class="author">
{% for author in entry.authors %}
{% for author in entry.ordered_authors %}
{% if loop.index > g.config_authors_max and g.config_authors_max != 0 %}
{% if not loop.first %}
<span class="author-hidden-divider">&amp;</span>
@@ -110,7 +110,7 @@
<div class="meta">
<p title="{{ entry.title }}" class="title">{{entry.title|shortentitle}}</p>
<p class="author">
{% for author in entry.authors %}
{% for author in entry.ordered_authors %}
{% if loop.index > g.config_authors_max and g.config_authors_max != 0 %}
<a class="author-name author-hidden" href="https://www.goodreads.com/author/show/{{ author.gid }}" target="_blank" rel="noopener">{{author.name.replace('|',',')}}</a>
{% if loop.last %}
+1 -1
View File
@@ -99,7 +99,7 @@
</div>
<h2 id="title">{{entry.title}}</h2>
<p class="author">
{% for author in entry.authors %}
{% for author in entry.ordered_authors %}
<a href="{{url_for('web.books_list', data='author', sort_param='stored', book_id=author.id ) }}">{{author.name.replace('|',',')}}</a>
{% if not loop.last %}
&amp;
+1 -1
View File
@@ -20,7 +20,7 @@
<p title="{{ entry.title }}" class="title">{{entry.title|shortentitle}}</p>
</a>
<p class="author">
{% for author in entry.authors %}
{% for author in entry.ordered_authors %}
{% if loop.index > g.config_authors_max and g.config_authors_max != 0 %}
{% if not loop.first %}
<span class="author-hidden-divider">&amp;</span>
+2 -2
View File
@@ -19,7 +19,7 @@
<p title="{{entry.title}}" class="title">{{entry.title|shortentitle}}</p>
</a>
<p class="author">
{% for author in entry.authors %}
{% for author in entry.ordered_authors %}
{% if loop.index > g.config_authors_max and g.config_authors_max != 0 %}
{% if not loop.first %}
<span class="author-hidden-divider">&amp;</span>
@@ -101,7 +101,7 @@
<p title="{{ entry.title }}" class="title">{{entry.title|shortentitle}}</p>
</a>
<p class="author">
{% for author in entry.authors %}
{% for author in entry.ordered_authors %}
{% if loop.index > g.config_authors_max and g.config_authors_max != 0 %}
{% if not loop.first %}
<span class="author-hidden-divider">&amp;</span>
+1 -1
View File
@@ -105,7 +105,7 @@
<div class="sm2-playlist-wrapper">
<ul class="sm2-playlist-bd">
<li><a href="{{ url_for('web.serve_book', book_id=mp3file,book_format=audioformat)}}"><b>{% for author in entry.authors %}{{author.name.replace('|',',')}}
<li><a href="{{ url_for('web.serve_book', book_id=mp3file,book_format=audioformat)}}"><b>{% for author in entry.ordered_authors %}{{author.name.replace('|',',')}}
{% if not loop.last %} & {% endif %} {% endfor %}</b> - {{entry.title}}</a></li>
</ul>
</div>
+1 -1
View File
@@ -44,7 +44,7 @@
<p title="{{entry.title}}" class="title">{{entry.title|shortentitle}}</p>
</a>
<p class="author">
{% for author in entry.authors %}
{% for author in entry.ordered_authors %}
{% if loop.index > g.config_authors_max and g.config_authors_max != 0 %}
{% if not loop.first %}
<span class="author-hidden-divider">&amp;</span>
+1 -1
View File
@@ -37,7 +37,7 @@
<div class="meta">
<p title="{{entry.title}}" class="title">{{entry.title|shortentitle}}</p>
<p class="author">
{% for author in entry.authors %}
{% for author in entry.ordered_authors %}
<a href="{{url_for('web.books_list', data='author', sort_param='new', book_id=author.id) }}">{{author.name.replace('|',',')}}</a>
{% if not loop.last %}
&amp;