diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 71970a41..a770a125 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -56,10 +56,7 @@ class DmsfController < ApplicationController @files.reverse! end - respond_to do |format| - format.html { render :layout => !request.xhr? } - format.api - end + render :layout => !request.xhr? end diff --git a/app/controllers/dmsf_files_controller.rb b/app/controllers/dmsf_files_controller.rb index cd4b448f..39de51c7 100644 --- a/app/controllers/dmsf_files_controller.rb +++ b/app/controllers/dmsf_files_controller.rb @@ -55,7 +55,9 @@ class DmsfFilesController < ApplicationController # TODO: line bellow is to handle old instalations with errors in data handling @revision.name = @file.name - @revision_pages = Paginator.new self, @file.revisions.count, 25, params["page"] + @revision_pages = Paginator.new self, @file.revisions.count, params["per_page"] ? params["per_page"].to_i : 25, params["page"] + + render :layout => !request.xhr? end #TODO: don't create revision if nothing change