mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-20 08:24:05 +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 {
|
p {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dotgov-table {
|
||||||
.usa-table {
|
.usa-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "dashboard_base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block title %}Domain {{ domain.name }}{% endblock %}
|
{% block title %}Domain {{ domain.name }}{% endblock %}
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@
|
||||||
<div class="grid-col-9">
|
<div class="grid-col-9">
|
||||||
<main id="main-content" class="grid-container">
|
<main id="main-content" class="grid-container">
|
||||||
|
|
||||||
|
{% block domain_content %}
|
||||||
<h1>Domain {{ domain.name }}</h1>
|
<h1>Domain {{ domain.name }}</h1>
|
||||||
|
|
||||||
{% block domain_content %}
|
|
||||||
{% endblock %} {# domain_content #}
|
{% endblock %} {# domain_content #}
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{% extends "domain_base.html" %}
|
{% extends "domain_base.html" %}
|
||||||
|
|
||||||
{% block domain_content %}
|
{% block domain_content %}
|
||||||
|
{{ block.super }}
|
||||||
<p>Active: {% if domain.is_active %}Yes{% else %}No{% endif %}</p>
|
<p>Active: {% if domain.is_active %}Yes{% else %}No{% endif %}</p>
|
||||||
{% endblock %} {# domain_content #}
|
{% endblock %} {# domain_content #}
|
||||||
|
|
|
@ -1,10 +1,33 @@
|
||||||
{% extends "domain_base.html" %}
|
{% extends "domain_base.html" %}
|
||||||
|
|
||||||
|
{% block title %}User management{% endblock %}
|
||||||
|
|
||||||
{% block domain_content %}
|
{% block domain_content %}
|
||||||
<h2>Users</h2>
|
<h1>User management</h1>
|
||||||
<ul>
|
|
||||||
{% for user in domain.users.all %}
|
{% if domain.permissions %}
|
||||||
<li>{{ user }} <{{ user.email }}></li>
|
<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 %}
|
{% endfor %}
|
||||||
</ul>
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div
|
||||||
|
class="usa-sr-only usa-table__announcement-region"
|
||||||
|
aria-live="polite"
|
||||||
|
></div>
|
||||||
|
{% endif %}
|
||||||
{% endblock %} {# domain_content #}
|
{% endblock %} {# domain_content #}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue