Skip to content

Commit

Permalink
Fixed incorrectly nested display of object file list. https://trello.…
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondap committed Jan 16, 2024
1 parent d8a6000 commit 9aa894e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion views/objects/_file_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ <h3 class="mb-4">Checksums</h3>
</tr>
{{ end }}
</table>

{{ template "shared/_pager.html" dict "pager" .filePager "xhrTarget" "objFileList" }}

</div>

{{ template "shared/_pager.html" dict "pager" .filePager "xhrTarget" "objFileList" }}


{{ end }}
5 changes: 4 additions & 1 deletion web/webui/intellectual_objects_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9aa894e

Please sign in to comment.