{% set stats = h.get_site_statistics() %}

<div class="box stats">
  <div class="inner">
    <h3>{{ _('{0} statistics').format(g.site_title) }}</h3>
    <ul>
      {% block stats_group %}
      <li>
        <a href="{{ h.url_for(controller='package', action='search') }}">
          <b>{{ h.SI_number_span(stats.dataset_count) }}</b>
          {{ _('dataset') if stats.dataset_count == 1 else _('datasets') }}
        </a>
      </li>
      <li>
        <a href="{{ h.url_for(controller='organization', action='index') }}">
          <b>{{ h.SI_number_span(stats.organization_count) }}</b>
          {{ _('organization') if stats.organization_count == 1 else _('organizations') }}
        </a>
      </li>
      <li>
        <a href="{{ h.url_for(controller='group', action='index') }}">
          <b>{{ h.SI_number_span(stats.group_count) }}</b>
          {{ _('group') if stats.group_count == 1 else _('groups') }}
        </a>
      </li>
      {% endblock %}
    </ul>
  </div>
</div>
