Skip to content

Commit

Permalink
html
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwoldatwork committed Jan 17, 2025
1 parent 6dee2cc commit 1fa41c5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 20 deletions.
13 changes: 11 additions & 2 deletions app/assets/stylesheets/site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ span.usa-hint.save-notice {
}
.question {
margin: 10px 0;
padding-bottom: 20px;
padding-left: 20px;
padding-bottom: 1rem;
padding-left: 1rem;
padding-top: 1px;
padding-right: 1rem;
}
Expand Down Expand Up @@ -608,4 +608,13 @@ abbr[title=required] {
.usa-table .usa-nav__primary button[aria-expanded=false] span::after {
right: auto;
}
}

#batch-actions {
background-color: #f0f0f0;
position: sticky;
top: 0;
z-index: 1000;
padding: 10px;
border-bottom: 1px solid #ccc;
}
42 changes: 24 additions & 18 deletions app/views/admin/submissions/_submissions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,31 @@
<p>
<%= paginate submissions, remote: true %>
</p>


<div class="responses table-scroll">
<div class="table-wrap">
<%= form_with url: bulk_update_admin_form_submissions_path(form), method: :post do |f| %>
<div
id="batch-actions">
<label for="bulk_action">Bulk Action:</label>
<span id="selected-count" class="margin-right-1"></span>
<button class="usa-button" name="bulk_action" type="submit" value="flag">
<i class="far fa-flag"></i>
Flag
</button>
<button class="usa-button usa-button--accent-cool" id="archive-button" type="button">
<i class="fa fa-inbox"></i>
Archive
</button>
</div>
<table class="usa-table submissions">
<div
id="batch-actions">
<label for="bulk_action">Bulk Action:</label>
<span id="selected-count" class="margin-right-1"></span>
<button
class="usa-button"
name="bulk_action"
type="submit"
value="flag">
<i class="far fa-flag"></i>
Flag
</button>
<button
class="usa-button usa-button--accent-cool"
name="bulk_action"
type="submit"
value="archive">
<i class="fa fa-inbox"></i>
Archive
</button>
</div>
<div class="table-wrap">
<table class="usa-table submissions font-sans-2xs">
<thead>
<tr>
<td></td>
Expand Down Expand Up @@ -225,7 +231,7 @@

if (selectedCount > 0) {
batchActions.style.display = "block";
selectedCountSpan.textContent = `${selectedCount} item(s) selected`;
selectedCountSpan.textContent = `${selectedCount} selected`;
} else {
batchActions.style.display = "none";
selectedCountSpan.textContent = "";
Expand Down

0 comments on commit 1fa41c5

Please sign in to comment.