Merge branch 'master' into 4024-pipeline-instances-scroll
[arvados.git] / apps / workbench / app / controllers / application_controller.rb
index 5cd11c1d9835abd55d89bf369dba0884f58e8271..88ea4b0a6141b484a7f4a60404f17fa54b1cf979 100644 (file)
@@ -168,7 +168,18 @@ class ApplicationController < ActionController::Base
 
   def render_index
     respond_to do |f|
-      f.json { render json: @objects }
+      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]}", formats: [:html]),
+                                      next_page_href: @next_page_href
+
+          }
+        else
+          render json: @objects
+        end
+      }
       f.html {
         if params[:tab_pane]
           render_pane params[:tab_pane]