datahub-v2 / frontend

DataHub frontend
https://datahub.io
MIT License
32 stars 11 forks source link

Refactor rendering licenses property #112

Closed anuveyatsu closed 7 years ago

anuveyatsu commented 7 years ago

Currently:

{% if dataset.licenses %}
<i class="fa fa-gavel"></i> <a href="{{dataset.licenses[0].url}}" title="Available under the following License">{{dataset.licenses[0].name or dataset.licenses[0].id}}</a>
{% elif dataset.license %}
<i class="fa fa-gavel"></i> {{ dataset.license }}
{% endif %}

instead, we have to expect licenses to be an array of objects only as per specs - https://specs.frictionlessdata.io/data-package/#licenses

Also, use name, title and path properties appropriately so it is useful:

Acceptance criteria

Tasks

EXTRA

anuveyatsu commented 7 years ago

FIXED