{% extends "base.html" %} {% set title = t({'customer': 'Customers', 'vendor': 'Vendors'}.get(ptype, m.title)) %} {% block title %}{{ title }}{% endblock %} {% block content %}

{{ title }} ({{ rows|length }})

{% if ptype %}{% endif %} {% if archived %}{% endif %}
{% if editable %}+ {{ t('New') }}{% endif %}
{% if archivable %} {% set base_args = {'type': ptype} if ptype else {} %}
{{ t('Active') }} {{ counts.get(1, 0) }} {{ t('Archived') }} {{ counts.get(0, 0) }} {{ t('All') }}
{% endif %}
{% for fld in m.fields if fld.list %}{{ t(fld.label) }}{% endfor %} {% for r in rows %} {% for fld in m.fields if fld.list %} {% set v = r[fld.name] %} {% if fld.type == 'checkbox' %}{{ '✓' if v else '' }} {% elif fld.options %}{{ options[fld.name].get(v, v) if v is not none else '' }} {% elif fld.type == 'money' %}{{ v|money }} {% elif fld.type == 'number' %}{{ v if v is not none else '' }} {% elif fld.type == 'text_ar' %}{{ v or '' }} {% else %}{{ v or '' }}{% endif %} {% endfor %} {% else %} {{ t('Nothing yet.') }} {% endfor %}
{% endblock %}