Skip to content

Commit

Permalink
feat: add LIV link for resources with image field
Browse files Browse the repository at this point in the history
  • Loading branch information
alycejenni committed May 3, 2024
1 parent a9522b7 commit fb993a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckanext/nhm/theme/templates/package/resource_read.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
{% if 'datastore' in g.plugins and res.datastore_active %}
<li>{% snippet 'package/snippets/data_api_button.html', resource=res, datastore_root_url=g.datastore_api %}</li>
{% endif %}
{% if res._image_field %}
<li><a class="btn btn-primary"
href="{{ h.url_for('liv.index', mode='resource', mode_params=res.id) }}">
<i class="fas fa-images"></i> {{ _('Open in image viewer') }}
</a></li>
{% endif %}
<li>{% snippet "contact/snippets/modal_link.html", pkg=g.pkg, res=res %}</li>
{% endblock %}
</ul>
Expand Down

0 comments on commit fb993a8

Please sign in to comment.