{% extends "item_base.html" %}
{% load static %}
{% load i18n %}
{% load l10n %}
{% load humanize %}
{% load mastodon %}
{% load strip_scheme %}
{% load thumb %}
<!-- class specific details -->
{% block details %}
  <div>{% include '_people.html' with people=item.additional_title _role='' max=99 %}</div>
  <div>
    {% if item.opening_date %}
      {% trans "opening date" %}:
      <span>{{ item.opening_date }}</span>
      {% if item.closing_date %}~ <span>{{ item.closing_date }}</span>{% endif %}
    {% endif %}
  </div>
  <div>{% include '_people.html' with people=item.genre role='genre' max=5 %}</div>
  <div>{% include '_people.html' with people=item.troupe role='troupe' max=5 %}</div>
  <div>{% include '_people.html' with people=item.location role='theater' max=5 %}</div>
  <div>{% include '_people.html' with people=item.language role='language' max=5 %}</div>
  <div>{% include '_people.html' with people=item.orig_creator role='original creator' max=5 %}</div>
  <div>{% include '_people.html' with people=item.director role='director' max=5 %}</div>
  <div>{% include '_people.html' with people=item.playwright role='playwright' max=5 %}</div>
  <div>{% include '_people.html' with people=item.composer role='composer' max=5 %}</div>
  <div>{% include '_people.html' with people=item.choreographer role='choreographer' max=5 %}</div>
  <div>{% include '_actor.html' with people=item.actor role='actor' max=10 %}</div>
  <div>{% include '_people.html' with people=item.performer role='performer' max=10 %}</div>
  <div>{% include '_crew.html' with people=item.crew_by_role role='crew' max=10 %}</div>
  <div>
    {% if item.official_site %}
      {% trans 'website' %}: <span>{{ item.official_site|urlizetrunc:24 }}</span>
    {% endif %}
  </div>
{% endblock %}
{% block content %}
  {% with item.all_productions as productions %}
    {% if productions %}
      <h5>{% trans 'production' %}</h5>
      <div>
        {% for prod in productions %}
          <hgroup>
            <h6>
              <a href="{{ prod.url }}">{{ prod.display_title }}</a>
            </h6>
            <div>
              {% if prod.opening_date %}
                <span>{{ prod.opening_date }}</span>
                {% if prod.closing_date %}~ <span>{{ prod.closing_date }}</span>{% endif %}
              {% endif %}
              {% include '_people.html' with people=prod.troupe _role='troupe' max=2 %}
              {% include '_people.html' with people=prod.location _role='production theater' max=2 %}
              {% include '_people.html' with people=prod.language _role='language' max=5 %}
            </div>
            <div class="tldr-2">
              {% include '_people.html' with people=prod.director role='director' max=2 %}
              {% include '_people.html' with people=prod.playwright role='playwright' max=2 %}
              {% include '_actor.html' with people=prod.actor role='actor' max=5 %}
              {% include '_people.html' with people=prod.performer role='performer' max=5 %}
              {% include '_people.html' with people=prod.composer role='composer' max=2 %}
              {% include '_people.html' with people=prod.choreographer role='choreographer' max=2 %}
            </div>
          </hgroup>
        {% endfor %}
      </div>
    {% endif %}
  {% endwith %}
{% endblock %}
