| Line | |
|---|
| 1 | {% extends host_template %} |
|---|
| 2 | |
|---|
| 3 | {% load i18n cyclope_utils %} |
|---|
| 4 | |
|---|
| 5 | {% block content %} |
|---|
| 6 | |
|---|
| 7 | {% if not region_view %} |
|---|
| 8 | <div id="categories_navigation"> |
|---|
| 9 | {% if category.parent %} |
|---|
| 10 | <a href="{% url category-teaser_list category.parent.slug %}" class="parent">{{ category.parent.name }}</a> |
|---|
| 11 | {% else %} |
|---|
| 12 | <a href="{% url collection-root_categories_teaser_list category.collection.slug %}" class="parent">{{ category.collection.name }}</a> |
|---|
| 13 | {% endif %} |
|---|
| 14 | |
|---|
| 15 | {% if category.children.all %} |
|---|
| 16 | <ul> |
|---|
| 17 | {% for child in category.children.all %} |
|---|
| 18 | <li> <a href="{% url category-teaser_list child.slug %}" class="children">{{ child.name }}</a> </li> |
|---|
| 19 | {% endfor %} |
|---|
| 20 | </ul> |
|---|
| 21 | {% endif %} |
|---|
| 22 | </div> |
|---|
| 23 | {% endif%} |
|---|
| 24 | |
|---|
| 25 | {% if category.collection.visible %} |
|---|
| 26 | <big class="category_title">{{ category.name }}</big> |
|---|
| 27 | {% endif %} |
|---|
| 28 | |
|---|
| 29 | {% comment %} |
|---|
| 30 | We show a teaser view of every object belonging to this category. |
|---|
| 31 | {% endcomment %} |
|---|
| 32 | |
|---|
| 33 | {% for categorization in categorizations %} |
|---|
| 34 | {% join categorization.content_type.app_label "/" categorization.content_type.model "_labeled_icon.html" as template_path %} |
|---|
| 35 | |
|---|
| 36 | {% comment %} |
|---|
| 37 | we alias the actual object with the model name |
|---|
| 38 | so the included template is reusable |
|---|
| 39 | and can access the content object using an explicit name |
|---|
| 40 | {% endcomment %} |
|---|
| 41 | |
|---|
| 42 | {% alias categorization.content_object as categorization.content_type.model %} |
|---|
| 43 | {% include template_path %} |
|---|
| 44 | {% endfor %} |
|---|
| 45 | |
|---|
| 46 | <!-- <div class="pagEspacio"></div> --> |
|---|
| 47 | {% if page %} |
|---|
| 48 | {% include 'cyclope/pagination_block.html' %} |
|---|
| 49 | {% endif %} |
|---|
| 50 | |
|---|
| 51 | {% endblock %} |
|---|
Note: See
TracBrowser
for help on using the repository browser.