From 9aa894e10399e1d0349ae235db1d5b1f67c23d0a Mon Sep 17 00:00:00 2001 From: "A. Diamond" Date: Tue, 16 Jan 2024 13:49:30 -0500 Subject: [PATCH] Fixed incorrectly nested display of object file list. https://trello.com/c/cz1QIJ5k --- views/objects/_file_list.html | 4 +++- web/webui/intellectual_objects_controller.go | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/views/objects/_file_list.html b/views/objects/_file_list.html index 9c6ee663..57ce3720 100644 --- a/views/objects/_file_list.html +++ b/views/objects/_file_list.html @@ -102,9 +102,11 @@

Checksums

{{ end }} + + {{ template "shared/_pager.html" dict "pager" .filePager "xhrTarget" "objFileList" }} + -{{ template "shared/_pager.html" dict "pager" .filePager "xhrTarget" "objFileList" }} {{ end }} \ No newline at end of file diff --git a/web/webui/intellectual_objects_controller.go b/web/webui/intellectual_objects_controller.go index bc40b9db..a9b8006e 100644 --- a/web/webui/intellectual_objects_controller.go +++ b/web/webui/intellectual_objects_controller.go @@ -163,7 +163,10 @@ func IntellectualObjectFiles(c *gin.Context) { // Select max 20 files to start. Some objects have > 100k files, and // we definitely don't want that many results. Let the user page through. func loadFiles(req *Request, objID int64) error { - baseURL := req.GinContext.Request.URL.Path + "?" + req.GinContext.Request.URL.RawQuery + // Load files list inside objFileList div, withouth header + // and side nav. See https://trello.com/c/cz1QIJ5k + correctedPath := strings.Replace(req.GinContext.Request.URL.Path, "/objects/show", "/objects/files", 1) + baseURL := correctedPath + "?" + req.GinContext.Request.URL.RawQuery pager, err := common.NewPager(req.GinContext, baseURL, 20) if err != nil { return err