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 committed 2010-10-15 15:36:10 +00:00
1 parent bbbfd4ee4c
commit 0271105794
7 files changed
+17 -13

No files matched your search

+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])
+1 -1
View File
@@ -5,5 +5,5 @@
<h3><%= l(:label_wiki) %></h3>
<%= link_to l(:field_start_page), {:action => 'index', :page => nil} %><br />
<%= link_to l(:label_index_by_title), {:action => 'special', :page => 'Page_index'} %><br />
<%= link_to l(:label_index_by_title), {:action => 'page_index'} %><br />
<%= link_to l(:label_index_by_date), {:action => 'special', :page => 'Date_index'} %><br />
File renamed without changes.