byceps/byceps

View on GitHub
byceps/blueprints/admin/seating/templates/admin/seating/seat_group_index.html

Summary

Maintainability
Test Coverage
{% extends 'layout/admin/seating.html' %}
{% from 'macros/admin.html' import render_extra_in_heading %}
{% set current_page_party = party %}
{% set current_tab = 'seat_groups' %}
{% set page_title = [_('Seat Groups'), party.title] %}

{% block body %}

  <h1 class="title">{{ _('Seat Groups') }} {{ render_extra_in_heading(groups|length) }}</h1>

  {%- if groups %}
  <table class="itemlist is-vcentered is-wide">
    <thead>
      <tr>
        <th>{{ _('Area') }}</th>
        <th>{{ _('ID') }}</th>
        <th>{{ _('Description') }}</th>
        <th>{{ _('Ticket category') }}</th>
      </tr>
    </thead>
    <tbody>
      {%- for group in groups|sort(attribute='title') %}
      <tr>
        <td colspan="4"><strong>{{ group.title }}</strong></td>
      </tr>
        {%- for seat in group.seats %}
      <tr>
        <td></td>
        <td>{{ seat.id }}</td>
        <td>{{ seat.label|fallback }}</td>
        <td>{{ seat.category.title }}</td>
      </tr>
        {%- endfor %}
      {%- endfor %}
    </tbody>
  </table>
  {%- else %}
  <div class="box">
    <div class="dimmed-box centered">{{ _('No seat groups exist for this party.') }}</div>
  </div>
  {%- endif %}

{%- endblock %}