{#
Displays the most recently created DOIs for the given package.

Params:
    - package_id: the package id to get the most recent DOIs for
    - number: the number of DOIs to show

Example usage:
    {% snippet "query_dois/snippets/recent_dois.html", package_id=package.id, number=5 %}
#}

<section class="module module-narrow">
<div class="flex-container flex-between flex-stretch-first nav-simple-heading">
    <h2 class="module-heading"><i class="fas fa-clock inline-icon-left"></i>{{ _('Recent query DOIs') }}</h2>
    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
            data-target="#nav-query-dois" aria-expanded="false">
        <span class="sr-only">expand</span>
    </button>
</div>

    <div>
        <ul class="nav nav-simple navbar-collapse collapse" id="nav-query-dois">
            {% set query_dois = h.get_most_recent_dois(package_id, number) %}
            {% if query_dois %}
                {% for query_doi in query_dois %}
                <li class="nav-item">
                    <a href="{{ h.get_landing_page_url(query_doi) }}" title="{{ h.get_time_ago_description(query_doi) }}">
                        <i class="fas fa-link inline-icon-left"></i>
                        {{ query_doi.doi }}
                    </a>
                </li>
                {% endfor %}
            {% else %}
                <li class="nav-item">
                    <p>
                        <i class="fas fa-unlink inline-icon-left"></i>
                        {{ _('No recent DOIs') }}
                    </p>
                </li>
            {% endif %}
        </ul>
    </div>
</section>
