mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-05 17:28:31 +02:00
Slight abstraction
This commit is contained in:
parent
1841b2f728
commit
7ea27e3aa2
2 changed files with 33 additions and 35 deletions
|
@ -0,0 +1,27 @@
|
|||
{% load i18n static %}
|
||||
|
||||
{% if start_opened %}
|
||||
<details class="margin-top-1 dja-detail-table" open>
|
||||
{% else %}
|
||||
<details class="margin-top-1 dja-detail-table">
|
||||
{% endif%}
|
||||
<summary class="padding-1 dja-details-summary">Details</summary>
|
||||
<div class="grid-container padding-left-0 padding-right-0 dja-details-contents">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Title</th>
|
||||
<td>{{ user.title }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Email</th>
|
||||
<td>{{ user.email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Phone</th>
|
||||
<td>{{ user.phone }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
|
@ -23,43 +23,13 @@ This is using a custom implementation fieldset.html (see admin/fieldset.html)
|
|||
{% endif %}
|
||||
</div>
|
||||
{% if field.field.name == "creator" %}
|
||||
<ul>
|
||||
{% if original.creator.title %}
|
||||
<li>{{ original.creator.title }}</li>
|
||||
{% endif %}
|
||||
|
||||
{% if original.creator.email %}
|
||||
<li>{{ original.creator.email }}</li>
|
||||
{% endif %}
|
||||
|
||||
{% if original.creator.phone %}
|
||||
<li>{{ original.creator.phone }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% include "django/admin/includes/domain_request_detail_table.html" with user=original.creator start_opened=True %}
|
||||
{% elif field.field.name == "submitter" %}
|
||||
<details class="dja-detail-table" open>
|
||||
<summary class="padding-1 dja-details-summary">Details</summary>
|
||||
<div class="grid-container padding-left-0 padding-right-0 dja-details-contents">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Title</th>
|
||||
<td>{{ original.submitter.title }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Email</th>
|
||||
<td>{{ original.submitter.email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Phone</th>
|
||||
<td>{{ original.submitter.phone }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
{% include "django/admin/includes/domain_request_detail_table.html" with user=original.submitter start_opened=True %}
|
||||
{% elif field.field.name == "authorizing_official" %}
|
||||
{% include "django/admin/includes/domain_request_detail_table.html" with user=original.authorizing_official start_opened=True %}
|
||||
{% elif field.field.name == "other_contacts" %}
|
||||
<details class="dja-detail-table">
|
||||
<details class="margin-top-1 dja-detail-table">
|
||||
<summary class="padding-1 dja-details-summary">Details</summary>
|
||||
<div class="grid-container padding-left-0 padding-right-0 dja-details-contents">
|
||||
<table>
|
||||
|
@ -77,6 +47,7 @@ This is using a custom implementation fieldset.html (see admin/fieldset.html)
|
|||
</div>
|
||||
</details>
|
||||
{% endif %}
|
||||
|
||||
{% if field.field.help_text %}
|
||||
<div class="help"{% if field.field.id_for_label %} id="{{ field.field.id_for_label }}_helptext"{% endif %}>
|
||||
<div>{{ field.field.help_text|safe }}</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue