Skip to content

Commit

Permalink
dont show viewer w/o item image
Browse files Browse the repository at this point in the history
  • Loading branch information
mnyrop committed Jul 19, 2023
1 parent ef967ed commit 8f3c4fe
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions _layouts/generic_collection_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,21 @@

<h3 alt="{{ page.label | escape }}" class='item-label'>{{ page.label }}</h3>

{% if page.image_viewer %}
{% assign viewer = page.image_viewer %}
{% elsif layout.image_viewer %}
{% assign viewer = layout.image_viewer %}
{% endif %}
{% assign viewer = page.image_viewer | default: layout.image_viewer %}
{% assign image = page.manifest | default: page.full %}

{% if viewer %}
<div class='item-view'>
<span class='pagination-link' id='prevlink'></span>
{% if viewer == 'openseadragon' %}
{% include osd_iiif_image_viewer.html manifest=page.manifest prevlink=prevlink nextlink=nextlink %}
{% else %}
{% include simple_image_viewer.html full_image=page.full prevlink=prevlink nextlink=nextlink %}
{% if viewer and image.size > 0 %}
{% if viewer == 'openseadragon' %}
{% include osd_iiif_image_viewer.html manifest=page.manifest prevlink=prevlink nextlink=nextlink %}
{% else %}
{% include simple_image_viewer.html full_image=page.full prevlink=prevlink nextlink=nextlink %}
{% endif %}
{% endif %}
<span class='pagination-link' id='nextlink'></span>
</div>
{% unless layout.pagination == false %}{% include item_pagination.html %}{% endunless %}
{% endif %}

{% comment %}
The block below controls the item metadata table
Expand Down

0 comments on commit 8f3c4fe

Please sign in to comment.