Skip to content

Commit 37a4b83

Browse files
committed
For 5372AlignmentNudges modify how snapshots are displayed in the history menu.
1 parent 3689e4b commit 37a4b83

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed
Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
11
<% num_locations = event.data.storage_locations.length %>
2-
<% event.data.storage_locations.values.each_with_index do |loc, loc_index| %>
3-
<tr style="background-color: #e9e4f3;">
4-
<% if loc_index == 0 %>
5-
<td rowspan="<%= num_locations %>"><%= event.id %></td>
6-
<td rowspan="<%= num_locations %>">Snapshot</td>
7-
<td rowspan="<%= num_locations %>"></td>
8-
<td rowspan="<%= num_locations %>"><%= event.event_time.to_s %></td>
2+
3+
<tr style="background-color: #e9e4f3;">
4+
<td><%= event.user&.name || "No Name Provided" %></td>
5+
<td>Snapshot</td>
6+
<td>
7+
<%= link_to event.eventable_id, event.eventable %>
8+
<%= link_to(
9+
events_path(eventable_type: event.eventable_type, eventable_id: event.eventable_id),
10+
class: 'btn btn-md') do %>
11+
<i class="fa fa-filter"></i>
912
<% end %>
10-
<td colspan="2">
13+
</td>
14+
<td><%= event.event_time.to_s %></td>
15+
<td>
16+
<% event.data.storage_locations.values.each_with_index do |loc, loc_index| %>
17+
1118
<%= link_to storage_locs.find { |i| i.id == loc.id}.name, storage_location_path(loc.id) %>
12-
<td>
19+
1320
<% loc.items.values.each do |entry| %>
1421
<% item = items.find { |i| i.id == entry.item_id} %>
1522
<% if item %>
1623
<%= link_to items.find { |i| i.id == entry.item_id}.name, item_path(entry.item_id) %>:
1724
<% else %>
1825
Item <%= entry.item_id %> (deleted)
1926
<% end %>
20-
<%= entry.quantity %><br>
27+
<%= entry.quantity %>
2128
<% end %>
22-
</td>
23-
</tr>
24-
<% end %>
29+
<br>
30+
<% end %>
31+
</td>
32+
<td>&nbsp;</td>
33+
<td>&nbsp;</td>
34+
</tr>
35+

0 commit comments

Comments
 (0)