Added site map and titel list to pages/all

* pages/all now consists of three alternativ views: recent changes, site map and title list
This commit is contained in:
sandoz 2009-10-05 17:25:19 +02:00
parent 305a4ac895
commit 90f760858e
7 changed files with 58 additions and 10 deletions

View file

@ -96,7 +96,21 @@ class PagesController < ApplicationController
end
def all
@pages = Page.non_redirected.all :order => 'updated_at DESC'
@recent_pages = Page.non_redirected.all :order => 'updated_at DESC'
@pages = Page.non_redirected.all :order => 'title'
@top_pages = Page.no_parent.non_redirected.all :order => 'created_at'
view = params[:view]
params[:view] = nil
case view
when 'recentChanges'
render :partial => 'recent_changes' and return
when 'siteMap'
render :partial => 'site_map' and return
when 'titleList'
render :partial => 'title_list' and return
end
end
def version