X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b917e8a2ebf8c51729ecde1d3cc3396d2fcf0034..855ba975a64411ec8ed36ddb1a52a46f0b03cb10:/apps/workbench/app/controllers/application_controller.rb diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb index 833294b5b0..3270cfb376 100644 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@ -164,32 +164,31 @@ class ApplicationController < ActionController::Base def find_objects_for_index @objects ||= model_class @objects = @objects.filter(@filters).limit(@limit).offset(@offset) + @objects.fetch_multiple_pages(false) end def render_index - if params[:partial] - respond_to do |f| - f.json { - @next_page_href = next_page_href(partial: params[:partial]) + respond_to do |f| + f.json { + if params[:partial] + @next_page_href = next_page_href(partial: params[:partial], filters: @filters.to_json) render json: { - content: render_to_string(partial: "show_#{params[:partial]}.html", formats: [:html]), - next_page_href: @next_page_href - + content: render_to_string(partial: "show_#{params[:partial]}", + formats: [:html]), + next_page_href: @next_page_href } - } - end - else - respond_to do |f| - f.json { render json: @objects } - f.html { - if params[:tab_pane] - render_pane params[:tab_pane] - else - render - end - } - f.js { render } - end + else + render json: @objects + end + } + f.html { + if params[:tab_pane] + render_pane params[:tab_pane] + else + render + end + } + f.js { render } end end