{% extends "orga/settings/base.html" %}
{% load bootstrap4 %}
{% load i18n %}
{% block settings_content %}

<div>
    <legend>
        {{ request.event.rooms.count }}
        {% blocktrans trimmed count count=request.event.rooms.count %}
        Room
        {% plural %}
        Rooms
        {% endblocktrans %}
    </legend>

    <table class="table table-condensed table-responsive-md">
        <thead>
            <tr>
                <th>{% trans "Name" %}</th>
                <th>{% trans "Capacity" %}</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            {% for room in request.event.rooms.all %}
                <tr>
                    <td>
                        <a href="{{ room.urls.settings_base }}">
                            {{ room.name }}
                        </a>
                    </td>
                    <td>{{ room.capacity }}</td>
                    <td class="text-right">
                        <a href="{{ room.urls.edit_settings }}"
                            class="btn btn-sm btn-secondary">
                            <span class="fa fa-pencil"></span>
                        </a>
                        <a href="{{ room.urls.delete }}"
                            class="btn btn-sm btn-secondary">
                            <span class="fa fa-trash"></span>
                        </a>
                    </td>
                </tr>
            {% empty %}
                <tr><td> {% trans "Please add at least one place in which talks can take place." %} </td></tr>
            {% endfor %}
        </tbody>
    </table>

    <a class="btn btn-primary" href="{{ request.event.orga_urls.new_room }}">
        <span class="fa fa-cross"></span>
        {% trans "New room" %}
    </a>
</div>
{% endblock %}
