{#
Renders a media item for a organization. This should be used in a list.

organization - A organization dict.

Example:

    <ul class="media-grid">
      {% for organization in organizations %}
        {% snippet "organization/snippets/organization_item.html", organization=organization %}
      {% endfor %}
    </ul>
#}
{% set url = h.url_for(organization.type ~ '.read', id=organization.name) %}
{% block item %}
<li class="media-item">
  {% block item_inner %}
  {% block image %}
    <img src="{{ organization.image_display_url or h.url_for_static('/base/images/placeholder-organization.png') }}" alt="{{ organization.name }}" class="img-fluid media-image">
  {% endblock %}
  {% block title %}
    <h2 class="media-heading">{{ organization.display_name }}</h2>
  {% endblock %}
  {% block description %}
    {% if organization.description %}
      <p class="media-description">{{ h.markdown_extract(organization.description, extract_length=80) }}</p>
    {% endif %}
  {% endblock %}
  {% block datasets %}
    {% if organization.package_count %}
      <strong class="count">{{ ungettext('{num} Dataset', '{num} Datasets', organization.package_count).format(num=organization.package_count) }}</strong><br/>
    {% else %}
      <span class="count">{{ _('0 Datasets') }}</span><br/>
    {% endif %}
  {% endblock %}
  {% block members %}
    {% if 'member_count' in organization and organization.member_count %}
      <strong class="count">{{ ungettext('{num} Member', '{num} Members', organization.member_count).format(num=organization.member_count) }}</strong>
    {% else %}
      <span class="count">{{ _('0 Members') }}</span>
    {% endif %}
  {% endblock %}
  {% block capacity %}
    {% if show_capacity and organization.capacity %}
    <p><span class="label label-default">{{ h.roles_translated().get(organization.capacity, organization.capacity) }}</span></p>
    {% endif %}
  {% endblock %}
  {% block link %}
  {% set view_label = _('Open details page for {name}').format(name=organization.display_name) %}
  <a href="{{ url }}" aria-label="{{ view_label }}" data-bs-title="{{ view_label }}" data-bs-toggle="tooltip" class="media-view">
    <span>{{ _('View {organization_name}').format(organization_name=organization.display_name) }}</span>
  </a>
  {% endblock %}
  {% endblock %}
</li>
{% endblock %}
{% if position is divisibleby 3 %}
  <li class="clearfix js-hide"></li>
{% endif %}
