{# Template principal del plugin #}
{% extends "djangocms_zb_repository/base.html" %}
{% load i18n cms_tags zb_tags %}
{% block content %}
{% if not request.user.is_authenticated and not instance.category.is_public %}
{% trans "The main category is not public." %}
{% else %}
{% if instance.category.has_files %}
{{ instance.category.name }}
{% else %}
{{ instance.category.name }}
{% endif %}
{% if request.toolbar.edit_mode_active and perms.zb_repository.change_category %}
{% render_model_icon instance.category %}
{% endif %}
{% endif %}
{# Formulario de busqueda #}
{{ full_category_name }}
{% trans 'Categories' %}
{% if request.toolbar.edit_mode_active and perms.zb_repository.add_category %}
{% render_model_add instance.category %}
{% endif %}
{% trans 'Files' %}
{% if request.toolbar.edit_mode_active and perms.zb_repository.add_file and perms.zb_repository.add_fileextended and files %}
{% render_model_add files.0 %}
{% endif %}
{# Menu de categorias #}
{% for category in categories %}
{{ forloop.counter }} {{ category.name }}
{% if request.toolbar.edit_mode_active and perms.zb_repository.change_category %}
{% render_model_icon category %}
{% endif %}
{% zb_concat "djangocms_zb_repository/" instance.template "/includes/category.html" as template %}
{% include template with parent_cons=forloop.counter %}
{% endfor %}
{# Archivos #}
{% if request.GET.search %}
{% trans 'Search results for' %} "{{ request.GET.search }}".
{% endif %}
{# Include Template File List #}
{% if files %}
{% zb_concat "djangocms_zb_repository/" instance.template "/includes/file_list.html" as template %}
{% include template %}
{% else %}
{% if not request.GET.search %}
{% trans 'Select a category with files.' %}
{% endif %}
{% endif %}
{% endblock %}
{% comment %}
{{ instance.category }}
{{ instance.pagination }} #Number of items per page
{{ instance.target }}
{{ files }}
{{ categories }}
# files list variables:
{{ file_extended }} object
{{ description }}
{{ file_url }}
# file_extended list variables:
{{ title }}
{{ category }} object
{{ published }}
# categories list variables:
{{ name }}
{{ parent }}
{{ published }}
{{ children }}
# pagination list variables:
{{ info_publications.has_previous }}
{{ info_publications.has_next }}
{{ info_publications.previous_page_number }}
{{ info_publications.next_page_number }}
{{ info_publications.number }}
{{ paginator.page_range }}
{{ paginator.num_pages }}
{% endcomment %}