Merge pull request #1582 from alphagov/show-letters-contact-with-linebreaks

Tidy up layout of letter contact blocks
This commit is contained in:
Chris Hill-Scott
2017-10-26 12:28:00 +01:00
committed by GitHub
2 changed files with 21 additions and 13 deletions

View File

@@ -1,3 +1,5 @@
$item-top-padding: $gutter-half;
.user-list {
@include core-19;
@@ -5,8 +7,9 @@
&-item {
padding: $gutter-half 150px $gutter-half 0;
padding: $item-top-padding 150px $gutter-half 0;
border-top: 1px solid $border-colour;
position: relative;
&:last-child {
border-bottom: 1px solid $border-colour;
@@ -14,4 +17,11 @@
}
&-edit-link {
text-align: right;
position: absolute;
top: $item-top-padding;
right: 0px;
}
}

View File

@@ -27,18 +27,16 @@
{% endif %}
{% for item in letter_contact_details %}
<div class="user-list-item">
<h3>
<span class="heading-small">{{ item.contact_block }}</span>&ensp;<span class="hint">
{%- if item.is_default -%}
(default)
{% endif %}
</span>
</h3>
<ul class="tick-cross-list">
<li class="tick-cross-list-edit-link">
<a href="{{ url_for('.service_edit_letter_contact', service_id =current_service.id, letter_contact_id = item.id) }}">Change</a>
</li>
</ul>
<p>
{{ item.contact_block | nl2br | safe }}
</p>
<p class="hint">
{%- if item.is_default -%}
(default)
{% endif %}
</p>
<a class="user-list-edit-link" href="{{ url_for('.service_edit_letter_contact', service_id =current_service.id, letter_contact_id = item.id) }}">Change</a>
{% if letter_contact_details|length > 1 %}
{{ api_key(item.id, thing="ID") }}
{% endif %}