Skip to content

Commit

Permalink
Merge pull request #394 from ivplus/sort
Browse files Browse the repository at this point in the history
Sort uploads and deltas by the date created
  • Loading branch information
corylown authored Nov 2, 2021
2 parents 953be9b + 52ee03f commit 7628439
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/views/streams/_normalized_dump.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<%= render partial: 'streams/dump_attachment', locals: { type: 'Full', attachment: normalized_dump.marc21.attachment, stream: normalized_dump.stream } %>
<%= render partial: 'streams/dump_attachment', locals: { type: 'Full', attachment: normalized_dump.marcxml.attachment, stream: normalized_dump.stream } %>
<% normalized_dump.deltas.each do |delta| %>
<% normalized_dump.deltas.sort_by(&:created_at).each do |delta| %>
<%= render partial: 'streams/dump_attachment', locals: { type: 'Delta', attachment: delta.marc21.attachment, stream: normalized_dump.stream } %>
<%= render partial: 'streams/dump_attachment', locals: { type: 'Delta', attachment: delta.marcxml.attachment, stream: normalized_dump.stream } %>
<%= render partial: 'streams/dump_attachment', locals: { type: 'Deletes', attachment: delta.deletes.attachment, stream: normalized_dump.stream } %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/streams/_stream_uploads.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<% end %>
</td>
</tr>
<% stream.uploads.active.each do |upload| %>
<% stream.uploads.active.sort_by(&:created_at).each do |upload| %>
<%= render 'uploads/file_rows', upload: upload %>
<% end %>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion app/views/streams/normalized_dump.xml.builder
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ xml.urlset(

# deltas

@normalized_dump.deltas.each do |delta|
@normalized_dump.deltas.sort_by(&:created_at).each do |delta|
file = if params[:flavor] == 'marc21'
delta.marc21.attachment
else
Expand Down
2 changes: 1 addition & 1 deletion app/views/streams/show.xml.builder
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ xml.urlset(
xml.loc(removed_since_previous_stream_organization_stream_url(@organization, @stream))
end

@stream.files.each do |file|
@stream.files.sort_by(&:created_at).each do |file|
xml.url do
xml.tag!(
'rs:md',
Expand Down

0 comments on commit 7628439

Please sign in to comment.