{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_extra_in_heading %}
{% set current_page = 'shops_admin' %}
{% set title = 'Shops' %}

{% block body %}

  <h1>{{ title }} {{ render_extra_in_heading(shops|length) }}</h1>

  {%- if shops %}
  <table class="index wide">
    <thead>
      <tr>
        <th>ID</th>
        <th>Name</th>
      </tr>
    </thead>
    <tbody>
    {%- for shop in shops|sort(attribute='title')|sort(attribute='title') %}
      <tr>
        <td class="monospace"><a href="{{ url_for('.view_for_shop', shop_id=shop.id) }}">{{ shop.id }}</a></td>
        <td>{{ shop.title }}</td>
      </tr>
    {%- endfor %}
    </tbody>
  </table>
  {%- else %}
  <div class="dimmed-box centered">Es sind keine Shops hinterlegt.</div>
  {%- endif %}

{%- endblock %}

{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_extra_in_heading %}
{% from 'macros/misc.html' import render_tag %}
{% set current_page = 'shops_admin' %}
{% set title = 'Shops' %}

{% block body %}

  <h1>{{ title }} {{ render_extra_in_heading(shops|length) }}</h1>

  {%- if shops %}
  <table class="index wide">
    <thead>
      <tr>
        <th>ID</th>
        <th>Name</th>
        <th>Status</th>
      </tr>
    </thead>
    <tbody>
    {%- for shop in shops|sort(attribute='title')|sort(attribute='title') %}
      <tr>
        <td class="monospace"><a href="{{ url_for('.view_for_shop', shop_id=shop.id) }}">{{ shop.id }}</a></td>
        <td>{{ shop.title }}</td>
        <td>
        {%- if shop.closed %}
          {{ render_tag('geschlossen', icon='disabled', class='color-danger') }}
        {%- else %}
          {{ render_tag('geöffnet', icon='success', class='color-success') }}
        {%- endif %}
        </td>
      </tr>
    {%- endfor %}
    </tbody>
  </table>
  {%- else %}
  <div class="dimmed-box centered">Es sind keine Shops hinterlegt.</div>
  {%- endif %}

{%- endblock %}

Include opening state in admin list of shops
Include opening state in admin list of shops
