mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
fix: hide relationship buttons on own profile page
This commit is contained in:
@@ -22,30 +22,32 @@
|
||||
|
||||
<h1>{{ person.name }}</h1>
|
||||
|
||||
<hr>
|
||||
{% if person.user != request.user %}
|
||||
<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 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>
|
||||
<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>
|
||||
|
||||
{% 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>
|
||||
{% endif %}
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -22,30 +22,32 @@
|
||||
|
||||
<h1>{{ person.name }}</h1>
|
||||
|
||||
<hr>
|
||||
{% if person.user != request.user %}
|
||||
<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 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>
|
||||
<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>
|
||||
|
||||
{% 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>
|
||||
{% endif %}
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -37,17 +37,19 @@
|
||||
<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>
|
||||
{% 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>
|
||||
{% 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>
|
||||
|
||||
Reference in New Issue
Block a user