Skip to content

Commit

Permalink
Initial works in batch UI
Browse files Browse the repository at this point in the history
  • Loading branch information
little9 committed Nov 4, 2019
1 parent e6a4fb3 commit 5c1ebf5
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<table id="files-table" class="dataTable display responsive nowrap table table-striped works-list" style="width:100%">
<tr>
<th>Filename</th>
<th>Size</th>
<th>Row Number</th>
</tr>
<% pre_ingest_work.pre_ingest_files.each do |pre_ingest_file| %>
<tr>
<td>
<%= pre_ingest_file.basename %>
</td>
<td>
<%= number_to_human_size(pre_ingest_file.size) %>
</td>
<td>
<%= pre_ingest_file.row_number %>
</td>
</tr>
<% end %>
</table>
</td>
40 changes: 22 additions & 18 deletions app/views/zizia/csv_import_details/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,30 @@
<li>Total Size: <%= number_to_human_size(@csv_import_detail.total_size) %></li>
</ul>

<h3>Files</h3>
<table id="files-table" class="dataTable display responsive nowrap table table-striped works-list" style="width:100%">
<h3>Works & Files</h3>

<table id="works-table" class="table works-list">
<tr>
<th>Filename</th>
<th>Size</th>
<th>Deduplication Key</th>
<th>Files</th>
<th>Date</th>
<th>Row Number</th>
</tr>

<% @csv_import_detail.pre_ingest_files.each do |pre_ingest_file| %>
<tr>
<td>
<%= pre_ingest_file.basename %>
</td>
<td>
<%= number_to_human_size(pre_ingest_file.size) %>
</td>
<td>
<%= pre_ingest_file.row_number %>
</td>
</tr>
<% end %>
<% @csv_import_detail.pre_ingest_works.each do |pre_ingest_work| %>
<tr>
<td>
<%= pre_ingest_work.deduplication_key%>
</td>
<td>
<%= render 'pre_ingest_files_table', pre_ingest_work: pre_ingest_work %>
</td>
<td>
<%= pre_ingest_work.created_at.strftime("%B %-d, %Y %H:%M") %>
</td>
<td>
<%= pre_ingest_work.row_number %>
</td>
</tr>
<% end %>
</table>
</div>

0 comments on commit 5c1ebf5

Please sign in to comment.