Skip to content

Commit

Permalink
[update][m]: Request data button check for licensed #67
Browse files Browse the repository at this point in the history
  • Loading branch information
sneha-sharma12 committed Mar 5, 2024
1 parent 706e989 commit 0d4f6a8
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions ckanext/ubdc/templates/scheming/package/read.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{% ckan_extends %}

{% block package_notes %}
<div class="access-request-container">
<a class="btn btn-primary" href="{{ h.url_for('ubdc.access_request') }}" title="{{ _('Form') }}">
<i class="fa fa-key"></i>
{{ _("Request data") }}
</a>
</div>

{% if pkg.notes %}
<div class="notes embedded-content">
{{ h.render_markdown(h.get_translated(pkg, 'notes')) }}
</div>
{% endif %}
{% set licensed=['notspecified','other-at','other-closed','other-nc'] %}
{% if pkg.license_id and pkg.license_id in licensed %}
<div class="access-request-container">
<a class="btn btn-primary" href="{{ h.url_for('ubdc.access_request') }}" title="{{ _('Form') }}">
<i class="fa fa-key"></i>
{{ _("Request data") }}
</a>
</div>
{% endif %}

{% if pkg.notes %}
<div class="notes embedded-content">
{{ h.render_markdown(h.get_translated(pkg, 'notes')) }}
</div>
{% endif %}
{% endblock %}

0 comments on commit 0d4f6a8

Please sign in to comment.