Refactor: extract #page_index from WikiController#special

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4253 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-10-15 15:36:10 +00:00
parent bbbfd4ee4c
commit 0271105794
7 changed files with 17 additions and 13 deletions
+6 -2
View File
@@ -166,7 +166,7 @@ class WikiController < ApplicationController
end
end
@page.destroy
redirect_to :action => 'special', :id => @project, :page => 'Page_index'
redirect_to :action => 'page_index', :id => @project
end
# display special pages
@@ -174,7 +174,7 @@ class WikiController < ApplicationController
page_title = params[:page].downcase
case page_title
# show pages index, sorted by title
when 'page_index', 'date_index'
when 'date_index'
load_pages_grouped_by_date_without_content
when 'export'
redirect_to :action => 'export', :id => @project # Compatibility stub while refactoring
@@ -197,6 +197,10 @@ class WikiController < ApplicationController
redirect_to :action => 'index', :id => @project, :page => nil
end
end
def page_index
load_pages_grouped_by_date_without_content
end
def preview
page = @wiki.find_page(params[:page])