* validating paging for revisions
git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@114 5e329b0b-a2ee-ea63-e329-299493fc886d
This commit is contained in:
parent
bdd3a064d6
commit
02fdf9ba1d
@ -56,10 +56,7 @@ class DmsfController < ApplicationController
|
|||||||
@files.reverse!
|
@files.reverse!
|
||||||
end
|
end
|
||||||
|
|
||||||
respond_to do |format|
|
render :layout => !request.xhr?
|
||||||
format.html { render :layout => !request.xhr? }
|
|
||||||
format.api
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,9 @@ class DmsfFilesController < ApplicationController
|
|||||||
# TODO: line bellow is to handle old instalations with errors in data handling
|
# TODO: line bellow is to handle old instalations with errors in data handling
|
||||||
@revision.name = @file.name
|
@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
|
end
|
||||||
|
|
||||||
#TODO: don't create revision if nothing change
|
#TODO: don't create revision if nothing change
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user