{% extends "package/read.html" %}


{% block title %}Available contracts for this remote {{ dataset_type }} - {{
super() }}{% endblock %}

{% block content_action %}
{% endblock %}

{% block content_primary_nav %}
{% endblock %}

{% block secondary_content %}
    <section class="module module-narrow module-shallow">
        <h2 class="module-heading"><i
                class="icon-info-sign fa fa-info-circle"></i>{% trans %}This
            is a list of the available contracts for this external resource.{%
            endtrans %}</h2>
        <div class="module-content">
            <p>
                See the contracts for this resource
            </p>
        </div>
    </section>
    {% if "trusts_recommender" in g.plugins %}
        {% block recomm_entity_sidebar %}
            {% snippet 'package/snippets/recomm_entity_sidebar.html', entity=g.pkg_dict, count=3 %}
        {% endblock %}
    {% endif %}
{% endblock %}


{% block primary_content_inner %}
    {{ super() }}
   {% if 'local_artifacts' in g %}
   <section id="dataset-artifacts" class="contracts">
       These artifacts are now available for you to consume:
       <ul>
       {% for artifact in g.local_artifacts%}
           <li>
               <p><b> {{ artifact["title"] }} </b> </p>
               <p><b> {{ artifact["description"] }} </b> </p>
               <a class="heading" href="{{ artifact["url"] }}" title="{{ artifact["url"] }}">
                   <p><b> {{ artifact["url"] }} </b> </p>
               </a>
           </li>

       {% endfor %}
           </ul>
   {% else %}
       You have not acquired this resource so far. If you want to access its
       artifacts, please select a contract from below.
   {% endif %}

   </section>
   <section id="dataset-contracts" class="contracts">
    {% block contract_list %}
        {% snippet "package/snippets/contracts_list.html", data=g.pkg_dict, contracts=g.contracts %}
    {% endblock %}
</section>
{% endblock %}

