{% extends host_template %}

{% load comments i18n fb_versions cyclope_utils dbgettext_tags %}

{% block content %}

<div class="content-view article detail article-detail">

  {% if article.pretitle %}
  <h6 class="pretitle">{% trans article.pretitle %}</h6>
  {% endif %}

  <h1 class="title">{% trans article.name  %}</h1>

  <!-- herramientas -->
  {% include 'cyclope/content_tools_block.html' %}

  <!-- descripcion -->
  {% if article.summary %}
  <div class="summary">{{ article|parsed_gettext:"summary"|smart_style }}</div>
  {% endif %}
  <!-- /descripcion -->

  {% if article.pictures %}
  <div id="gallery" class="media-content">
    <ul>
      {% for picture in article.pictures %}
      <li {% if not forloop.first %} style="display:none;" {% endif %} >
        <a href="{% version picture.image.path 'medium' %}"  title="{{ picture.name }}">
          <img src="{% version picture.image.path 'small' %}" alt="{{ picture.name }}" />

        <p>{{ picture.name }}
        {% if article.pictures|length >= 2 %}
        ({{ article.pictures|length }} {% trans "pictures" %})
        {% endif %}
        </p>
        </a>
      </li>
      {% endfor %}
    </ul>
  </div>
  {% endif %}

  <!-- author -->
  {% include "cyclope/author_block.html" %}
  <!-- /autor -->

  <div class="text"><span class="html-text html-content">
    {{ article|parsed_gettext:"text"|smart_style}}
  </span></div>

{% if article.get_last_change_date or article.source %}


{% include "cyclope/source_block.html" with source=article.source %}

{% if article.get_last_change_date %}

    <span class="date">
      {% trans "Last modification date" %}: {{ article.get_last_change_date }}
    </span>
    {% endif %}
{% endif %}

<div class="meta-content">{% include 'collections/categories_navigation_block.html' %}</div>

{% include 'cyclope/related_contents_block.html' %}

{% include 'ratings/rating_block.html' %}

<div class="clear"></div>

<!--COMENTARIOS -->
  {% include 'comments/comments_block.html' %}
</div> <!--termina article_detail -->
{% endblock content%}
