{#
Renders a citation for a resource
#}

{% extends "doi/snippets/package_citation.html" %}

{% block citation %}
    <section class="module additional-info">
        <div class="module-content citation">
            <h3>{{ _('Cite this as') }}</h3>

            <div id="citation-string" class="citation-string">
                {% block default_citation_string %}
                {{ pkg_dict['author'] }} ({{ h.package_get_year(pkg_dict) }}). <i>{{ res['name'] }}</i> (from <i>{{ pkg_dict['title'] }}</i>) [Data set resource]. {{ pkg_dict['doi_publisher'] }}.
                {% block citation_link %}
                    {% set res_link = h.url_for('resource.read', qualified=True, id=pkg_dict['name'], resource_id=res['id']) %}
                    <a href="{{ res_link }}" target="_blank">
                        {{ res_link }}
                    </a>
                {% endblock %}
                {% endblock %}
            </div>

            {% block citation_status %}
                {{ super() }}
            {% endblock %}
        </div>
    </section>
{% endblock %}
