Skip to content

Commit

Permalink
add objectid to downloadbutton/add translation (#123)
Browse files Browse the repository at this point in the history
* add title to downloadbutton/add translation

* add id to card

* use objectid as buttonlabel
  • Loading branch information
koilebeit authored Jun 21, 2024
1 parent 7958b11 commit 96d811d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions _data/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ _includes:
en: "Download as"
es: "Descargar como"
de: "Herunterladen als"
item:
en: "Item"
es: "Elemento"
de: "Element"
compound-item-modal-gallery.html:
previous:
en: "Previous Item"
Expand Down
3 changes: 1 addition & 2 deletions _includes/item/child/compound-item-download-buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
{% unless child.object_location == nil %}
<li>
<a target="_blank" rel="noopener" href="{{ child.object_location | relative_url }}" class="dropdown-item">
{% if page.title != child.title and child.title != nil %}{{ child.title | truncatewords: 3 }}{% else %}Item {{ forloop.index }}{% endif %}
{% if child.format %}({{ child.format | split: '/' | last | upcase }}){% endif %}
{{ child.objectid }} {% if child.format %}({{ child.format | split: '/' | last | upcase }}){% endif %}
</a>
</li>
{% endunless %}
Expand Down
3 changes: 1 addition & 2 deletions _includes/item/child/compound-item-modal-gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
<div class="my-auto">
<div class="card-body text-center" id="{{ child.objectid }}Card">

{% if child.title %}<div class="small text-dark mb-2">{{ child.title | truncatewords: 4 }}</div>{% endif %}

{{ child.objectid }}: {% if child.title %}<div class="small text-dark mb-2">{{ child.title | truncatewords: 4 }}</div>{% endif %}
<div class="mb-2">
{% if child.image_thumb or child.image_small %}
<img class="img-thumbnail compound-thumb" src="{{ child.image_thumb | default: child.image_small | relative_url }}" alt="{{ child.image_alt_text | default: child.description | default: child.title | escape }}">
Expand Down

0 comments on commit 96d811d

Please sign in to comment.