<section class="module module-narrow module-shallow related{{ " related-empty" if not item }}">
<h2 class="module-heading"><i class="icon-medium icon-picture"></i> {{ _('Related') }}</h2>
  <div class="module-content media">
    {% if item %}
      {% with url = h.url_for(controller='related', action='list', id=pkg_name) %}
        <a class="image logo" href="{{ url }}">
          <img src="{{ item.image_url or h.url_for_static('/base/images/placeholder-200x125.png') }}" width="200" height="125" alt="{{ item.title }}" />
        </a>
        <div class="media-content">
          <h3 class="media-heading"><a href="{{ url }}">{{ item.title }}</a></h3>
          <p>{{ h.markdown_extract(item.description, 70) }}</p>
        </div>
      {% endwith %}
    {% else %}
      <p>{% trans %}No apps, ideas, news stories or images have been
      related to this dataset yet.{% endtrans %}</p>
      {% if h.check_access('related_create') %}
        <p class="action">{% link_for _('Add Item'), controller='related', action='new', id=pkg_name, icon='plus', class_='btn' %}</p>
      {% endif %}
    {% endif %}
  </div>
</section>
