byceps/byceps

View on GitHub
byceps/blueprints/admin/shop/catalog/templates/admin/shop/catalog/index_for_shop.html

Summary

Maintainability
Test Coverage
{% extends 'layout/admin/shop/catalog.html' %}
{% from 'macros/admin.html' import render_extra_in_heading %}
{% set page_title = _('Catalogs') %}

{% block body %}

  <h1 class="title">{{ page_title }} {{ render_extra_in_heading(catalogs|length) }}</h1>

  {%- if catalogs %}
  <table class="itemlist is-wide">
    <thead>
      <tr>
        <th>{{ _('Title') }}</th>
      </tr>
    </thead>
    <tbody>
      {%- for catalog in catalogs|sort(attribute='id') %}
      <tr>
        <td><a href="{{ url_for('.view', catalog_id=catalog.id) }}"><strong>{{ catalog.title }}</strong></a></td>
      </tr>
      {%- endfor %}
    </tbody>
  </table>
  {%- else %}
  <div class="box">
    <div class="dimmed-box centered">{{ _('No catalogs exist.') }}</div>
  </div>
  {%- endif %}

{%- endblock %}