mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-05 18:53:28 +02:00
Upate summary item for user lists and edit button option
This commit is contained in:
parent
a3606d6497
commit
1511b5deca
1 changed files with 74 additions and 46 deletions
|
@ -1,49 +1,77 @@
|
||||||
|
{% load static url_helpers %}
|
||||||
|
|
||||||
<section class="summary-item margin-top-3">
|
<section class="summary-item margin-top-3">
|
||||||
<hr class="" />
|
<hr class="" />
|
||||||
<p class="summary-item__title
|
<div class="display-flex flex-justify">
|
||||||
text-primary-dark text-semibold
|
<div>
|
||||||
margin-top-0 margin-bottom-05"
|
<p class="summary-item__title
|
||||||
>
|
text-primary-dark text-semibold
|
||||||
{{ title }}
|
margin-top-0 margin-bottom-05"
|
||||||
</p>
|
>
|
||||||
{% if address %}
|
{{ title }}
|
||||||
{% include "includes/organization_address.html" with organization=value %}
|
</p>
|
||||||
{% elif contact %}
|
{% if address %}
|
||||||
{% if list %}
|
{% include "includes/organization_address.html" with organization=value %}
|
||||||
{% if value|length == 1 %}
|
|
||||||
{% include "includes/contact.html" with contact=value|first %}
|
|
||||||
{% else %}
|
|
||||||
<ul class="usa-list usa-list--unstyled margin-top-0">
|
|
||||||
{% for item in value %}
|
|
||||||
<li>
|
|
||||||
<p class="text-semibold margin-top-1 margin-bottom-0">
|
|
||||||
Conatct {{forloop.counter}}
|
|
||||||
</p>
|
|
||||||
{% include "includes/contact.html" with contact=item %}</li>
|
|
||||||
{% empty %}
|
|
||||||
<li>None</li>
|
|
||||||
{% endfor %}</ul></p>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
{% include "includes/contact.html" with contact=value %}
|
|
||||||
{% endif %}
|
|
||||||
{% elif list %}
|
|
||||||
{% if value|length == 1 %}
|
|
||||||
<p class="margin-top-0">{{ value | first }} </p>
|
|
||||||
{% else %}
|
|
||||||
<ul class="usa-list margin-top-0">
|
|
||||||
{% for item in value %}
|
|
||||||
<li>{{ item }}</li>
|
|
||||||
{% empty %}
|
|
||||||
<li>None</li>
|
|
||||||
{% endfor %}</ul></p>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
<p class="margin-top-0">
|
|
||||||
{{ value }}
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
|
{% elif contact %}
|
||||||
|
{% if list %}
|
||||||
|
{% if value|length == 1 %}
|
||||||
|
{% include "includes/contact.html" with contact=value|first %}
|
||||||
|
{% else %}
|
||||||
|
<ul class="usa-list usa-list--unstyled margin-top-0">
|
||||||
|
{% for item in value %}
|
||||||
|
<li>
|
||||||
|
<p class="text-semibold margin-top-1 margin-bottom-0">
|
||||||
|
Conatct {{forloop.counter}}
|
||||||
|
</p>
|
||||||
|
{% include "includes/contact.html" with contact=item %}</li>
|
||||||
|
{% empty %}
|
||||||
|
<li>None</li>
|
||||||
|
{% endfor %}</ul></p>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{% include "includes/contact.html" with contact=value %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% elif list %}
|
||||||
|
{% if value|length == 1 %}
|
||||||
|
<p class="margin-top-0">{{ value | first }} </p>
|
||||||
|
{% else %}
|
||||||
|
<ul class="usa-list margin-top-0">
|
||||||
|
{% for item in value %}
|
||||||
|
<li>{{ item }}</li>
|
||||||
|
{% empty %}
|
||||||
|
<li>None</li>
|
||||||
|
{% endfor %}</ul></p>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% elif users %}
|
||||||
|
{% if value|length == 1 %}
|
||||||
|
<p class="margin-top-0">{{ user.email }} <span class="padding-left-2px text-base"> ({{ value.first.role }}) </span></p>
|
||||||
|
{% else %}
|
||||||
|
<ul class="usa-list usa-list--unstyled margin-top-0">
|
||||||
|
{% for item in value %}
|
||||||
|
<li>{{ user.email }} <span class="padding-left-2px text-base"> ({{ item.role }}) </span></li>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
<p class="margin-top-0">
|
||||||
|
{{ value }}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if edit_link %}
|
||||||
|
<a
|
||||||
|
aria-describedby="summary-item__title"
|
||||||
|
href="{{ edit_link }}"
|
||||||
|
>
|
||||||
|
Edit<span class="sr-only"> {{ title }}</span>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue