feat: add rel create / update buttons to profiles

See #109
This commit is contained in:
James Graham
2021-03-18 17:52:14 +00:00
parent 2c68877cc8
commit c20b2b5a0a
5 changed files with 73 additions and 7 deletions

View File

@@ -24,8 +24,25 @@
<hr>
<a class="btn btn-success"
href="{% url 'people:organisation.update' pk=organisation.pk %}">Update</a>
<div class="row justify-content-md-center">
<div class="col-md-3">
<a class="btn btn-warning btn-block"
href="{% url 'people:organisation.update' pk=organisation.pk %}">Update Organisation</a>
</div>
<div class="col-md-3">
{% if relationship %}
<a class="btn btn-warning btn-block"
href="{% url 'people:organisation.relationship.create' organisation_pk=organisation.pk %}">Update Relationship
</a>
{% else %}
<a class="btn btn-success btn-block"
href="{% url 'people:organisation.relationship.create' organisation_pk=organisation.pk %}">New Relationship
</a>
{% endif %}
</div>
</div>
<hr>

View File

@@ -24,6 +24,23 @@
<hr>
<div class="row justify-content-md-center">
<div class="col-md-3">
{% if relationship %}
<a class="btn btn-warning btn-block"
href="{% url 'people:person.relationship.create' person_pk=person.pk %}">Update Relationship
</a>
{% else %}
<a class="btn btn-success btn-block"
href="{% url 'people:person.relationship.create' person_pk=person.pk %}">New Relationship
</a>
{% endif %}
</div>
</div>
<hr>
{% if person.user != request.user and request.user.is_superuser %}
<div class="alert alert-warning">
<strong>NB:</strong> You are able to see the details of this person because you are an admin.

View File

@@ -22,9 +22,22 @@
<h1>{{ person.name }}</h1>
<a class="btn btn-success"
href="{% url 'people:person.relationship.create' person_pk=person.pk %}">New Relationship
</a>
<hr>
<div class="row justify-content-md-center">
<div class="col-md-3">
{% if relationship %}
<a class="btn btn-warning btn-block"
href="{% url 'people:person.relationship.create' person_pk=person.pk %}">Update Relationship
</a>
{% else %}
<a class="btn btn-success btn-block"
href="{% url 'people:person.relationship.create' person_pk=person.pk %}">New Relationship
</a>
{% endif %}
</div>
</div>
<hr>