Skip to content

Commit

Permalink
core: index the medium filename and show it on the connect list items
Browse files Browse the repository at this point in the history
  • Loading branch information
mworrell committed Jan 12, 2024
1 parent 30e2435 commit 60ed883
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
<div class="z-thumbnail-text">
<h6>{{ id.category_id.title }}</h6>
<h5>{{ id.title|default:id.short_title }}</h5>
{% if id.medium as medium %}
{% if medium.filename|split:"/"|last as filename %}
{% if medium.rootname != id.title and filename != id.title %}
<p>{{ filename }}</p>
{% endif %}
{% endif %}
{% endif %}
<p>{{ id|summary:50 }}</p>
</div>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@
{% block item_text %}
<h6>{{ id.category_id.title }}</h6>
<h5>{{ id.title|default:id.short_title }}</h5>
{% if id.medium as medium %}
{% if medium.filename|split:"/"|last as filename %}
{% if medium.rootname != id.title and filename != id.title %}
<p>{{ filename }}</p>
{% endif %}
{% endif %}
{% endif %}
<p>{{ id|summary:80 }}</p>
{% endblock %}
{% block item_actions %}
<p class="rsc-actions">
{% comment %}
<a href="#" class="btn btn-default action-preview">{_ Preview _}</a>
{% if id.is_editable %}
<a href="#" class="btn btn-default action-edit">{_ Edit _}</a>
{% endif %}
{% endcomment %}
{% if intent == "select" %}
<a href="#" class="btn btn-primary action-connect">{_ Select _}</a>
{% elseif intent == "connect" and is_linkable %}
Expand Down
6 changes: 6 additions & 0 deletions apps/zotonic_mod_base/priv/templates/pivot/_main_text.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@
{{ id.date_start }}
{{ id.date_end }}
{% endif %}

{% if id.medium as medium %}
{% if medium.filename as filename %}
{{ filename|split:"/"|last }}
{% endif %}
{% endif %}

0 comments on commit 60ed883

Please sign in to comment.