{% load wagtailcore_tags wagtail_richer_text_tags wagtail_synopsis_tags %}

<article class="abstract {{synopsis.prominence_css_class}}-prominence prominence-order-{{synopsis.prominence_order}}">
  <div class="abstract-description">
  {% if self.show_rubrics %}{% if synopsis.rubric_url %}<a class="abstract-rubric" href="{{ synopsis.rubric_url }}">{{ synopsis.rubric }}</a>{% else %}{{ synopsis.rubric }}{% endif %}{% endif %}
  {% if self.show_publishing_date %}<span class="abstract-detail abstract-publishing-date">{{ synopsis.last_date_time|date:"j F Y" }}</span>{% endif %}{% if self.show_publishing_date and synopsis.last_date_time and self.show_authors and synopsis.names %}{% endif %}
  {% if synopsis.has_destination_url %}<a href="{% synopsis_destination_url synopsis request=request %}">{% endif %}<h3 class="abstract-heading">{{ synopsis.heading }}</h3>{% if synopsis.has_destination_url %}</a>{% endif %}
  {% if synopsis.has_destination_url %}<a href="{% synopsis_destination_url synopsis request=request %}" class="abstract-summary">{{ synopsis.summary|richertext|strip_paragraphs }}</a>{% else %}
  <div class="abstract-summary">{{ synopsis.summary|richertext|strip_paragraphs }}</div>
  {% endif %}
  {% if self.show_authors and synopsis.names %}
  {% include_block synopsis.names %}
  {% endif %}
  {% if self.show_tags and synopsis.tags %}
  <span class="abstract-tags">
    {% for tag in synopsis.tags.all %}
    <span {% if layout_block.meta.tag_classname %}class="{{ layout_block.meta.tag_classname }}"{% endif %}>{{ tag.name }}</span>
    {% endfor %}
  </span>
  {% endif %}
  </div>
</article>
