{% load i18n smart_if attachments_base fb_versions %}
{% if articles %}
<div id="articles">
    {% for item in articles.object_list %}
    <div class="item{% cycle '' ' even' %}">
        <p class="date">{{ item.time_create|date:"d. N Y" }}</p>
        <h2>
            <a href="{{ item.get_absolute_url }}" title="{{ item.get_title }}">
                {{ item.get_title }}
            </a>
        </h2>
        
        {% get_attachments item as attachments %}
        {% if attachments.icons %}
        <div class="icon">
        {% for image in attachments.icons %}
            {% version_object image.file image.get_size as thumbnail %}
            <a href="{{ item.get_absolute_url }}" title="{{ image.title|default:item }}"><img src="{{ thumbnail }}" title="{{ image.title|default:item }}" alt="{{ image.title|default:item }}" /></a>
        {% endfor %}
        </div>
        {% endif %}
        <div class="desc">
            {% if item.get_annotation %}<p>{{ item.get_annotation|truncatewords_html:30 }} <a href="{{ item.get_absolute_url }}" title="Zobrazit celý článek" class="more">celý článek &raquo;</a></p>{% else %}
            {{ item.get_content.content|truncatewords_html:30 }} <a href="{{ item.get_absolute_url }}" title="Zobrazit celý článek" class="more padd">celý článek &raquo;</a>{% endif %}
        </div>
        {% if not item.get_annotation %}{% include "include/attachments_list.html" %}{% endif %}
        <div class="clear"></div>
    </div>
    {% endfor %}
</div>
{% endif %}
