From f275baebf131028c7e02e694e59c1ba6503aec08 Mon Sep 17 00:00:00 2001 From: Neda Taherifar Date: Wed, 20 Mar 2024 10:44:40 +0800 Subject: [PATCH] Temporarily display only the license. Future updates will incorporate URL and title. #50 --- .../shared/templates/snippets/license.html | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ckan/src/shared/templates/snippets/license.html diff --git a/ckan/src/shared/templates/snippets/license.html b/ckan/src/shared/templates/snippets/license.html new file mode 100644 index 00000000..c089d9a0 --- /dev/null +++ b/ckan/src/shared/templates/snippets/license.html @@ -0,0 +1,33 @@ +{% macro license_string(pkg_dict) %} + {% if pkg_dict.license %} + {{ pkg_dict.license }} + {% else %} + {{ _('No License Provided') }} + {% endif %} +{% endmacro %} + +{% block license %} + {% if text_only %} + {{ license_string(pkg_dict) }} + {% else %} + {% block license_wrapper %} +
+ {% block license_title %} +

{{ _('License') }}

+ {% endblock %} + {% block license_content %} +

+ {% block license_content_inner %} + {{ license_string(pkg_dict) }} + {% if pkg_dict.isopen %} + + [Open Data] + + {% endif %} + {% endblock %} +

+ {% endblock %} +
+ {% endblock %} + {% endif %} +{% endblock %} \ No newline at end of file