feat: add relationship buttons on person list

Resolves #63
This commit is contained in:
James Graham
2021-02-01 15:47:51 +00:00
parent 4bbe4eac3a
commit afae0fd943
2 changed files with 25 additions and 4 deletions

View File

@@ -28,6 +28,19 @@
<td>
<a class="btn btn-sm btn-info"
href="{% url 'people:person.detail' pk=person.pk %}">Profile</a>
{% 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 %}
</td>
</tr>