mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 09:45:23 +02:00
Styling user management with a table?
This commit is contained in:
parent
96b95bae8a
commit
7c852de743
4 changed files with 35 additions and 9 deletions
|
@ -222,7 +222,9 @@ section.dashboard {
|
|||
p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.dotgov-table {
|
||||
.usa-table {
|
||||
width: 100%;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "dashboard_base.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Domain {{ domain.name }}{% endblock %}
|
||||
|
||||
|
@ -12,9 +12,9 @@
|
|||
<div class="grid-col-9">
|
||||
<main id="main-content" class="grid-container">
|
||||
|
||||
{% block domain_content %}
|
||||
<h1>Domain {{ domain.name }}</h1>
|
||||
|
||||
{% block domain_content %}
|
||||
{% endblock %} {# domain_content #}
|
||||
|
||||
</main>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "domain_base.html" %}
|
||||
|
||||
{% block domain_content %}
|
||||
<p>Active: {% if domain.is_active %}Yes{% else %}No{% endif %}</p>
|
||||
{{ block.super }}
|
||||
<p>Active: {% if domain.is_active %}Yes{% else %}No{% endif %}</p>
|
||||
{% endblock %} {# domain_content #}
|
||||
|
|
|
@ -1,10 +1,33 @@
|
|||
{% extends "domain_base.html" %}
|
||||
|
||||
{% block title %}User management{% endblock %}
|
||||
|
||||
{% block domain_content %}
|
||||
<h2>Users</h2>
|
||||
<ul>
|
||||
{% for user in domain.users.all %}
|
||||
<li>{{ user }} <{{ user.email }}></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h1>User management</h1>
|
||||
|
||||
{% if domain.permissions %}
|
||||
<table class="dotgov-table usa-table usa-table--borderless usa-table--stacked">
|
||||
<caption class="sr-only">Domain users</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable scope="col" role="columnheader">Email</th>
|
||||
<th data-sortable scope="col" role="columnheader">Role</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for permission in domain.permissions.all %}
|
||||
<tr>
|
||||
<th scope="row" role="rowheader" data-sort-value="{{ user.email }}" data-label="Domain name">
|
||||
{{ permission.user.email }}
|
||||
</th>
|
||||
<td data-label="Role">{{ permission.role|title }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div
|
||||
class="usa-sr-only usa-table__announcement-region"
|
||||
aria-live="polite"
|
||||
></div>
|
||||
{% endif %}
|
||||
{% endblock %} {# domain_content #}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue