<div>
  <h2>{% trans %}Most viewed datasets{% endtrans %}</h2> 
    {% if data['table'] %}
    <table class="table table-condensed table-bordered table-striped">
      <tr>
        <th>{% trans %}Dataset{% endtrans %}</th>
        <th>{% trans %}Total views{% endtrans %}</th>
        <th>{% trans %}Initial entrance{% endtrans %}</th>
        <th>{% trans %}Entrances of total views{% endtrans %}</th>
        <th>{% trans %}Downloads{% endtrans %}</th>
      </tr>
      {% for toppackage in data['top'] %}
        <tr>
          <td>{{ h.link_to(toppackage.package_name, h.url_for('dataset.read', id=toppackage.package_id)) }}</td>
          <td>{{ toppackage.visits }}</td>
          <td>{{ toppackage.entrances }}</td>
          {% snippet "report/snippets/entrances_percentage_td.html", total_visits=toppackage.visits, total_entrances=toppackage.entrances %}
          <td>{{ toppackage.downloads }}</td>
        </tr>
      {% endfor %}
    </table>
    {% else %}
      <p>{% trans %}No analytics found for most downloaded datasets.{% endtrans %}</p>
    {% endif %}

 </div>


