-
Notifications
You must be signed in to change notification settings - Fork 2k
/
license.html
39 lines (38 loc) · 1.39 KB
/
license.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{% macro license_string(pkg_dict) %}
{% if 'license_url' in pkg_dict %}
<a href="{{ pkg_dict.license_url }}" rel="dc:rights">{{ pkg_dict.license_title }}</a>
{% else %}
<span property="dc:rights">{{ pkg_dict.license_title }}</span>
{% endif %}
{% endmacro %}
{% block license %}
{% if text_only %}
{% if pkg_dict.license_id %}
{{ license_string(pkg_dict) }}
{% else %}
{{ _('No License Provided') }}
{% endif %}
{% else %}
{% if pkg_dict.license_id %}
{% 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 %}
{% endif %}
{% endblock %}