23 lines
721 B
HTML
23 lines
721 B
HTML
{% extends "core/base.html" %}
|
|
{% load render_table from django_tables2 %}
|
|
{% block section_title %}List of Customers{% endblock %}
|
|
{% block content %}
|
|
{% if request.user.is_superuser %}
|
|
<div class="row mb-3">
|
|
<div class="col">
|
|
<button hx-get="{% url 'customer_create' %}" hx-target="#htmx-modal-position" class="btn btn-primary"
|
|
_="on htmx:afterOnLoad wait 10ms then add .show to #modal then add .show to #modal-backdrop">Add Customer</button>
|
|
</div>
|
|
<div class="col" id="htmx-modal-position"></div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="row">
|
|
<div class="col">
|
|
<div class="table-responsive">
|
|
{% render_table customers %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|