41 lines
1.6 KiB
HTML
41 lines
1.6 KiB
HTML
{% extends 'base.html' %}
|
|
{% load i18n %}
|
|
{% block title %}{% trans "Representatives" %}{% endblock title %}
|
|
{% block content %}
|
|
<div class="container my-4">
|
|
<h2>{% trans "Representatives" %}</h2>
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<form method="get" class="d-flex">
|
|
<input type="text" name="q" class="form-control form-control-sm" placeholder="{% trans 'Search' %}" value="{{ request.GET.q }}">
|
|
<button type="submit" class="btn btn-sm btn-secondary ms-2">{% trans "Search" %}</button>
|
|
</form>
|
|
<a href="{% url 'representative_create' %}" class="btn btn-sm btn-primary">{% trans "Add Representative" %}</a>
|
|
</div>
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Name" %}</th>
|
|
<th>{% trans "ID Number" %}</th>
|
|
<th>{% trans "Phone" %}</th>
|
|
<th>{% trans "Actions" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for rep in representatives %}
|
|
<tr>
|
|
<td>{{ rep.get_local_name }}</td>
|
|
<td>{{ rep.id_number }}</td>
|
|
<td>{{ rep.phone_number }}</td>
|
|
<td>
|
|
<a href="{% url 'representative_detail' rep.id %}" class="btn btn-sm btn-success">{% trans "view" %}</a>
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="4" class="text-center">{% trans "No representatives found." %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock %} |