mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-27 04:58:42 +02:00
Shrink max-width of tables in widescreen. Constrict Action column to 80px. Add Action column updates to Members table.
This commit is contained in:
parent
73e0cb5adc
commit
dca2f635a2
6 changed files with 21 additions and 25 deletions
|
@ -79,6 +79,8 @@ services:
|
||||||
- POSTGRES_DB=app
|
- POSTGRES_DB=app
|
||||||
- POSTGRES_USER=user
|
- POSTGRES_USER=user
|
||||||
- POSTGRES_PASSWORD=feedabee
|
- POSTGRES_PASSWORD=feedabee
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
|
||||||
node:
|
node:
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -116,8 +116,8 @@ export class DomainRequestsTable extends BaseTable {
|
||||||
<td data-label="Status">
|
<td data-label="Status">
|
||||||
${request.status}
|
${request.status}
|
||||||
</td>
|
</td>
|
||||||
<td class="${ this.portfolioValue ? '' : "width-quarter"}">
|
<td class="width--action-column">
|
||||||
<div class="tablet:display-flex tablet:flex-row">
|
<div class="tablet:display-flex tablet:flex-row flex-wrap">
|
||||||
<a href="${actionUrl}" ${customTableOptions.hasAdditionalActions ? "class='margin-right-2'" : ''}>
|
<a href="${actionUrl}" ${customTableOptions.hasAdditionalActions ? "class='margin-right-2'" : ''}>
|
||||||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
||||||
<use xlink:href="/public/img/sprite.svg#${request.svg_icon}"></use>
|
<use xlink:href="/public/img/sprite.svg#${request.svg_icon}"></use>
|
||||||
|
|
|
@ -56,7 +56,7 @@ export class DomainsTable extends BaseTable {
|
||||||
</svg>
|
</svg>
|
||||||
</td>
|
</td>
|
||||||
${markupForSuborganizationRow}
|
${markupForSuborganizationRow}
|
||||||
<td class="${ this.portfolioValue ? '' : "width-quarter"}">
|
<td class="${ this.portfolioValue ? '' : "width--action-column"}">
|
||||||
<a href="${actionUrl}">
|
<a href="${actionUrl}">
|
||||||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
||||||
<use xlink:href="/public/img/sprite.svg#${domain.svg_icon}"></use>
|
<use xlink:href="/public/img/sprite.svg#${domain.svg_icon}"></use>
|
||||||
|
|
|
@ -48,18 +48,6 @@ export class MembersTable extends BaseTable {
|
||||||
// Get whether the logged in user has edit members permission
|
// Get whether the logged in user has edit members permission
|
||||||
const hasEditPermission = this.portfolioElement ? this.portfolioElement.getAttribute('data-has-edit-permission')==='True' : null;
|
const hasEditPermission = this.portfolioElement ? this.portfolioElement.getAttribute('data-has-edit-permission')==='True' : null;
|
||||||
|
|
||||||
let existingExtraActionsHeader = document.querySelector('.extra-actions-header');
|
|
||||||
|
|
||||||
if (hasEditPermission && !existingExtraActionsHeader) {
|
|
||||||
const extraActionsHeader = document.createElement('th');
|
|
||||||
extraActionsHeader.setAttribute('id', 'extra-actions');
|
|
||||||
extraActionsHeader.setAttribute('role', 'columnheader');
|
|
||||||
extraActionsHeader.setAttribute('class', 'extra-actions-header width-5');
|
|
||||||
extraActionsHeader.innerHTML = `
|
|
||||||
<span class="usa-sr-only">Extra Actions</span>`;
|
|
||||||
let tableHeaderRow = this.tableWrapper.querySelector('thead tr');
|
|
||||||
tableHeaderRow.appendChild(extraActionsHeader);
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
'hasAdditionalActions': hasEditPermission,
|
'hasAdditionalActions': hasEditPermission,
|
||||||
'UserPortfolioPermissionChoices' : data.UserPortfolioPermissionChoices
|
'UserPortfolioPermissionChoices' : data.UserPortfolioPermissionChoices
|
||||||
|
@ -121,15 +109,17 @@ export class MembersTable extends BaseTable {
|
||||||
<td headers="header-last-active row-header-${unique_id}" data-sort-value="${last_active.sort_value}" data-label="last_active">
|
<td headers="header-last-active row-header-${unique_id}" data-sort-value="${last_active.sort_value}" data-label="last_active">
|
||||||
${last_active.display_value}
|
${last_active.display_value}
|
||||||
</td>
|
</td>
|
||||||
<td headers="header-action row-header-${unique_id}">
|
<td headers="header-action row-header-${unique_id}" class="width--action-column">
|
||||||
|
<div class="tablet:display-flex tablet:flex-row">
|
||||||
<a href="${member.action_url}">
|
<a href="${member.action_url}">
|
||||||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
||||||
<use xlink:href="/public/img/sprite.svg#${member.svg_icon}"></use>
|
<use xlink:href="/public/img/sprite.svg#${member.svg_icon}"></use>
|
||||||
</svg>
|
</svg>
|
||||||
${member.action_label} <span class="usa-sr-only">${member.name}</span>
|
${member.action_label} <span class="usa-sr-only">${member.name}</span>
|
||||||
</a>
|
</a>
|
||||||
|
<span class="padding-left-1">${customTableOptions.hasAdditionalActions ? kebabHTML : ''}</span>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
${customTableOptions.hasAdditionalActions ? '<td>'+kebabHTML+'</td>' : ''}
|
|
||||||
`;
|
`;
|
||||||
tbody.appendChild(row);
|
tbody.appendChild(row);
|
||||||
if (domainsHTML || permissionsHTML) {
|
if (domainsHTML || permissionsHTML) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@use "uswds-core" as *;
|
@use "uswds-core" as *;
|
||||||
@use "cisa_colors" as *;
|
@use "cisa_colors" as *;
|
||||||
|
|
||||||
$widescreen-max-width: 1920px;
|
$widescreen-max-width: 1536px; //1920px;
|
||||||
$widescreen-x-padding: 4.5rem;
|
$widescreen-x-padding: 4.5rem;
|
||||||
|
|
||||||
$hot-pink: #FFC3F9;
|
$hot-pink: #FFC3F9;
|
||||||
|
@ -275,3 +275,7 @@ abbr[title] {
|
||||||
.width-quarter {
|
.width-quarter {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.width--action-column {
|
||||||
|
max-width: 80px;
|
||||||
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
role="columnheader"
|
role="columnheader"
|
||||||
id="header-action"
|
id="header-action"
|
||||||
>
|
>
|
||||||
<span class="usa-sr-only">Action</span>
|
Action
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue