Skip to content

Commit dc56656

Browse files
authored
Merge pull request #5316 from napster235/4672_header_alignment
4672: Align numeric values to the right
2 parents 4481afd + 2689419 commit dc56656

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

app/views/barcode_items/_barcode_item_row.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<tr>
22
<td><%= barcode_item_row.barcodeable.name %></td>
3-
<td><%= barcode_item_row.quantity %></td>
4-
<td><%= barcode_item_row.value %></td>
3+
<td class="text-right"><%= barcode_item_row.quantity %></td>
4+
<td class="text-left"><%= barcode_item_row.value %></td>
55
<td class="text-right">
66
<%= view_button_to barcode_item_path(barcode_item_row) %>
77
<%= edit_button_to edit_barcode_item_path(barcode_item_row) %>

app/views/barcode_items/index.html.erb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@
6969
<div class="card-body p-0">
7070
<table class="table">
7171
<thead>
72-
<tr>
73-
<th>Item Type</th>
74-
<th>Quantity in the Box</th>
75-
<th>Barcode</th>
76-
<th class="text-center">Actions</th>
77-
</tr>
72+
<tr>
73+
<th>Item Type</th>
74+
<th class="text-right">Quantity in the Box</th>
75+
<th class="text-left">Barcode</th>
76+
<th class="text-right">Actions</th>
77+
</tr>
7878
</thead>
7979
<tbody>
80-
<%= render partial: "barcode_item_row", collection: @barcode_items %>
80+
<%= render partial: "barcode_item_row", collection: @barcode_items %>
8181
</tbody>
8282
</table>
8383
</div>

app/views/donations/_donation_row.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<td class="text-left date"><%= donation_row.issued_at.strftime("%F") %>
44
<td><%= donation_row.details %></td>
55
<td><%= donation_row.storage_location.name %></td>
6-
<td class="text-left numeric"><%= donation_row.line_items.total %></td>
7-
<td class="text-left numeric"><%= dollar_value(donation_row.money_raised.to_i) %></td>
8-
<td class="text-left numeric"><%= dollar_value(donation_row.value_per_itemizable) %></td>
6+
<td class="numeric"><%= donation_row.line_items.total %></td>
7+
<td class="numeric"><%= dollar_value(donation_row.money_raised.to_i) %></td>
8+
<td class="numeric"><%= dollar_value(donation_row.value_per_itemizable) %></td>
99
<td><%= truncate donation_row.comment, length: 140, separator: /\w+/ %>
1010
<td class="text-right">
1111
<%= view_button_to donation_path(donation_row) %>

app/views/donations/index.html.erb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@
116116
<th>Date</th>
117117
<th>Details</th>
118118
<th>Storage Location</th>
119-
<th>Quantity of Items</th>
120-
<th>Money Raised</th>
121-
<th>In-kind Value</th>
119+
<th class="text-right">Quantity of Items</th>
120+
<th class="text-right">Money Raised</th>
121+
<th class="text-right">In-kind Value</th>
122122
<th>Comments</th>
123123
<th class="text-right">Actions</th>
124124
</tr>
@@ -132,7 +132,7 @@
132132
<td></td>
133133
<td></td>
134134
<td></td>
135-
<td class="text-left numeric">
135+
<td class="numeric">
136136
<%= @paginated_donations_quantity %>
137137
<br>
138138
(This page)
@@ -143,8 +143,8 @@
143143
(Total)
144144
</strong>
145145
</td>
146-
<td class="text-left numeric"><strong><%= dollar_value(@total_money_raised) %></strong></td>
147-
<td class="text-left numeric in-kind">
146+
<td class="numeric"><strong><%= dollar_value(@total_money_raised) %></strong></td>
147+
<td class="numeric in-kind">
148148
<%= dollar_value(@paginated_in_kind_value) %>
149149
<br>
150150
(This page)

app/views/manufacturers/_manufacturer_row.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<tr>
22
<td><%= manufacturer_row&.name %></td>
3-
<td><%= manufacturer_row&.volume %></td>
4-
<td class="text-center">
3+
<td class="numeric"><%= manufacturer_row&.volume %></td>
4+
<td class="text-right">
55
<%= view_button_to manufacturer_row %>
66
<%= edit_button_to edit_manufacturer_path(manufacturer_row) %>
77
</td>

app/views/manufacturers/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
<thead>
5454
<tr>
5555
<th>Name</th>
56-
<th>Total Items</th>
57-
<th class="text-center">Actions</th>
56+
<th class="text-right">Total Items</th>
57+
<th class="text-right">Actions</th>
5858
</tr>
5959
</thead>
6060
<tbody>

app/views/transfers/_transfer_row.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<td><%= transfer_row.to.name %></td>
44
<td><%= transfer_row.created_at.strftime("%F") %></td>
55
<td><%= transfer_row.comment || "none" %></td>
6-
<td><%= transfer_row.line_items.total %></td>
7-
<td>
6+
<td class="numeric"><%= transfer_row.line_items.total %></td>
7+
<td class="text-right">
88
<%= delete_button_to transfer_path(transfer_row.id), { confirm: "Are you sure you want to permanently remove this transfer?" } %>
99
<%= view_button_to transfer_row %>
1010
</td>

app/views/transfers/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
<th>To</th>
7171
<th>Date</th>
7272
<th>Comment</th>
73-
<th>Total Moved</th>
74-
<th>&nbsp;</th>
73+
<th class="text-right">Total Moved</th>
74+
<th class="text-right">Actions</th>
7575
</tr>
7676
</thead>
7777
<tbody>

0 commit comments

Comments
 (0)