{% load cms_tags allink_cms_tags sekizai_tags i18n thumbnail allink_image_tags %}

{% for object in object_list %}

    <div class="locations-plugin imprint-container {{ instance.css_classes }}">

        <div class="text-container">
            <h4 class="heading">{% trans "Website operator" %}</h4>

            {% if object.title %}
                <p>{% render_model_ajax object "title" %}</p>
            {% endif %}

            <p>
                {% if object.subtitle %}
                    {{object.subtitle}}<br>
                {% endif %}
                {% if object.street %}
                    {{object.street}} {{object.street_nr}}<br>
                {% endif %}
                {% if object.zip_code or object.place %}
                    {{object.zip_code}} {{object.place}}<br>
                {% endif %}
                {% if object.map_link %}
                    {% trans "Directions" as link_label %}
                    {% include "partials/buttons/link.html" with link_url=object.map_link link_label=link_label link_classes="text" link_attributes='target="_blank" rel="noopener"' icon="arrow-external" %}
                {% endif %}
            </p>

            <p>
                {% if object.email %}
                    {% trans "E-mail" as link_label %}
                    {% include "partials/buttons/link.html" with link_prefix="mailto:" link_url=object.email link_label=link_label link_classes="text" %}<br>
                {% endif %}
                {% if object.phone %}
                    {% include "partials/buttons/link.html" with link_prefix="tel:" link_url=object.phone link_label=object.phone_formatted link_classes="text" %}<br>
                {% endif %}
                {% if object.mobile %}
                    {% include "partials/buttons/link.html" with link_prefix="tel:" link_url=object.mobile link_label=object.mobile_formatted link_classes="text" %}<br>
                {% endif %}
                {% if object.fax %}
                    {% include "partials/buttons/link.html" with link_prefix="tel:" link_url=object.fax link_label=object.fax_formatted link_classes="text" %}
                {% endif %}
            </p>

            {% if object.commercial_register_entry %}
                <p class="text-label">{% trans 'Commercial register entry' %}</p>
                <p>{{ object.commercial_register_entry }}</p>
            {% endif %}

        </div>

    </div>

{% endfor %}
