feat: add view to end relationship

This commit is contained in:
James Graham
2021-03-19 12:00:32 +00:00
parent 8093b23870
commit 42d95beb5a
10 changed files with 160 additions and 19 deletions

View File

@@ -37,6 +37,14 @@
</a>
{% endif %}
</div>
{% if relationship %}
<div class="col-md-3">
<a class="btn btn-danger btn-block"
href="{% url 'people:relationship.end' pk=relationship.pk %}">End Relationship
</a>
</div>
{% endif %}
</div>
<hr>

View File

@@ -37,6 +37,14 @@
</a>
{% endif %}
</div>
{% if relationship %}
<div class="col-md-3">
<a class="btn btn-danger btn-block"
href="{% url 'people:relationship.end' pk=relationship.pk %}">End Relationship
</a>
</div>
{% endif %}
</div>
<hr>

View File

@@ -13,7 +13,15 @@
<tbody>
{% for relationship in person.relationships_as_source.all %}
<tr>
<td>{{ relationship.target }}</td>
<td>
{% if relationship.is_current %}
{{ relationship.target }}
{% else %}
<del>
{{ relationship.target }}
</del>
{% endif %}
</td>
<td>
<a class="btn btn-sm btn-info"
href="{% url 'people:person.detail' pk=relationship.target.pk %}">Profile</a>