{#
Adapted for Events.

Renders a media item for a group. This should be used in a list.

group - A group dict.

Example:

    <ul class="media-grid">
      {% for group in groups %}
        {% snippet "group/snippets/group_item.html", group=group %}
      {% endfor %}
    </ul>
#}
{#
    group.type not set for some reason so wrongly defaults to group
#}
{% set type = group.type or 'group' %}
{% set url = h.url_for(type ~ '_read', action='read', id=group.name) %}
{% block item %}
<li>
    {% block image %}
    <div class="image">
      <a href="{{ group.url }}">
        <img src="{{ group.image_display_url or h.url_for_static('/base/images/placeholder-group.png') }}" width="190" height="118" alt="{{ group.name }}" />
      </a>
    </div>
    {% endblock %}

  <a href="{{ url }}" title="{{ _('View {name}').format(name=group.display_name) }}">
  EVENT ({{ type, group.type, group.id }}) {{ _('{name}').format(name=group.display_name) }}
  </a>
  <p>{{ h.truncate(group.description, h.event_description_length(), whole_word=True) }}</p>
</li>
{% endblock %}

{#
Adapted for Events.

Renders a media item for a group. This should be used in a list.

group - A group dict.

Example:

    <ul class="media-grid">
      {% for group in groups %}
        {% snippet "group/snippets/group_item.html", group=group %}
      {% endfor %}
    </ul>
#}
{% set type = group.type or 'group' %}
{% set url = h.url_for(type ~ '_read', action='read', id=group.name) %}
{% block item %}
<li>
    {% block image %}
    <div class="image">
      <a href="{{ group.url }}">
        <img src="{{ group.image_display_url or h.url_for_static('/base/images/placeholder-group.png') }}" width="190" height="118" alt="{{ group.name }}" />
      </a>
    </div>
    {% endblock %}

  <a href="{{ url }}" title="{{ _('View {name}').format(name=group.display_name) }}">
  EVENT ({{ type, group.type, group.id }}) {{ _('{name}').format(name=group.display_name) }}
  </a>
  <p>{{ h.truncate(group.description, h.event_description_length(), whole_word=True) }}</p>
</li>
{% endblock %}

Remove comment for resolved group.type issue
Remove comment for resolved group.type issue

(see ckanext-mapactionimporter:292bfff for details)
