Files
breccia-mapper/people/templates/people/person/list.html
T

66 lines
2.0 KiB
HTML

{% extends 'base.html' %}
{% block content %}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item active" aria-current="page">People</li>
</ol>
</nav>
<h1>People</h1>
<hr>
<a class="btn btn-success"
href="{% url 'people:person.create' %}">New Person</a>
{% with config.PERSON_LIST_HELP as help_text %}
{% if help_text %}
<div class="alert alert-info mt-3 pb-0">
{{ help_text|linebreaks }}
</div>
{% endif %}
{% endwith %}
<table class="table table-borderless">
<thead>
<tr>
<th>Name</th>
</tr>
</thead>
<tbody>
{% for person in person_list.all %}
<tr>
<td>{{ person }}</td>
<td>
<a class="btn btn-sm btn-info"
href="{% url 'people:person.detail' pk=person.pk %}">Profile</a>
{% if person.user != request.user %}
{% if person.pk in existing_relationships %}
<a class="btn btn-sm btn-warning"
style="width: 10rem"
href="{% url 'people:person.relationship.create' person_pk=person.pk %}">Update Relationship
</a>
{% else %}
<a class="btn btn-sm btn-success"
style="width: 10rem"
href="{% url 'people:person.relationship.create' person_pk=person.pk %}">New Relationship
</a>
{% endif %}
{% endif %}
</td>
</tr>
{% empty %}
<tr>
<td>No records</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}