{% extends 'base.html' %} {# if all items are same type then don't show it #} {% block body_class %} {% if instanceOf %}same-type{% endif %} {% endblock %} {% block body %}
{% for item in paginator.rows %} {% if not item.label %} {% set item = item.object %} {% endif %} {% set ns = namespace(is_work=false) %} {% for claim in item.claims %} {% if claim.property.id == 'P1' %} {% if 'work' in claim.object.label.text %} {% set ns.is_work = true %} {% endif %} {% endif %} {% endfor %} {% if ns.is_work %}
    {% for claim in item.claims %} {% if claim.property.id == 'P1' %}
  • {{ claim.object.label.text }}
  • {% endif %} {% endfor %}
    {% for claim in item.claims %} {% if claim.property.id == 'P9' %}
  • {{ claim.object.label.text }}
  • {% endif %} {% endfor %}
    {% for claim in item.claims %} {% if claim.property.id == 'P15' or claim.property.id == 'P15' %}
  • {{ claim.object.label.text }}
  • {% endif %} {% endfor %}

{{ item.label.text }}

{# max 3 images #} {% if item.claims|selectattr('type', 'equalto', 'localMedia')|list|length > 0 %}
{% for claim in (item.claims|selectattr('type', 'equalto', 'localMedia')|list)[:3] %} {% endfor %} {% if item.claims|selectattr('type', 'equalto', 'localMedia')|list|length > 3 %}
...
{% endif %}
{% endif %} {# {% set images = item.claims|selectattr('type', 'equalto', 'localMedia')|list %} {% if images|length > 0 %}
{% for claim in images[:3] %} {% endfor %} {% if images|length > 3 %}
...
{% endif %} #}

{{ item.description.text }}

{% else %}
    {% for claim in item.claims %} {% if claim.property.id == 'P1' %}
  • {{ claim.object.label.text }}
  • {% endif %} {% endfor %}

{{ item.label.text }}

{{ item.description.text }}

{% endif %} {% endfor %}
{% endblock %}