Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load file list on the background on the Show page #713

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

hectorcorrea
Copy link
Member

@hectorcorrea hectorcorrea commented Nov 4, 2024

Load the file list on the background via AJAX so the page with the metadata renders immediately to the user.

Co-authored-by: Claudia Lee [email protected]
Closes #709

@hectorcorrea hectorcorrea changed the title Started to add code to load file list via AJAX Load file list on the background on the Show page Nov 14, 2024
<% end %>
<th scope="col" nowrap="nowrap"><span>Filesize</span></th>
<th>Filename</th>
<th>Size</th>
</tr>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We ditched the columns with the sequence number and the description for each file since we don't show those in PDC Describe. (Plus we don't have file description in PDC Describe, this was for DataSpace records but we are moving away from that)

@@ -63,8 +32,45 @@
<script type="text/javascript">
$(function() {

// Wire DataTable for the file list.
$('#files-table').DataTable();
$('#files-table').DataTable({
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We stole most of the DataTables configuration from PDC Describe: https://github.com/pulibrary/pdc_describe/blob/main/app/views/works/_s3_resources.html.erb#L74

@hectorcorrea hectorcorrea marked this pull request as ready for review November 14, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load file list via AJAX
1 participant