{% extends 'core/widget.html' %}

{% load i18n %}
{% load tags %}

{% block content %}
<ul style="line-height: 180%">
    <li class="{% if agenda_is_active %}activeline{% endif %}">
        <a href="{% url 'projector_activate_slide' 'agenda' %}"
           class="activate_link btn {% if agenda_is_active %}btn-primary{% endif %} btn-mini"
           rel="tooltip" data-original-title="{% trans 'Show' %}">
            <i class="icon-facetime-video {% if agenda_is_active %}icon-white{% endif %}"></i>
        </a>&nbsp;
        <a href="{% url 'projector_preview' 'agenda' %}"
            rel="tooltip" data-original-title="{% trans 'Preview' %}" class="btn btn-mini right">
            <i class="icon-search"></i>
        </a>
        {% trans "Agenda" %}
    </li>
</ul>
<hr>
<ul style="line-height: 180%">
{% for item in items %}
    <li class="{% if item.is_active_slide %}activeline{% endif %}">
        <a href="{{ item|absolute_url:'projector' }}"
           class="activate_link btn {% if item.is_active_slide and active_type == 'text' %}btn-primary{% endif %} btn-mini"
           rel="tooltip" data-original-title="{% trans 'Show' %}">
            <i class="icon-facetime-video {% if item.is_active_slide and active_type == 'text' %}icon-white{% endif %}"></i>
        </a>&nbsp;
        {% if perms.agenda.can_manage_agenda %}
            <a href="{{ item|absolute_url:'update' }}"
                rel="tooltip" data-original-title="{% trans 'Edit' %}" class="btn btn-mini right">
                <i class="icon-pencil"></i>
            </a>
        {% endif %}
        <a href="{{ item|absolute_url:'projector_preview' }}"
            rel="tooltip" data-original-title="{% trans 'Preview' %}" class="btn btn-mini right">
            <i class="icon-search"></i>
        </a>
        <a href="{{ item|absolute_url:'projector_list_of_speakers' }}"
          class="activate_link btn btn-mini right {% if item.is_active_slide and active_type == 'list_of_speakers' %}btn-primary{% endif %}"
          rel="tooltip" data-original-title="{% trans 'Show list of speakers' %}">
          <i class="icon icon-bell {% if item.is_active_slide and active_type == 'list_of_speakers' %}icon-white{% endif %}"></i>
        </a>
        {% if not item.is_leaf_node %}
        <a href="{{ item|absolute_url:'projector_summary' }}"
          class="activate_link btn btn-mini {% if item.is_active_slide and active_type == 'summary' %}btn-primary{% endif %} right"
          rel="tooltip" data-original-title="{% trans 'Show summary for this item' %}">
            <i class="icon-summary {% if item.is_active_slide and active_type == 'summary' %}icon-white{% endif %}"></i>
        </a>
        {% endif %}
        {% for p in item.get_ancestors %}
            <span class="indentation"></span>
        {% endfor %}
        <a href="{{ item|absolute_url }}">{% if item.type == item.ORGANIZATIONAL_ITEM %}<i>[{% endif %}{{ item }}{% if item.type == item.ORGANIZATIONAL_ITEM %}]</i>{% endif %}</a>
        {{ item.get_title_supplement|safe }}
    </li>
{% empty %}
    <li>{% trans 'No items available.' %}</li>
{% endfor %}
</ul>
{% endblock %}
