Source

django-swingcms / swingcms / cms / templates / cms / view_collector.html

Full commit
{% load cms_filters %}
{% load i18n %}



<div id='collector'>

    {% if obj.title %}
        <h2>{{ obj.title }}</h2><br />
    {% endif %}

    {% if obj.categories_list %}
        ({% for cat in obj.categories_list %}
            {% if forloop.last %}
                {{ cat }}
            {% else %}
                {{ cat }},
            {% endif %}
        {% endfor %})<br />
        <br />
    {% endif %}

    {% for o in obj.contents %}

        {% if o.template_path %}
            {% include o.template_path %}
        {% else %}

            <div id='preview_generic'>

                <div id='obj_header'>
                    {% if o.title %}
                        <h4>{{ o.title }}</h4><br />
                    {% endif %}
                </div>

                <h5>{% trans 'added' %}:</h5> <div class="date">{{ o.dt_addition|date:'j F Y' }}</div><br />
                <h5>{% trans 'by' %}:</h5> <c>{{ o.owner|default:'unidentified' }}</c><br />
                <br />

                {% if o.image_thumb %}
                    <div class='thumb'>
                        <a class='fancybox' title='{{ o.title }}' href='{{ o.image.url }}'><img src='{{ o.image_thumb.url }}' alt='{{ o.name }}'/></a>
                    </div>
                    <br />
                {% endif %}

                <div class='text'>
                    {% if o.introduction %}
                        {{ o.introduction|linebreaks|truncatewords:30 }}
                    {% else %}
                        {{ o.text|linebreaks|truncatewords:30 }}
                    {% endif %}
                </div><br />

                <div id='obj_footer'>
                    <a class='read_more' href='/view/article/{{ o.id }}'>{% trans 'read more' %}</a>
                </div>

            </div>

        {% endif %}
        <br />

    {% endfor %}

</div>