fix edition title display issues
This commit is contained in:
parent
be72c1d082
commit
fce6759195
4 changed files with 17 additions and 17 deletions
|
@ -198,7 +198,7 @@ class Edition(Item):
|
||||||
imprint = jsondata.CharField(_("imprint"), null=True, blank=True, max_length=500)
|
imprint = jsondata.CharField(_("imprint"), null=True, blank=True, max_length=500)
|
||||||
|
|
||||||
def get_localized_subtitle(self) -> str | None:
|
def get_localized_subtitle(self) -> str | None:
|
||||||
return self.localized_title[0]["text"] if self.localized_subtitle else None
|
return self.localized_subtitle[0]["text"] if self.localized_subtitle else None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def display_subtitle(self) -> str | None:
|
def display_subtitle(self) -> str | None:
|
||||||
|
|
|
@ -40,7 +40,9 @@ class GoogleBooks(AbstractSite):
|
||||||
pub_house = (
|
pub_house = (
|
||||||
b["volumeInfo"]["publisher"] if "publisher" in b["volumeInfo"] else None
|
b["volumeInfo"]["publisher"] if "publisher" in b["volumeInfo"] else None
|
||||||
)
|
)
|
||||||
language = b["volumeInfo"]["language"] if "language" in b["volumeInfo"] else []
|
language = (
|
||||||
|
b["volumeInfo"]["language"].lower() if "language" in b["volumeInfo"] else []
|
||||||
|
)
|
||||||
|
|
||||||
pages = b["volumeInfo"]["pageCount"] if "pageCount" in b["volumeInfo"] else None
|
pages = b["volumeInfo"]["pageCount"] if "pageCount" in b["volumeInfo"] else None
|
||||||
if "mainCategory" in b["volumeInfo"]:
|
if "mainCategory" in b["volumeInfo"]:
|
||||||
|
|
|
@ -198,20 +198,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="item-title-more" class="middle">
|
<div id="item-title-more" class="middle">
|
||||||
<hgroup>
|
<hgroup>
|
||||||
<p>
|
{% if item.display_subtitle %}<p>{{ item.display_subtitle }}</p>{% endif %}
|
||||||
{% if item.display_subtitle %}{{ item.display_subtitle }}{% endif %}
|
{% if item.orig_title and item.orig_title != item.display_title %}
|
||||||
{% if item.orig_title and item.orig_title != item.display_title %}
|
<p>
|
||||||
<p>
|
{{ item.orig_title }}
|
||||||
{{ item.orig_title }}
|
<small>
|
||||||
<small>
|
{% if item.season_number %}Season {{ item.season_number }}{% endif %}
|
||||||
{% if item.season_number %}Season {{ item.season_number }}{% endif %}
|
</small>
|
||||||
</small>
|
</p>
|
||||||
</p>
|
{% endif %}
|
||||||
{% endif %}
|
{% if item.parent_item %}
|
||||||
{% if item.parent_item %}
|
{% trans 'part of' %} {{ item.parent_item.type.label }}: <span><a href="{{ item.parent_item.url }}"></span>{{ item.parent_item.display_title }}</a>
|
||||||
{% trans 'part of' %} {{ item.parent_item.type.label }}: <span><a href="{{ item.parent_item.url }}"></span>{{ item.parent_item.display_title }}</a>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
</p>
|
|
||||||
{% if item.author or item.translator %}
|
{% if item.author or item.translator %}
|
||||||
<p>
|
<p>
|
||||||
<i>
|
<i>
|
||||||
|
|
|
@ -188,7 +188,7 @@ services:
|
||||||
|
|
||||||
neodb-worker:
|
neodb-worker:
|
||||||
<<: *neodb-service
|
<<: *neodb-service
|
||||||
command: neodb-manage rqworker-pool --num-workers ${NEODB_RQ_WORKER_NUM:-4} --with-scheduler import export mastodon fetch crawl ap cron
|
command: neodb-manage rqworker --with-scheduler import export mastodon fetch crawl ap cron
|
||||||
depends_on:
|
depends_on:
|
||||||
migration:
|
migration:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
Loading…
Add table
Reference in a new issue