display item desc by locale
This commit is contained in:
parent
b254b0c4ee
commit
d48a18b3f4
17 changed files with 24 additions and 22 deletions
|
@ -636,7 +636,7 @@ class Item(PolymorphicModel):
|
|||
|
||||
@property
|
||||
def brief_description(self):
|
||||
return self.brief[:155]
|
||||
return self.display_description[:155]
|
||||
|
||||
@classmethod
|
||||
def get_by_url(cls, url_or_b62: str, resolve_merge=False) -> "Self | None":
|
||||
|
|
|
@ -128,8 +128,8 @@ class DiscoverGenerator(BaseJob):
|
|||
).count()
|
||||
trends.append(
|
||||
{
|
||||
"title": i.title,
|
||||
"description": i.brief,
|
||||
"title": i.display_title,
|
||||
"description": i.display_description,
|
||||
"url": i.absolute_url,
|
||||
"image": i.cover_image_url or "",
|
||||
"provider_name": str(i.category.label),
|
||||
|
|
|
@ -36,7 +36,7 @@ class SearchResultItem:
|
|||
self.source_url = source_url
|
||||
self.display_title = title
|
||||
self.subtitle = subtitle
|
||||
self.brief = brief
|
||||
self.display_description = brief
|
||||
self.cover_image_url = cover_url
|
||||
|
||||
@property
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}{{ item.display_description | linebreaksbr }}{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock full %}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<div class="full">
|
||||
{% block full %}
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}{{ item.display_description | linebreaksbr }}{% endif %}
|
||||
</div>
|
||||
{% endblock full %}
|
||||
</div>
|
||||
|
|
|
@ -32,6 +32,6 @@
|
|||
{% endblock brief %}
|
||||
{% block full %}
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}{{ item.display_description | linebreaksbr }}{% endif %}
|
||||
</div>
|
||||
{% endblock full %}
|
||||
|
|
|
@ -18,6 +18,6 @@
|
|||
{% include '_people.html' with people=item.publisher role='publisher' max=2 %}
|
||||
</div>
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}{{ item.display_description | linebreaksbr }}{% endif %}
|
||||
</div>
|
||||
{% endblock full %}
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
{% block full %}
|
||||
<div class="multi-fields">{% include '_people.html' with people=item.additional_title role='other title' max=2 %}</div>
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}{{ item.display_description | linebreaksbr }}{% endif %}
|
||||
</div>
|
||||
{% endblock full %}
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
{% include '_people.html' with people=item.performer role='performer' max=5 %}
|
||||
</div>
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}{{ item.display_description | linebreaksbr }}{% endif %}
|
||||
</div>
|
||||
{% endblock full %}
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
{% include '_people.html' with people=item.performer role='performer' max=2 %}
|
||||
</div>
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | default:item.parent_item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}
|
||||
{{ item.display_description | default:item.parent_item.display_description | linebreaksbr }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock full %}
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
{% endblock brief %}
|
||||
{% block full %}
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}{{ item.display_description | linebreaksbr }}{% endif %}
|
||||
</div>
|
||||
{% endblock full %}
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
{% endblock brief %}
|
||||
{% block full %}
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}{{ item.display_description | linebreaksbr }}{% endif %}
|
||||
</div>
|
||||
{% endblock full %}
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
{% block full %}
|
||||
<div class="multi-fields">{% include '_people.html' with people=item.additional_title role='other title' max=2 %}</div>
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}{{ item.display_description | linebreaksbr }}{% endif %}
|
||||
</div>
|
||||
{% endblock full %}
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
{% block full %}
|
||||
<div class="multi-fields">{% include '_people.html' with people=item.additional_title role='other title' max=2 %}</div>
|
||||
<div>
|
||||
{% if not hide_brief %}{{ item.brief | linebreaksbr }}{% endif %}
|
||||
{% if not hide_brief %}{{ item.display_description | linebreaksbr }}{% endif %}
|
||||
</div>
|
||||
{% endblock full %}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<meta property="og:url" content="{{ item.absolute_url }}">
|
||||
{% if item.has_cover %}<meta property="og:image" content="{{ item.cover_image_url }}">{% endif %}
|
||||
<meta property="og:site_name" content="{{ site_name }}">
|
||||
<meta property="og:description" content="{{ item.brief }}">
|
||||
<meta property="og:description" content="{{ item.brief_description }}">
|
||||
{% if item.is_deleted or item.merged_to_item %}<meta name="robots" content="noindex">{% endif %}
|
||||
<title>{{ site_name }} - {% trans item.category.label %} | {{ item.display_title }}</title>
|
||||
{% include "common_libs.html" %}
|
||||
|
@ -228,10 +228,10 @@
|
|||
<div id="item-detail" class="middle">
|
||||
<section id="item-content">
|
||||
<h5>{% trans 'overview' %}</h5>
|
||||
{% if item.brief %}
|
||||
<p class="tldr" _="on click toggle .tldr on me">{{ item.brief | linebreaksbr }}</p>
|
||||
{% elif item.parent_item.brief %}
|
||||
<p class="tldr" _="on click toggle .tldr on me">{{ item.parent_item.brief | linebreaksbr }}</p>
|
||||
{% if item.display_description %}
|
||||
<p class="tldr" _="on click toggle .tldr on me">{{ item.display_description | linebreaksbr }}</p>
|
||||
{% elif item.parent_item.display_description %}
|
||||
<p class="tldr" _="on click toggle .tldr on me">{{ item.parent_item.display_description | linebreaksbr }}</p>
|
||||
{% else %}
|
||||
<p class="empty">{% trans 'nothing so far.' %}</p>
|
||||
{% endif %}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
window.podcastData = {
|
||||
"title": "{{ item.display_title | escapejs }}",
|
||||
"subtitle": "",
|
||||
"description": "{{ item.brief | escapejs }}",
|
||||
"description": "{{ item.display_description | escapejs }}",
|
||||
"cover": "{{ item.cover.url | escapejs }}",
|
||||
"feeds": [{"type": "audio", "format": "mp3", "url": "{{ item.feed_url | escapejs }}", "variant": "high"}]
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
{{ ep.display_title }}
|
||||
<small style="color:lightgrey;">{{ ep.pub_date|date }}</small>
|
||||
</h6>
|
||||
<small class="tldr-2 muted" _="on click toggle .tldr-2">{{ ep.brief | linebreaksbr }}</small>
|
||||
<small class="tldr-2 muted" _="on click toggle .tldr-2">{{ ep.display_description | linebreaksbr }}</small>
|
||||
</p>
|
||||
{% if forloop.last %}
|
||||
<button class="outline"
|
||||
|
|
Loading…
Add table
Reference in a new issue