Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Improve layout and readability of contact details page. #1311

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions go/base/static/css/contacts.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,6 @@
width: 20em;
}
}

.details {
hr {
border: 1px solid #d9d8d3;
border-top: none;
}

h4 {
padding: 8px;
}

section {
padding: 4px;
margin: 8px;
}

.profile {
}

.extras {
max-width: 480px;
}
}
}

#recMatchFrm .modal-dialog {
Expand Down
111 changes: 54 additions & 57 deletions go/contacts/templates/contacts/contact_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,66 +15,63 @@

{% block content_main_list %}
<div class="row">
<div class="col-md-4">
<form class="form-horizontal details" method="post" action="">
{% csrf_token %}
<section class='profile'>
<h4>Contact details</h4>
{% if contact.created_at %}
<p>Contact record created at {{ contact.created_at }}.</p>
{% endif %}
{{ form|crispy }}
</section>
<form class="form-horizontal" method="post" action="">
{% csrf_token %}

{% if contact_extra_items %}
<hr>
<section class="extras">
<h4>Extra details</h4>
<table class="table">
<thead>
<tr>
<th>Name</td>
<th>Value</td>
</tr>
</thead>
<tbody>
{% for field, value in contact_extra_items %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
<div class="col-md-4">
<h4>Contact details</h4>
{% if contact.created_at %}
<p>Contact record created at {{ contact.created_at }}.</p>
{% endif %}
{{ form|crispy }}
</div>

{% if contact_subscription_items %}
<hr>
<section class="extras">
<h4>Subscriptions</h4>
<table class="table">
<thead>
<tr>
<th>Name</td>
<th>Position</td>
</tr>
</thead>
<tbody>
{% for field, value in contact_subscription_items %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
{% if contact_extra_items %}
<div class="col-md-4 col-md-push-1">
<h4>Extra details</h4>
<table class="table">
<thead>
<tr>
<th>Name</td>
<th>Value</td>
</tr>
</thead>
<tbody>
{% for field, value in contact_extra_items %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}

<button type="submit" class="btn btn-primary" data-loading-text="Saving...">Save changes</button>
</form>
</div>
{% if contact_subscription_items %}
<div class="col-md-4 col-md-push-1">
<h4>Subscriptions</h4>
<table class="table">
<thead>
<tr>
<th>Name</td>
<th>Position</td>
</tr>
</thead>
<tbody>
{% for field, value in contact_subscription_items %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}

<button type="submit" class="btn btn-primary" data-loading-text="Saving...">Save changes</button>
</form>
</div>
{% endblock %}

Expand Down