[simple template] return a default string if there is no description

This commit is contained in:
mrpaulblack 2021-11-22 00:32:04 +01:00 committed by Markus Heiser
parent fbd8afb93d
commit 047d0ac6d6
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<p class="altlink"> &bull; <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}">{{ icon('music-note') }} {{ _('show media') }}</a></p>
{%- endif %}
<p class="content">
{%- if result.content %}{{ result.content|safe }}{% endif -%}
{%- if result.content %}{{ result.content|safe }}{%- else %}{{ _('This site did not provide any description.')|safe }}{% endif -%}
</p>
{{- result_sub_footer(result, proxify) -}}
{% if result.embedded -%}

View File

@ -5,7 +5,9 @@
{% if result.embedded -%}
<p class="altlink"> &bull; <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}">{{ icon('film-outline') }} {{ _('show video') }}</a></p>
{%- endif %}
{% if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif %}
<p class="content">
{%- if result.content %}{{ result.content|safe }}{%- else %}{{ _('This site did not provide any description.')|safe }}{% endif -%}
</p>
{{- result_sub_footer(result, proxify) -}}
{% if result.embedded -%}
<div id="result-video-{{ index }}" class="invisible">