Skip to content

Commit

Permalink
Temporarily display only the license. Future updates will incorporate…
Browse files Browse the repository at this point in the history
… URL and title. #50
  • Loading branch information
NTaherifar committed Mar 20, 2024
1 parent 96d1c4a commit f275bae
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions ckan/src/shared/templates/snippets/license.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% macro license_string(pkg_dict) %}
{% if pkg_dict.license %}
<span property="dc:rights">{{ pkg_dict.license }}</span>
{% else %}
<span>{{ _('No License Provided') }}</span>
{% endif %}
{% endmacro %}

{% block license %}
{% if text_only %}
{{ license_string(pkg_dict) }}
{% else %}
{% block license_wrapper %}
<section class="module module-narrow module-shallow license">
{% block license_title %}
<h2 class="module-heading"><i class="fa fa-lock"></i> {{ _('License') }}</h2>
{% endblock %}
{% block license_content %}
<p class="module-content">
{% block license_content_inner %}
{{ license_string(pkg_dict) }}
{% if pkg_dict.isopen %}
<a href="http://opendefinition.org/okd/" title="{{ _('This dataset satisfies the Open Definition.') }}">
<img class="open-data" src="{{ h.url_for_static('/base/images/od_80x15_blue.png') }}" alt="[Open Data]" />
</a>
{% endif %}
{% endblock %}
</p>
{% endblock %}
</section>
{% endblock %}
{% endif %}
{% endblock %}

0 comments on commit f275bae

Please sign in to comment.