{#
Displays a sidebar module with information for given package

pkg          - The package dict that owns the resources.
am_following - True if the user is following the package.

Example:

  {% snippet "package/snippets/info.html", pkg=pkg, am_following=am_following %}

#}
{% block package_info %}
  {% if pkg %}
    <section id="package-info" class="module module-narrow">
      <div class="module context-info">
        <div class="module-content">
          {% block package_info_inner %}
            {% block heading %}
              <h1 class="heading">{{ h.dataset_display_name(pkg) }}</h1>
            {% endblock %}
            {% block nums %}
              {% set num_followers = h.follow_count('dataset', pkg.id) %}
              <div class="nums">
                <dl>
                  <dt>{{ _('Followers') }}</dt>
                  <dd>{{ h.SI_number_span(num_followers) }}</dd>
                </dl>
              </div>
            {% endblock %}
            {% block follow_button %}
              {% if current_user.is_authenticated %}
                {% if error_message %}
                  <div class="alert alert-danger">{{ error_message }}</div>
                {% endif %}
                {% snippet 'snippets/follow_button.html', am_following=am_following, obj_type='dataset', obj_id=pkg.id, anchor_type='package' %}
              {% endif %}
            {% endblock %}
          {% endblock %}
        </div>
      </div>
    </section>
  {% endif %}
{% endblock %}
