diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-10-18 15:27:49 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-10-18 15:27:49 +0000 |
commit | c06c22cf2e29dc0a4a0b2b9dd67a867b370a21f9 (patch) | |
tree | 421d11e577a2a2e4181ed50b9c3e8b90e83611fe /app | |
parent | fef21d5aa2d6108f39aa015ca29da31d888db026 (diff) | |
download | redmine-c06c22cf2e29dc0a4a0b2b9dd67a867b370a21f9.tar.gz redmine-c06c22cf2e29dc0a4a0b2b9dd67a867b370a21f9.zip |
Refactor: extract method from WikiController#special
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4261 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/wiki_controller.rb | 7 | ||||
-rw-r--r-- | app/views/wiki/_sidebar.rhtml | 2 | ||||
-rw-r--r-- | app/views/wiki/date_index.html.erb (renamed from app/views/wiki/special_date_index.rhtml) | 0 |
3 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 7d8cb422c..2bd95bafd 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -173,9 +173,6 @@ class WikiController < ApplicationController def special page_title = params[:page].downcase case page_title - # show pages index, sorted by title - when 'date_index' - load_pages_grouped_by_date_without_content when 'export' redirect_to :action => 'export', :id => @project # Compatibility stub while refactoring return @@ -201,6 +198,10 @@ class WikiController < ApplicationController def page_index load_pages_grouped_by_date_without_content end + + def date_index + load_pages_grouped_by_date_without_content + end def preview page = @wiki.find_page(params[:page]) diff --git a/app/views/wiki/_sidebar.rhtml b/app/views/wiki/_sidebar.rhtml index 46e9d160b..c6e5e6ab8 100644 --- a/app/views/wiki/_sidebar.rhtml +++ b/app/views/wiki/_sidebar.rhtml @@ -6,4 +6,4 @@ <%= link_to l(:field_start_page), {:action => 'index', :page => nil} %><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 /> +<%= link_to l(:label_index_by_date), {:action => 'date_index'} %><br /> diff --git a/app/views/wiki/special_date_index.rhtml b/app/views/wiki/date_index.html.erb index 957c15967..957c15967 100644 --- a/app/views/wiki/special_date_index.rhtml +++ b/app/views/wiki/date_index.html.erb |