Skip to content

Commit

Permalink
[Waste] Bulky items list editing improvements
Browse files Browse the repository at this point in the history
 - Shrinks sidebar
 - Removes per-item price field if feature not enabled
 - Uses entire page width for container

For FD-4697
  • Loading branch information
davea committed Nov 4, 2024
1 parent bd545ee commit 0cb7540
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
16 changes: 10 additions & 6 deletions templates/web/base/admin/waste/bulky_items.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[% INCLUDE 'admin/header.html' title=loc('Bulky items list') -%]
[% INCLUDE 'admin/header.html' title=loc('Bulky items list') bodyclass="bulky-items" -%]
[% PROCESS 'admin/report_blocks.html' %]

[% INCLUDE status_message %]
Expand Down Expand Up @@ -29,10 +29,12 @@
[% IF item.errors.message %]<label for="[[% i %]]">[% item.errors.message %]</label>[% END %]
<input type="text" value="[% item.message %]" name="message[[% i %]]" />
</td>
<td>
[% IF item.errors.price %]<label for="[[% i %]]">[% item.errors.price %]</label>[% END %]
<input type="text" value="[% item.price %]" name="price[[% i %]]" />
</td>
[% IF per_item_costs %]
<td>
[% IF item.errors.price %]<label for="[[% i %]]">[% item.errors.price %]</label>[% END %]
<input type="text" value="[% item.price %]" name="price[[% i %]]" />
</td>
[% END %]
[% FOR property_type IN per_item_pricing_property_types %]
[% price_for_property_type = "price_$property_type" %]
<td>
Expand Down Expand Up @@ -60,7 +62,9 @@
<th>Category</th>
<th>Name</th>
<th>Message</th>
<th>Price (pence)</th>
[% IF per_item_costs %]
<th>Price (pence)</th>
[% END %]
[% FOR property_type IN per_item_pricing_property_types %]
<th>[% property_type %] Price (pence)</th>
[% END %]
Expand Down
18 changes: 18 additions & 0 deletions web/cobrands/sass/_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,21 @@ textarea.code {
font-family: monospace;
max-width: initial;
}

// WasteWorks

// Some layout improvements for bulky items editing
body.bulky-items {
// Make the page full width
.container {
max-width: 100%;
}
// Shrink the sidebar to make more room for the main content
.container--sidebar .sticky-sidebar {
width: 11em;

aside {
width: 11em;
}
}
}

0 comments on commit 0cb7540

Please sign in to comment.