{% load cms_tags allink_cms_tags sekizai_tags i18n thumbnail allink_image_tags allink_link_tags %}

{% for object in object_list %}
    <div class="grid-item {% if appended %}appended{% endif %}">
        <div class="manage-spacings">

            {% if object.preview_image %}
                <div class="image-container">
                    {% if  instance.detail_link_enabled %}
                        <a href="{% get_absolute_url object instance.apphook_page.application_namespace %}">
                    {% endif %}
                        {% render_image image=object.preview_image %}
                    {% if  instance.detail_link_enabled %}
                        </a>
                    {% endif %}
                </div>
            {% endif %}

            {% if object.title %}
                <div class="heading-container">
                    <h3 class="heading">
                        {% render_model_ajax object "title" %}
                    </h3>
                </div>
            {% endif %}
            {% if object.lead %}
                <div class="lead-container">
                    <p>
                        {{object.lead|striptags}}
                    </p>
                </div>
            {% endif %}
            {% if instance.detail_link_enabled %}
                <div class="link-container">
                    {% get_absolute_url object instance.apphook_page.application_namespace as link_url %}
                    {% trans "More" as link_label %}

                    {% if instance.softpage_enabled %}
                        {% include "partials/buttons/link.html" with link_url=link_url link_label=link_label link_classes="app-list__detail-link" link_attributes="data-trigger-softpage" icon="softpage" %}
                    {% else %}
                        {% include "partials/buttons/link.html" with link_url=link_url link_label=link_label link_classes="app-list__detail-link" %}
                    {% endif %}
                </div>
            {% endif %}
        </div>
    </div>

{% endfor %}
