Sha256: 7fdb2fbf1b78db5ca9452f4602e84c1f92538c22386485b6637c8c73a8750645

Contents?: true

Size: 568 Bytes

Versions: 26

Compression:

Stored size: 568 Bytes

Contents

class Admin::PagesController < Admin::BaseController

  crudify :page, :conditions => "parent_id IS NULL", :order => "position ASC", :include => [:parts, :slugs, :children, :images]
  
  def index
    if searching?
      @pages = Page.find_with_index params[:search]
    else
      @pages = Page.find_all_by_parent_id(nil, :order => "position ASC")
    end
  end
  
  def new
    @page = Page.new
    RefinerySetting.find_or_set(:default_page_parts, ["body", "side_body"]).each do |page_part|
      @page.parts << PagePart.new(:title => page_part)
    end
  end
  
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
refinerycms-0.9.5.13 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.12 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.11 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.10 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.9 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.8 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.7 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.6 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.5 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.4 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.3 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.2 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5.1 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.5 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.4.5 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.4.4 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.4.3 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.4.2 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.4.1 vendor/plugins/pages/app/controllers/admin/pages_controller.rb
refinerycms-0.9.4 vendor/plugins/pages/app/controllers/admin/pages_controller.rb