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 { .user-list {
@include core-19; @include core-19;
@@ -5,8 +7,9 @@
&-item { &-item {
padding: $gutter-half 150px $gutter-half 0; padding: $item-top-padding 150px $gutter-half 0;
border-top: 1px solid $border-colour; border-top: 1px solid $border-colour;
position: relative;
&:last-child { &:last-child {
border-bottom: 1px solid $border-colour; 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 %} {% endif %}
{% for item in letter_contact_details %} {% for item in letter_contact_details %}
<div class="user-list-item"> <div class="user-list-item">
<h3> <p>
<span class="heading-small">{{ item.contact_block }}</span>&ensp;<span class="hint"> {{ item.contact_block | nl2br | safe }}
</p>
<p class="hint">
{%- if item.is_default -%} {%- if item.is_default -%}
(default) (default)
{% endif %} {% endif %}
</span> </p>
</h3>
<ul class="tick-cross-list"> <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>
<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>
{% if letter_contact_details|length > 1 %} {% if letter_contact_details|length > 1 %}
{{ api_key(item.id, thing="ID") }} {{ api_key(item.id, thing="ID") }}
{% endif %} {% endif %}