Skip to content

Commit

Permalink
folder not hyperlinked and does not display size (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiawulee authored Nov 18, 2024
1 parent 6de2535 commit a35ecf5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
15 changes: 13 additions & 2 deletions app/views/catalog/_show_documents.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ $(function() {
{
// filename
render: function (data, type, row) {
var html;
if (type == "display") {
html = `<a href="${row.download_url}">${data}</a>`;
if(data.endsWith("/")){
html = data;
}
else{
html = `<a href="${row.download_url}">${data}</a>`;
}
return html;
}

Expand All @@ -62,7 +68,12 @@ $(function() {
// file size
render: function (data, type, row) {
if (type == "display") {
return row.display_size;
if(row.full_path.endsWith("/")){
return "";
}
else{
return row.display_size;
}
}
return parseInt(data, 10);
},
Expand Down
20 changes: 9 additions & 11 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a35ecf5

Please sign in to comment.