radiant-help-extension 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/HELP_developer.rdoc +92 -0
  2. data/README.md +35 -0
  3. data/Rakefile +109 -0
  4. data/TODO +6 -0
  5. data/app/controllers/admin/help_controller.rb +59 -0
  6. data/app/helpers/admin/help_helper.rb +36 -0
  7. data/app/models/help_doc.rb +42 -0
  8. data/app/views/admin/help/_admin_index.html.haml +11 -0
  9. data/app/views/admin/help/_designer_index.html.haml +20 -0
  10. data/app/views/admin/help/_docs_introduction.html.haml +2 -0
  11. data/app/views/admin/help/_editing.html.haml +64 -0
  12. data/app/views/admin/help/_extension_docs_list.html.haml +9 -0
  13. data/app/views/admin/help/_organizing.html.haml +7 -0
  14. data/app/views/admin/help/_other_index.html.haml +2 -0
  15. data/app/views/admin/help/_regions.html.haml +34 -0
  16. data/app/views/admin/help/_scripts.js.erb +14 -0
  17. data/app/views/admin/help/_styles.html.haml +128 -0
  18. data/app/views/admin/help/_tag_reference.html.haml +6 -0
  19. data/app/views/admin/help/developing.html.haml +19 -0
  20. data/app/views/admin/help/extension_doc.html.haml +16 -0
  21. data/app/views/admin/help/index.html.haml +16 -0
  22. data/app/views/admin/help/role.html.haml +12 -0
  23. data/config/initializers/radiant_config.rb +3 -0
  24. data/config/locales/en.yml +3 -0
  25. data/config/routes.rb +8 -0
  26. data/cucumber.yml +1 -0
  27. data/features/support/env.rb +11 -0
  28. data/features/support/paths.rb +22 -0
  29. data/help_extension.rb +86 -0
  30. data/lib/radiant-help-extension.rb +8 -0
  31. data/lib/tasks/help_extension_tasks.rake +29 -0
  32. data/radiant-help-extension.gemspec +29 -0
  33. data/spec/controllers/admin/help_controller_spec.rb +110 -0
  34. data/spec/models/help_doc_spec.rb +111 -0
  35. data/spec/spec.opts +6 -0
  36. data/spec/spec_helper.rb +36 -0
  37. metadata +87 -0
@@ -0,0 +1,92 @@
1
+ Developing for Help is easy.
2
+
3
+ If you'd like to include help information for your own extensions you have some options. You may
4
+
5
+ 1. Create plain text help files (formatted in RDoc, Markdown, or Textile syntax)
6
+ 2. Inject partials into the Help interface
7
+
8
+ == Multiple Options
9
+
10
+ "Why so many ways to provide help? It's overkill."
11
+
12
+ They each have separate purposes and benefits. First, the purpose of Help is to provide basic information about the functions of Radiant. Second, Help allows developers to provide documentation for features added through extensions.
13
+
14
+ === The lowest barrier to entry is plain text files.
15
+
16
+ Extension developers may include the appropriate files (explained below) and if users of their extension have Help installed it will appear in the Help interface, if users do not have Help installed there is no worry about dependencies and Radiant will function normally.
17
+
18
+ === Make the Help docs your own.
19
+
20
+ You may inject partials into the interface to include information about features that are tightly coupled with the existing interface and make it appear to the users as though that is what is standard.
21
+
22
+ For example, suppose a developer created a category for pages such as "hot" or "cold" (perhaps to represent the mood of the author) and she added this selection to the page editing interface with a partial injection. To the average user it would appear that the "hot" or "cold" selection was a part of the CMS, so it would be important to add a reference to the new feature within the documentation for the basic pieces of Radiant.
23
+
24
+ === Features
25
+
26
+ If you are building an extension and are considering using Help, keep these features in mind:
27
+
28
+ 1. Plain Text Files - No Failures if Help is not installed, clean slate of (role-based) information, all information (per role) is provided on one screen
29
+ 2. Partial Injection - Will fail if Help is not installed (unless you check for the objects you need properly), integrated with the standard (per role) help information, easy to break up topics in to small parts
30
+
31
+ == RDoc Help Files
32
+
33
+ Help looks through all of your installed extensions to find relevant HELP.rdoc files. These files must follow the naming conventions of:
34
+
35
+ 1. HELP.rdoc (this is for general users)
36
+ 2. HELP_developer.rdoc (this will only be shown to users with the developer role)
37
+ 3. HELP_admin.rdoc (this will only be show to users with the admin role)
38
+
39
+ These files must be placed in the root of your extension. If you do not wish to provide help for a certain user group, do not create the pertinent RDoc.
40
+
41
+ == Partial Injection Based Help
42
+
43
+ You may inject partials into the interface by adding code such this into your extension's activate method:
44
+
45
+ admin.help.index.add :main, "client_welcome", :before => "introduction"
46
+
47
+ * "admin.help.index" refers to the main help page (the help index) and ".add" is called to add information to the section provided in the next argument.
48
+ * ":main" is the argument that specifies which section will receive your partial.
49
+ * "client_welcome" is the partial that you want to add and should be located in your extension directory app/views/admin/help/_client_welcome.html.haml
50
+ * :before => "introduction" will place your partial before the introduction region (or you could do :after). This is optional, and if left out, your partial will be appended to the ":main" section.
51
+
52
+ For a list of all of the regions provided by Help, see help_extension.rb around line 65, and app/views/admin/index.html.haml for details about where they appear.
53
+
54
+ When adding your partials, you may specify inline decisions about whom should see your documentation with the admin_help and developer_help helper methods. These can be used in your HAML by doing:
55
+
56
+ - admin_help do
57
+ %p Hello Madame Admin!
58
+ - developer_help do
59
+ %p You are special, Mr. Developer.
60
+
61
+ Those helper methods make use of the admin? and developer? helpers provided by Radiant. The blocks of text will only be shown to the user if they are in those roles, but keep in mind that currently developer? returns true if the user is selected only as an admin (meaning developer_help will be seen by developers and admins).
62
+
63
+ === Dependency
64
+
65
+ If you know that you extension will always have Help available, you may use the above approach without worry. If, however, your extension will be used where Help may or may not be installed, you should first check for the existence of the appropriate region into which you plan to inject partials.
66
+
67
+ Here is an example:
68
+
69
+ if admin.respond_to?(:help)
70
+ if admin.help.index
71
+ admin.help.index.add :main, "client_welcome", :before => "introduction"
72
+ end
73
+ if admin.help.role
74
+ admin.help.role.add :extras, "contact_info"
75
+ end
76
+ end
77
+
78
+ The nested if statements may be overkill but if for some reason Help regions change in the future, your extension will be protected from failing because a certain region does not exist.
79
+
80
+ === Expanding Documentation
81
+
82
+ Each of the Radius tags displayed under the developer documentation also allows you to add more details.
83
+
84
+ admin.help.role.add 'archive:children', "all_about_archives"
85
+
86
+ == Source Code
87
+
88
+ Help is made freely available at http://github.com/saturnflyer/radiant-help-extension/
89
+
90
+ Help was built by Saturn Flyer
91
+
92
+ http://www.saturnflyer.com
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Help
2
+
3
+ This extension provides documentation for Radiant and any
4
+ installed extensions.
5
+
6
+ Installing Help is as easy as any other Radiant extension.
7
+ Drop it into your vendor/extensions directory.
8
+
9
+ Once the extension is installed, you must ensure that your
10
+ application will load the Help extension before loading any
11
+ extensions that rely on the help regions. To do so, edit
12
+ your config/environment.rb to load Help first:
13
+
14
+ Radiant::Initializer.run do |config|
15
+ #...
16
+ config.extensions = [ :help, :all ]
17
+ #...
18
+ end
19
+
20
+ Help provides basic information for the average user at
21
+ admin/help, but also provides documentation for tasks and
22
+ features available to developers and admins at
23
+ `admin/help_role/developer` and `admin/help_role/admin`.
24
+ Additionally, any extensions loaded with HELP files may be
25
+ found at `/admin/help_extension/:extension_name/:role` but a
26
+ list of links is automatically generated for your clicking
27
+ pleasure.
28
+
29
+ For more information about developing for Help, install it
30
+ and go to `/admin/help_extension/help/developer` or read the
31
+ included `HELP_developer.rdoc`
32
+
33
+ Some content taken from http://radiantcms.org/
34
+
35
+ [Built by Saturn Flyer](http://www.saturnflyer.com)
data/Rakefile ADDED
@@ -0,0 +1,109 @@
1
+ # Determine where the RSpec plugin is by loading the boot
2
+ unless defined? RADIANT_ROOT
3
+ ENV["RAILS_ENV"] = "test"
4
+ case
5
+ when ENV["RADIANT_ENV_FILE"]
6
+ require File.dirname(ENV["RADIANT_ENV_FILE"]) + "/boot"
7
+ when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
8
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
9
+ else
10
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
11
+ end
12
+ end
13
+
14
+ require 'rake'
15
+ require 'rdoc/task'
16
+ require 'rake/testtask'
17
+
18
+ rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
19
+ $LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
20
+ require 'spec/rake/spectask'
21
+ require 'cucumber'
22
+ require 'cucumber/rake/task'
23
+
24
+ # Cleanup the RADIANT_ROOT constant so specs will load the environment
25
+ Object.send(:remove_const, :RADIANT_ROOT)
26
+
27
+ extension_root = File.expand_path(File.dirname(__FILE__))
28
+
29
+ task :default => [:spec, :features]
30
+ task :stats => "spec:statsetup"
31
+
32
+ desc "Run all specs in spec directory"
33
+ Spec::Rake::SpecTask.new(:spec) do |t|
34
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
35
+ t.spec_files = FileList['spec/**/*_spec.rb']
36
+ end
37
+
38
+ task :features => 'spec:integration'
39
+
40
+ namespace :spec do
41
+ desc "Run all specs in spec directory with RCov"
42
+ Spec::Rake::SpecTask.new(:rcov) do |t|
43
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
44
+ t.spec_files = FileList['spec/**/*_spec.rb']
45
+ t.rcov = true
46
+ t.rcov_opts = ['--exclude', 'spec', '--rails']
47
+ end
48
+
49
+ desc "Print Specdoc for all specs"
50
+ Spec::Rake::SpecTask.new(:doc) do |t|
51
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
52
+ t.spec_files = FileList['spec/**/*_spec.rb']
53
+ end
54
+
55
+ [:models, :controllers, :views, :helpers].each do |sub|
56
+ desc "Run the specs under spec/#{sub}"
57
+ Spec::Rake::SpecTask.new(sub) do |t|
58
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
59
+ t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
60
+ end
61
+ end
62
+
63
+ desc "Run the Cucumber features"
64
+ Cucumber::Rake::Task.new(:integration) do |t|
65
+ t.fork = true
66
+ t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
67
+ # t.feature_pattern = "#{extension_root}/features/**/*.feature"
68
+ t.profile = "default"
69
+ end
70
+
71
+ # Setup specs for stats
72
+ task :statsetup do
73
+ require 'code_statistics'
74
+ ::STATS_DIRECTORIES << %w(Model\ specs spec/models)
75
+ ::STATS_DIRECTORIES << %w(View\ specs spec/views)
76
+ ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
77
+ ::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
78
+ ::CodeStatistics::TEST_TYPES << "Model specs"
79
+ ::CodeStatistics::TEST_TYPES << "View specs"
80
+ ::CodeStatistics::TEST_TYPES << "Controller specs"
81
+ ::CodeStatistics::TEST_TYPES << "Helper specs"
82
+ ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
83
+ end
84
+
85
+ namespace :db do
86
+ namespace :fixtures do
87
+ desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
88
+ task :load => :environment do
89
+ require 'active_record/fixtures'
90
+ ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
91
+ (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
92
+ Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+
99
+ desc 'Generate documentation for the help extension.'
100
+ RDoc::Task.new(:rdoc) do |rdoc|
101
+ rdoc.rdoc_dir = 'rdoc'
102
+ rdoc.title = 'HelpExtension'
103
+ rdoc.options << '--line-numbers' << '--inline-source'
104
+ rdoc.rdoc_files.include('README')
105
+ rdoc.rdoc_files.include('lib/**/*.rb')
106
+ end
107
+
108
+ # Load any custom rakefiles for extension
109
+ Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
data/TODO ADDED
@@ -0,0 +1,6 @@
1
+ 1. Add images
2
+ 2. Better styling
3
+ 3. Javascript to hide/show features
4
+ 4. Integrate full tag list search for developer view
5
+ 5. Show README and TODO files to admins
6
+ 6. Tests for the views!
@@ -0,0 +1,59 @@
1
+ class Admin::HelpController < ApplicationController
2
+ include ActiveSupport::CoreExtensions::String::Inflections
3
+
4
+ # only_allow_access_to :index, :show, :new, :create, :edit, :update, :remove, :destroy,
5
+ # :when => :admin,
6
+ # :denied_url => { :controller => 'help', :action => 'index' },
7
+ # :denied_message => 'You must have administrative privileges to perform this action.'
8
+
9
+ def index
10
+ @role = 'all'
11
+ @docs = HelpDoc.find_for(:all)
12
+ @file_not_found_page = Page.find(:first, :conditions => {:class_name => 'FileNotFoundPage'})
13
+ @layouts = Layout.find(:all)
14
+ @filters = TextFilter.descendants.uniq
15
+ @cms_name = Radiant::Config['admin.title']
16
+ end
17
+
18
+ def role
19
+ @template_name = 'role'
20
+ if params[:role].nil?
21
+ @role = 'all'
22
+ flash[:error] = "Sorry. I couldn't find any documentation for your request so you've been redirected to this page."
23
+ redirect_to help_url
24
+ return
25
+ else
26
+ if params[:role] == 'admin' or params[:role] == 'designer'
27
+ @role = params[:role]
28
+ else
29
+ @role = 'other'
30
+ @custom_role = params[:role]
31
+ end
32
+ end
33
+ if File.exists?("#{RAILS_ROOT}/vendor/extensions/help/app/views/admin/help/_#{@role}_index.html.haml")
34
+ @docs = HelpDoc.find_for(@role)
35
+ else
36
+ flash[:error] = "Information for the '#{@role}' role could not be found."
37
+ redirect_to help_url
38
+ return
39
+ end
40
+ end
41
+
42
+ def developing
43
+
44
+ end
45
+
46
+ def extension_doc
47
+ @template_name = 'extension_doc'
48
+ @role = params[:role].nil? ? 'all' : params[:role]
49
+ @docs = HelpDoc.find_for(@role)
50
+ if params[:extension_name] != 'all'
51
+ @doc_name = params[:extension_name].titleize
52
+ @doc_path = HelpDoc.find_for(@role,params[:extension_name]).first
53
+ else
54
+ @doc_path = @docs.first
55
+ @doc_name = @doc_path[/[(\w+)]\/(\w+)\/HELP/, 1].titleize
56
+ end
57
+ @doc = HelpDoc.formatted_contents_from(@doc_path)
58
+ end
59
+ end
@@ -0,0 +1,36 @@
1
+ module Admin::HelpHelper
2
+ # This code doesn't work...
3
+ # ready for more roles when they appear in Radiant
4
+ # %{admin developer}.each do |role|
5
+ # define_method("#{role}_help") do |block|
6
+ # yield block if "#{role}?"
7
+ # end
8
+ # end
9
+
10
+ def admin_help(&block)
11
+ yield if admin?
12
+ end
13
+
14
+ def designer_help(&block)
15
+ yield if designer?
16
+ end
17
+
18
+ def doc_extension_dir(doc)
19
+ doc[/[(\w+)]\/(\w+)\/HELP/, 1]
20
+ end
21
+
22
+ def all_tags
23
+ tags = {}
24
+ page_classes = [Page.descendants, Page].flatten
25
+ page_classes.each do |page_class|
26
+ page_class.tag_descriptions.each do |name, details|
27
+ if tags[name]
28
+ tags[name][:classes] << page_class.to_s
29
+ else
30
+ tags[name] = {:description => details, :classes => [page_class.to_s]}
31
+ end
32
+ end
33
+ end
34
+ tags
35
+ end
36
+ end
@@ -0,0 +1,42 @@
1
+ require 'rdoc'
2
+
3
+ class HelpDoc
4
+
5
+ def self.find_for(role_type, extension_dir="**")
6
+ results = []
7
+ doc_name = ''
8
+ doc_name = "_#{role_type.to_s}" unless role_type.to_s == 'all'
9
+ Dir["#{RAILS_ROOT}/vendor/extensions/#{extension_dir}/HELP#{doc_name}*"].each do |ext_help|
10
+ case role_type.to_s
11
+ when 'all'
12
+ re_matcher = /HELP(\.[\w]+)?$/
13
+ else
14
+ re_matcher = /HELP_[\S]+(\.[\w]+)?$/
15
+ end
16
+ results << ext_help if re_matcher.match(ext_help)
17
+ end
18
+ results
19
+ end
20
+
21
+ def self.formatted_contents_from(doc_path)
22
+ if doc_path.end_with?('markdown') || doc_path.end_with?('md')
23
+ HelpDoc.parsed_markdown(doc_path)
24
+ elsif doc_path.end_with?('textile')
25
+ HelpDoc.parsed_textile(doc_path)
26
+ else
27
+ HelpDoc.parsed_rdoc(doc_path)
28
+ end
29
+ end
30
+
31
+ def self.parsed_rdoc(doc_path)
32
+ RDoc::Markup::ToHtml.new.convert(File.read(doc_path))
33
+ end
34
+
35
+ def self.parsed_markdown(doc_path)
36
+ MarkdownFilter.filter(File.read(doc_path))
37
+ end
38
+
39
+ def self.parsed_textile(doc_path)
40
+ ::RedCloth.new(File.read(doc_path)).to_html
41
+ end
42
+ end
@@ -0,0 +1,11 @@
1
+ %p As an admin, you may add and remove users that have access to your website. To view the current users click on the "Users" link in the header.
2
+ %h2 Adding a User
3
+ %p
4
+ The
5
+ = link_to("new user screen", new_admin_user_path)
6
+ has some helpful information on it about what must or need not be entered when creating a user. When you have completed the form, click "Create User" or "Save and Continue Editing" to create the user.
7
+ %h2 Disabling a User
8
+ %p
9
+ If you'd like to remove a certain user's access from your website, you must delete the user from the system. To do this, go to
10
+ = link_to("the list of all users", admin_users_path)
11
+ , and click "Remove" for the appropriate user.
@@ -0,0 +1,20 @@
1
+ %h2 Caching
2
+ %p An optimization feature of Radiant is the page cache, which stops it having to rebuild pages from scratch each time they are requested. However, when you edit pages the cache will be cleared and each page will generate its cache file on the next request to the website.
3
+
4
+ %h2 Radiant Tags
5
+ %p Now the interesting bit – the tags you can use in your layouts, snippets and page bodies to pull all the bits of your site together. This list and the description of the tags is taken from the Radiant source file app/models/page_context.rb if you want to look at the underlying implementation or check for changes if you think the documentation below may be inaccurate.
6
+ %p Tags can only be used in page, layout or snippet content, not in names or page titles.
7
+ %p Where square brackets are used below, they indicate that the thing contained inside is optional. If you decide to include it, don’t include the square brackets – e.g.:
8
+ %pre
9
+ %code= h('<r:children:each [offset="number"]>')
10
+ %p ...indicates that you could use the following in a real layout, snippet or page:
11
+ %pre
12
+ %code= h('<r:children:each offset="2">')
13
+
14
+ %p Tags are created to act as containers, page content, attributes, conditional elements and miscellaneous items. The tag reference below is also available as a popup on edit screens.
15
+
16
+ %h2 All Available Tags
17
+ .popup
18
+ - all_tags.sort.each do |tag_name,details|
19
+ - desc = RedCloth.new(Radiant::Taggable::Util.strip_leading_whitespace(details[:description])).to_html
20
+ = render :partial => 'tag_reference', :locals => {:tag_name => tag_name, :description => desc, :classes => details[:classes]}
@@ -0,0 +1,2 @@
1
+ %p
2
+ Documents are available with information provided about the following extensions:
@@ -0,0 +1,64 @@
1
+ %h2 Editing Pages
2
+ %h3 Page Details
3
+ - render_region :page_details do |page_details|
4
+ - page_details.page_details_introduction do
5
+ %p Each page has information that is used when your pages are generated. When you type your Page Title, the page Slug and Breadcrumb are automatically typed for you (click the 'More' link below the title to see these details). The slug is arguably the most important of these because it determines where your page will be found when visitors browse your website.
6
+ - page_details.slug do
7
+ %h4 What is the Slug?
8
+ %p It's the smallest part of the page URL.
9
+ %p If you want your "About Us" page to be found in a location such as yoursite.com/about, then the Slug for your "About Us" page is "about".
10
+ %p Likewise, if the "About Us" page has any children, such as a "Management Team" page, then the location of that page might be yoursite.com/about/management-team. In this case, the Slug for the "Management Team" page is "management-team".
11
+ %h4 Why do I need a Slug?
12
+ %p You may not want to make changes to it, but if you do you may make your "About Us" page available at yoursite.com/about or yoursite.com/about-us or yoursite.com/allaboutus... It's up to you.
13
+ - page_details.breadcrumb do
14
+ %h4 Breadcrumb
15
+ %p Breadcrumbs trace your path from the home page to where your are. If you're on the "Management Team" page, for example, your breadcrumbs might look like this: Home > About Us > Management Team
16
+ %p The Breadcrumb field allows you to edit the text that will be displayed if and when your website uses breadcrumbs.
17
+ %h3 Filter
18
+ - render_region :filter do |filter|
19
+ - filter.filter_basics do
20
+ %p The filter that you select is used to process the text that you enter. That means that you don't need to write HTML for it to show up properly on your website.
21
+ %p
22
+ The filters provided for you are:
23
+ = @filters.collect(&:filter_name).to_sentence(:words_connector => ', ', :last_word_connector => ', and ')
24
+ %p To get more information about these text filters:
25
+ %ol
26
+ %li go to a page edit screen and select a filter
27
+ %li click on the "Filter" link next to the Filter selection
28
+ %li scroll through the documentation that appears to find out more about using your selected Filter.
29
+ %p If you ever need help with formatting your text, the information is right where you need it.
30
+ %h3 Available Tags
31
+ - render_region :available_tags do |available_tags|
32
+ - available_tags.available_tags_basics do
33
+ %p The typical user won't need to worry much about Tags, but you have the flexibility to display your website content in many ways. These Tags are commonly used by admins and developers. Here's a quick and limited example of what can be done:
34
+ %pre
35
+ = h %q{<r:find url="/about"><r:content part="contact" /></r:find>}
36
+ %p That example finds the page with "about" for the Slug, and outputs the content of the "contact" part.
37
+ %p Much more can be done, but these Tags should be used with caution if you are unfamiliar with them.
38
+ %h3 Layout
39
+ - render_region :layout do |layout|
40
+ - layout.layout_basics do
41
+ %p
42
+ Different Layouts may be created for your website. For a small site you may have only one, or for a large site there may be more options. The Layouts created for your site are:
43
+ = @layouts.collect(&:name).to_sentence(:words_connector => ', ', :last_word_connector => ', and ')
44
+ %p Layouts determine how your content will be displayed. Typically a Layout is created for the Home page and all of its child pages inherit that layout from it. It's likely that you don't need to make any changes to this setting on the pages that you edit, but talk to the administrator or designer of your site to find out what layout to choose.
45
+ %h3 Page Type
46
+ - render_region :page_type do |page_type|
47
+ - page_type.page_type_basics do
48
+ %p
49
+ The Page Type determines how the page will behave. This website, for example,
50
+ - unless @file_not_found_page.nil?
51
+ = "has the page \"#{@file_not_found_page.title}\"."
52
+ - else
53
+ doesn't have a File Not Found Page.
54
+ = "A #{FileNotFoundPage.display_name} page will be displayed to anyone requesting a page that does not exist. This allows you to customize the message to your website visitors if they try to find a page like yoursite.com/non-existant-page"
55
+ %h3 Status
56
+ %p The Status of a page helps to determine how it will be displayed to visitors of your site, but also helps you manage your content internally. Only 'Published' pages are displayed to the public, but if you need to hide a previously published page, you can set the Status to 'Hidden'
57
+ %p 'Draft' and 'Reviewed' allow you to set a Status that gives you information about the readiness of that page to be displayed to your website visitors.
58
+ %p One person on your team, for example may write content for one page and then set it to 'Draft'. Another team member can then check the content of the draft and set it to 'Reviewed'. When ready, you can then set the page status to 'Published'. These steps, of course, aren't necessary, but they are available if you need them.
59
+ %h3 Saving your changes
60
+ - render_region :saving do |saving|
61
+ - saving.saving_basics do
62
+ %p By selecting "Save Changes", your page content will be saved and you will return to the page index.
63
+ %p By selecting "Save and Continue Editing", your page content will be saved and you will return to the same page edit screen. This is useful if you would like to make a change to view on your public website, but continue making changes after rewiewing your change.
64
+ %p You may also "Cancel" any changes in which case your changes will not be saved and you will return to the page index.