-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a toggle to view the files table
This adds a button for each files table that will show/hide the table. Connected to https://github.com/curationexperts/in-house/issues/427
- Loading branch information
Showing
3 changed files
with
40 additions
and
23 deletions.
There are no files selected for viewing
49 changes: 27 additions & 22 deletions
49
app/views/zizia/csv_import_details/_pre_ingest_files_table.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
<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> | ||
<th>Date Created</th> | ||
</tr> | ||
<% pre_ingest_work.pre_ingest_files.each do |pre_ingest_file| %> | ||
<div class="pre-ingest-file-table"> | ||
<a class="btn btn-primary" data-toggle="collapse" href="#files-table-<%= pre_ingest_work.id %>" role="button" aria-expanded="false" aria-controls="files-table-<%= pre_ingest_work.id %>"> | ||
View Files | ||
</a> | ||
<table id="files-table-<%= pre_ingest_work.id %>" class="responsive collapse nowrap table table-striped works-list"> | ||
<tr> | ||
<td> | ||
<%= pre_ingest_file.basename %> | ||
</td> | ||
<td> | ||
<%= number_to_human_size(pre_ingest_file.size) %> | ||
</td> | ||
<td> | ||
<%= pre_ingest_file.row_number %> | ||
</td> | ||
<td> | ||
<%= pre_ingest_file.created_at.strftime("%B %-d, %Y %H:%M") %> | ||
</td> | ||
<th>Filename</th> | ||
<th>Size</th> | ||
<th>Row Number</th> | ||
<th>Date Created</th> | ||
</tr> | ||
<% end %> | ||
</table> | ||
<% 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> | ||
<td> | ||
<%= pre_ingest_file.created_at.strftime("%B %-d, %Y %H:%M") %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters