views: factor out sidebar layout template.
* Factor out common sidebar layout template. * Convert wiki pages and posts to use this template. * Add data-layout attribute to <body> element indicating the current layout.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class PostsController < ApplicationController
|
||||
before_action :member_only, :except => [:show, :show_seq, :index, :home, :random]
|
||||
respond_to :html, :xml, :json
|
||||
layout "sidebar"
|
||||
|
||||
def index
|
||||
if params[:md5].present?
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class WikiPageVersionsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
layout "sidebar"
|
||||
|
||||
def index
|
||||
@wiki_page_versions = WikiPageVersion.search(search_params).paginate(params[:page], :limit => params[:limit], :search_count => params[:search])
|
||||
|
||||
@@ -3,7 +3,8 @@ class WikiPagesController < ApplicationController
|
||||
before_action :member_only, :except => [:index, :search, :show, :show_or_new]
|
||||
before_action :builder_only, :only => [:destroy]
|
||||
before_action :normalize_search_params, :only => [:index]
|
||||
|
||||
layout "sidebar"
|
||||
|
||||
def new
|
||||
@wiki_page = WikiPage.new(wiki_page_params(:create))
|
||||
respond_with(@wiki_page)
|
||||
@@ -30,6 +31,7 @@ class WikiPagesController < ApplicationController
|
||||
end
|
||||
|
||||
def search
|
||||
render layout: "default"
|
||||
end
|
||||
|
||||
def show
|
||||
|
||||
Reference in New Issue
Block a user