feat: add relationship buttons on person list

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

No files matched your search

+13
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>