Hide ID when only one reply to address is shown

Most user will only have one reply to address. Which means they should
never have to worry about IDs. And if you only have one then you never
need its ID, because the last remaining address will always be the
default.

So IDs should only be shown when a service has created more than one
reply to address.

This required a bit of visual tweaking of the _user list_ pattern,
because its spacing wasn’t defined in a way that worked when only the
name of the thing, and not its details were shown on the page.
This commit is contained in:
Chris Hill-Scott
2017-09-28 11:35:52 +01:00
parent c78fac911a
commit c35088796a
3 changed files with 20 additions and 3 deletions

View File

@@ -42,12 +42,12 @@
&-list {
@extend %grid-row;
margin-top: 5px;
position: relative;
&-permissions {
@include grid-column(3/4);
margin-top: 5px;
li {
display: block;
@@ -59,7 +59,7 @@
&-edit-link {
text-align: right;
position: absolute;
top: -1.6em;
top: -25px;
right: -135px;
}

View File

@@ -39,7 +39,9 @@
<a href="{{ url_for('.service_edit_email_reply_to', service_id =current_service.id, reply_to_email_id = item.id) }}">Change</a>
</li>
</ul>
{{ api_key(item.id, thing="ID") }}
{% if reply_to_email_addresses|length > 1 %}
{{ api_key(item.id, thing="ID") }}
{% endif %}
</div>
{% endfor %}
</div>