we5-browsercms 3.0.5.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/cms/application_controller.rb +2 -12
- data/app/controllers/cms/categories_controller.rb +4 -1
- data/app/controllers/cms/content_block_controller.rb +1 -1
- data/app/controllers/cms/content_controller.rb +3 -83
- data/app/controllers/cms/dashboard_controller.rb +1 -1
- data/app/controllers/cms/links_controller.rb +2 -2
- data/app/controllers/cms/pages_controller.rb +2 -0
- data/app/controllers/cms/portlets_controller.rb +2 -2
- data/app/controllers/cms/tags_controller.rb +4 -1
- data/app/controllers/tests/pretend_controller.rb +32 -0
- data/app/helpers/application_helper.rb +3 -1
- data/app/helpers/cms/application_helper.rb +18 -32
- data/app/helpers/cms/form_builder.rb +129 -54
- data/app/helpers/cms/menu_helper.rb +13 -2
- data/app/helpers/cms/page_helper.rb +26 -2
- data/app/helpers/cms/rendering_helper.rb +42 -0
- data/app/models/guest_user.rb +11 -3
- data/app/models/page.rb +1 -1
- data/app/models/page_template.rb +1 -18
- data/app/models/portlet.rb +12 -2
- data/app/models/section.rb +41 -33
- data/app/models/tag.rb +1 -1
- data/app/models/task.rb +32 -26
- data/app/models/templates.rb +31 -0
- data/app/models/user.rb +35 -9
- data/app/portlets/forgot_password_portlet.rb +1 -0
- data/app/views/cms/blocks/_toolbar_for_member.html.erb +1 -1
- data/app/views/cms/blocks/edit.html.erb +5 -0
- data/app/views/cms/blocks/index.html.erb +26 -39
- data/app/views/cms/blocks/show.html.erb +3 -0
- data/app/views/cms/blocks/usages.html.erb +17 -22
- data/app/views/cms/blocks/versions.html.erb +25 -53
- data/app/views/cms/connectors/new.html.erb +6 -6
- data/app/views/cms/dashboard/_page_drafts.html.erb +27 -38
- data/app/views/cms/dashboard/_tasks.html.erb +31 -43
- data/app/views/cms/dynamic_views/index.html.erb +17 -26
- data/app/views/cms/email_messages/index.html.erb +10 -19
- data/app/views/cms/form_builder/_cms_check_box.html.erb +7 -0
- data/app/views/cms/form_builder/_cms_drop_down.html.erb +0 -7
- data/app/views/cms/form_builder/_cms_fancy_drop_down.html.erb +9 -0
- data/app/views/cms/form_builder/_cms_file_field.html.erb +11 -7
- data/app/views/cms/form_builder/_cms_instructions.html.erb +4 -0
- data/app/views/cms/form_builder/_cms_template_editor.html.erb +8 -0
- data/app/views/cms/groups/_permissions.html.erb +1 -1
- data/app/views/cms/groups/index.html.erb +34 -49
- data/app/views/cms/page_routes/index.html.erb +19 -28
- data/app/views/cms/page_routes/show.html.erb +2 -2
- data/app/views/cms/pages/_edit_connector.html.erb +9 -1
- data/app/views/cms/pages/versions.html.erb +31 -44
- data/app/views/cms/redirects/index.html.erb +14 -22
- data/app/views/cms/routes/index.html.erb +19 -21
- data/app/views/cms/tags/render.html.erb +19 -38
- data/app/views/cms/toolbar/index.html.erb +0 -11
- data/app/views/cms/users/index.html.erb +25 -33
- data/app/views/layouts/cms/_head.html.erb +1 -1
- data/app/views/layouts/cms/content_library.html.erb +7 -7
- data/app/views/layouts/cms/thickbox.html.erb +2 -2
- data/app/views/portlets/forgot_password/_form.html.erb +4 -3
- data/app/views/tests/pretend/open_with_layout.html.erb +2 -0
- data/bin/bcms +6 -0
- data/bin/browsercms +73 -0
- data/browsercms.gemspec +444 -369
- data/db/demo/page_templates/sub_page.html.erb +1 -1
- data/db/migrate/20081114172307_load_seed_data.rb +0 -29
- data/doc/app/classes/AbstractFileBlock.html +32 -6
- data/doc/app/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html +136 -85
- data/doc/app/classes/ActiveSupport/Cache/FileStore.html +6 -6
- data/doc/app/classes/ActsAsList.html +6 -6
- data/doc/app/classes/ActsAsList/ClassMethods.html +8 -8
- data/doc/app/classes/ActsAsList/InstanceMethods.html +143 -119
- data/doc/app/classes/ApplicationHelper.html +4 -0
- data/doc/app/classes/Attachment.html +134 -134
- data/doc/app/classes/Category.html +24 -24
- data/doc/app/classes/CategoryType.html +18 -18
- data/doc/app/classes/Cms.html +227 -94
- data/doc/app/classes/Cms/Acts.html +5 -0
- data/doc/app/classes/Cms/Acts/ContentBlock.html +6 -6
- data/doc/app/classes/Cms/Acts/ContentBlock/MacroMethods.html +6 -6
- data/doc/app/classes/Cms/Acts/ContentBlock/MacroMethods/InstanceMethods.html +6 -6
- data/doc/app/classes/Cms/Acts/ContentPage.html +187 -0
- data/doc/app/classes/Cms/Acts/ContentPage/ClassMethods.html +188 -0
- data/doc/app/classes/Cms/ApplicationController.html +69 -118
- data/doc/app/classes/Cms/ApplicationHelper.html +277 -393
- data/doc/app/classes/Cms/AttachmentsController.html +6 -6
- data/doc/app/classes/Cms/Authentication/Controller.html +226 -228
- data/doc/app/classes/Cms/Authentication/Model.html +6 -6
- data/doc/app/classes/Cms/Authentication/Model/ClassMethods.html +30 -30
- data/doc/app/classes/Cms/Authentication/Model/InstanceMethods.html +66 -66
- data/doc/app/classes/Cms/Behaviors/Archiving.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Archiving/InstanceMethods.html +24 -24
- data/doc/app/classes/Cms/Behaviors/Archiving/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/Attaching.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Attaching/InstanceMethods.html +123 -123
- data/doc/app/classes/Cms/Behaviors/Attaching/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/Categorizing.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Categorizing/InstanceMethods.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Categorizing/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/ClassMethods.html +60 -60
- data/doc/app/classes/Cms/Behaviors/Connecting.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Connecting/ClassMethods.html +18 -18
- data/doc/app/classes/Cms/Behaviors/Connecting/InstanceMethods.html +42 -42
- data/doc/app/classes/Cms/Behaviors/Connecting/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/DynamicAttributes.html +6 -6
- data/doc/app/classes/Cms/Behaviors/DynamicAttributes/InstanceMethods.html +14 -14
- data/doc/app/classes/Cms/Behaviors/DynamicAttributes/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/FlushCacheOnChange.html +12 -12
- data/doc/app/classes/Cms/Behaviors/FlushCacheOnChange/InstanceMethods.html +6 -6
- data/doc/app/classes/Cms/Behaviors/FlushCacheOnChange/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/Hiding.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Hiding/InstanceMethods.html +24 -24
- data/doc/app/classes/Cms/Behaviors/Hiding/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/InstanceMethods.html +127 -74
- data/doc/app/classes/Cms/Behaviors/Pagination.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Pagination/ClassMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/Pagination/Collection.html +55 -55
- data/doc/app/classes/Cms/Behaviors/Pagination/InvalidPage.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Publishing.html +12 -12
- data/doc/app/classes/Cms/Behaviors/Publishing/InstanceMethods.html +119 -119
- data/doc/app/classes/Cms/Behaviors/Publishing/MacroMethods.html +25 -14
- data/doc/app/classes/Cms/Behaviors/Rendering.html +10 -13
- data/doc/app/classes/Cms/Behaviors/Rendering/MacroMethods.html +33 -33
- data/doc/app/classes/Cms/Behaviors/Searching.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Searching/ClassMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/Searching/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/SoftDeleting.html +6 -6
- data/doc/app/classes/Cms/Behaviors/SoftDeleting/ClassMethods.html +24 -24
- data/doc/app/classes/Cms/Behaviors/SoftDeleting/InstanceMethods.html +30 -30
- data/doc/app/classes/Cms/Behaviors/SoftDeleting/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/Taggable.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Taggable/ClassMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/Taggable/InstanceMethods.html +34 -33
- data/doc/app/classes/Cms/Behaviors/Taggable/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/Userstamping.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Userstamping/InstanceMethods.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Userstamping/MacroMethods.html +12 -12
- data/doc/app/classes/Cms/Behaviors/Versioning.html +6 -6
- data/doc/app/classes/Cms/Behaviors/Versioning/ClassMethods.html +30 -30
- data/doc/app/classes/Cms/Behaviors/Versioning/InstanceMethods.html +322 -294
- data/doc/app/classes/Cms/Behaviors/Versioning/MacroMethods.html +31 -31
- data/doc/app/classes/Cms/CacheController.html +12 -12
- data/doc/app/classes/Cms/Caching.html +12 -12
- data/doc/app/classes/Cms/CategoriesController.html +35 -0
- data/doc/app/classes/Cms/CategoryTypesController.html +6 -6
- data/doc/app/classes/Cms/ConnectorsController.html +19 -19
- data/doc/app/classes/Cms/ContentBlockController.html +486 -440
- data/doc/app/classes/Cms/ContentController.html +48 -121
- data/doc/app/classes/Cms/ContentRenderingSupport.html +222 -0
- data/doc/app/classes/Cms/ContentTypesController.html +6 -6
- data/doc/app/classes/Cms/DashboardController.html +12 -11
- data/doc/app/classes/Cms/DataLoader.html +12 -12
- data/doc/app/classes/Cms/DomainSupport.html +166 -0
- data/doc/app/classes/Cms/DynamicViewsController.html +54 -54
- data/doc/app/classes/Cms/EmailMessagesController.html +12 -12
- data/doc/app/classes/Cms/ErrorHandling.html +50 -23
- data/doc/app/classes/Cms/Errors/AccessDenied.html +10 -10
- data/doc/app/classes/Cms/Extensions/ActionView/Base.html +6 -6
- data/doc/app/classes/Cms/Extensions/ActiveRecord/Base.html +6 -6
- data/doc/app/classes/Cms/Extensions/ActiveRecord/Errors.html +6 -6
- data/doc/app/classes/Cms/Extensions/Hash.html +12 -12
- data/doc/app/classes/Cms/Extensions/Integer.html +6 -6
- data/doc/app/classes/Cms/Extensions/NilClass.html +24 -24
- data/doc/app/classes/Cms/Extensions/String.html +24 -24
- data/doc/app/classes/Cms/FormBuilder.html +258 -90
- data/doc/app/classes/Cms/FormTagHelper.html +30 -30
- data/doc/app/classes/Cms/GroupsController.html +24 -24
- data/doc/app/classes/Cms/HomeController.html +6 -6
- data/doc/app/classes/Cms/LinksController.html +64 -62
- data/doc/app/classes/Cms/MenuHelper.html +210 -165
- data/doc/app/classes/Cms/PageHelper.html +178 -91
- data/doc/app/classes/Cms/PageRouteOptionsController.html +54 -54
- data/doc/app/classes/Cms/PageRoutesController.html +36 -36
- data/doc/app/classes/Cms/PagesController.html +111 -109
- data/doc/app/classes/Cms/PathHelper.html +36 -36
- data/doc/app/classes/Cms/PortletController.html +6 -6
- data/doc/app/classes/Cms/PortletsController.html +43 -43
- data/doc/app/classes/Cms/RedirectsController.html +12 -12
- data/doc/app/classes/Cms/RenderingHelper.html +214 -0
- data/doc/app/classes/Cms/ResourceController.html +114 -114
- data/doc/app/classes/Cms/Routes.html +151 -143
- data/doc/app/classes/Cms/RoutesController.html +6 -6
- data/doc/app/classes/Cms/SectionNodesController.html +36 -36
- data/doc/app/classes/Cms/SectionNodesHelper.html +6 -6
- data/doc/app/classes/Cms/SectionsController.html +212 -188
- data/doc/app/classes/Cms/SessionsController.html +68 -39
- data/doc/app/classes/Cms/TagsController.html +30 -6
- data/doc/app/classes/Cms/TasksController.html +18 -18
- data/doc/app/classes/Cms/TemplateSupport.html +185 -0
- data/doc/app/classes/Cms/ToolbarController.html +6 -6
- data/doc/app/classes/Cms/UsersController.html +129 -153
- data/doc/app/classes/CommandLine.html +226 -0
- data/doc/app/classes/Connector.html +75 -71
- data/doc/app/classes/ContentType.html +72 -72
- data/doc/app/classes/DynamicPortlet.html +6 -6
- data/doc/app/classes/DynamicView.html +130 -133
- data/doc/app/classes/EmailMessage.html +24 -24
- data/doc/app/classes/EmailMessageMailer.html +6 -6
- data/doc/app/classes/EmailPagePortlet.html +12 -12
- data/doc/app/classes/FileBlock.html +18 -18
- data/doc/app/classes/ForgotPasswordMailer.html +151 -0
- data/doc/app/classes/ForgotPasswordPortlet.html +162 -0
- data/doc/app/classes/Group.html +72 -20
- data/doc/app/classes/GuestUser.html +138 -93
- data/doc/app/classes/HtmlBlock.html +12 -12
- data/doc/app/classes/ImageBlock.html +18 -18
- data/doc/app/classes/InitialData.html +6 -6
- data/doc/app/classes/Link.html +30 -30
- data/doc/app/classes/LoginPortlet.html +6 -6
- data/doc/app/classes/Page.html +185 -185
- data/doc/app/classes/PagePartial.html +18 -18
- data/doc/app/classes/PageRoute.html +48 -48
- data/doc/app/classes/PageTemplate.html +60 -78
- data/doc/app/classes/Portlet.html +339 -267
- data/doc/app/classes/ResetPasswordPortlet.html +169 -0
- data/doc/app/classes/Section.html +257 -200
- data/doc/app/classes/SectionNode.html +60 -60
- data/doc/app/classes/Sequence.html +6 -6
- data/doc/app/classes/Site.html +30 -30
- data/doc/app/classes/Tag.html +31 -31
- data/doc/app/classes/TagCloudPortlet.html +12 -12
- data/doc/app/classes/Tagging.html +6 -6
- data/doc/app/classes/Task.html +37 -37
- data/doc/app/classes/Templates.html +151 -0
- data/doc/app/classes/Tests.html +107 -0
- data/doc/app/classes/Tests/PretendController.html +275 -0
- data/doc/app/classes/User.html +344 -205
- data/doc/app/created.rid +1 -1
- data/doc/app/files/app/controllers/cms/application_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/categories_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/connectors_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/content_block_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/content_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/dashboard_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/error_handling_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/links_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/pages_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/portlets_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/section_nodes_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/sections_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/sessions_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/tags_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/cms/users_controller_rb.html +1 -1
- data/doc/app/files/app/controllers/tests/pretend_controller_rb.html +112 -0
- data/doc/app/files/app/helpers/application_helper_rb.html +5 -1
- data/doc/app/files/app/helpers/cms/application_helper_rb.html +1 -1
- data/doc/app/files/app/helpers/cms/form_builder_rb.html +8 -1
- data/doc/app/files/app/helpers/cms/menu_helper_rb.html +1 -1
- data/doc/app/files/app/helpers/cms/page_helper_rb.html +1 -1
- data/doc/app/files/app/helpers/cms/rendering_helper_rb.html +111 -0
- data/doc/app/files/app/helpers/cms/template_support_rb.html +108 -0
- data/doc/app/files/app/models/abstract_file_block_rb.html +1 -1
- data/doc/app/files/app/models/attachment_rb.html +2 -2
- data/doc/app/files/app/models/connector_rb.html +1 -1
- data/doc/app/files/app/models/content_type_rb.html +1 -1
- data/doc/app/files/app/models/dynamic_view_rb.html +1 -1
- data/doc/app/files/app/models/forgot_password_mailer_rb.html +101 -0
- data/doc/app/files/app/models/group_rb.html +10 -1
- data/doc/app/files/app/models/guest_user_rb.html +14 -1
- data/doc/app/files/app/models/link_rb.html +1 -1
- data/doc/app/files/app/models/page_rb.html +1 -1
- data/doc/app/files/app/models/page_template_rb.html +1 -1
- data/doc/app/files/app/models/portlet_rb.html +1 -1
- data/doc/app/files/app/models/section_rb.html +1 -1
- data/doc/app/files/app/models/tag_rb.html +1 -1
- data/doc/app/files/app/models/task_rb.html +1 -1
- data/doc/app/files/app/models/templates_rb.html +108 -0
- data/doc/app/files/app/models/user_rb.html +1 -1
- data/doc/app/files/app/portlets/forgot_password_portlet_rb.html +108 -0
- data/doc/app/files/app/portlets/reset_password_portlet_rb.html +101 -0
- data/doc/app/files/doc/README_FOR_APP.html +7 -6
- data/doc/app/files/lib/acts_as_list_rb.html +1 -1
- data/doc/app/files/lib/browsercms_rb.html +1 -1
- data/doc/app/files/lib/cms/acts/content_block_rb.html +1 -1
- data/doc/app/files/lib/cms/acts/content_page_rb.html +125 -0
- data/doc/app/files/lib/cms/authentication/controller_rb.html +61 -1
- data/doc/app/files/lib/cms/behaviors/attaching_rb.html +1 -1
- data/doc/app/files/lib/cms/behaviors/publishing_rb.html +1 -1
- data/doc/app/files/lib/cms/behaviors/rendering_rb.html +1 -1
- data/doc/app/files/lib/cms/behaviors/taggable_rb.html +1 -1
- data/doc/app/files/lib/cms/behaviors/versioning_rb.html +1 -1
- data/doc/app/files/lib/cms/content_rendering_support_rb.html +108 -0
- data/doc/app/files/lib/cms/domain_support_rb.html +108 -0
- data/doc/app/files/lib/cms/extensions/active_record/connection_adapters/abstract/schema_statements_rb.html +1 -1
- data/doc/app/files/lib/cms/init_rb.html +8 -1
- data/doc/app/files/lib/cms/routes_rb.html +1 -1
- data/doc/app/files/lib/cms/version_rb.html +107 -0
- data/doc/app/files/lib/command_line_rb.html +101 -0
- data/doc/app/fr_class_index.html +13 -0
- data/doc/app/fr_file_index.html +12 -0
- data/doc/app/fr_method_index.html +761 -712
- data/doc/guides/html/authentication.html +201 -0
- data/doc/guides/html/build_it_yourself.html +9 -1
- data/doc/guides/html/building_modules.html +90 -48
- data/doc/guides/html/building_templates.html +506 -0
- data/doc/guides/html/content_blocks.html +476 -0
- data/doc/guides/html/customizing_browsercms.html +173 -0
- data/doc/guides/html/deployment_guide.html +30 -5
- data/doc/guides/html/getting_started.html +61 -27
- data/doc/guides/html/images/content_blocks/add_field_to_form.png +0 -0
- data/doc/guides/html/images/content_blocks/add_second_block.png +0 -0
- data/doc/guides/html/images/nfl_sitemap.png +0 -0
- data/doc/guides/html/index.html +33 -22
- data/doc/guides/html/installing_modules.html +9 -1
- data/doc/guides/html/portlets.html +237 -0
- data/doc/guides/html/user_guide.html +9 -1
- data/doc/guides/html/{designer_guide.html → writing_guides.html} +21 -20
- data/lib/cms/acts/content_page.rb +69 -0
- data/lib/cms/authentication/controller.rb +1 -1
- data/lib/cms/behaviors/rendering.rb +9 -2
- data/lib/cms/behaviors/versioning.rb +43 -35
- data/lib/cms/content_rendering_support.rb +96 -0
- data/lib/cms/domain_support.rb +20 -0
- data/lib/cms/init.rb +21 -2
- data/lib/cms/version.rb +5 -0
- data/lib/command_line.rb +39 -0
- data/lib/tasks/cms.rake +12 -1
- data/public/bcms/ckeditor/ckeditor.js +108 -0
- data/public/bcms/ckeditor/config.js +18 -0
- data/public/bcms/ckeditor/core/_bootstrap.js +64 -0
- data/public/bcms/ckeditor/core/ajax.js +143 -0
- data/public/bcms/ckeditor/core/ckeditor.js +96 -0
- data/public/bcms/ckeditor/core/ckeditor_base.js +190 -0
- data/public/bcms/ckeditor/core/ckeditor_basic.js +241 -0
- data/public/bcms/ckeditor/core/command.js +70 -0
- data/public/bcms/ckeditor/core/commanddefinition.js +72 -0
- data/public/bcms/ckeditor/core/config.js +287 -0
- data/public/bcms/ckeditor/core/dom.js +21 -0
- data/public/bcms/ckeditor/core/dom/document.js +210 -0
- data/public/bcms/ckeditor/core/dom/documentfragment.js +49 -0
- data/public/bcms/ckeditor/core/dom/domobject.js +204 -0
- data/public/bcms/ckeditor/core/dom/element.js +1384 -0
- data/public/bcms/ckeditor/core/dom/elementpath.js +104 -0
- data/public/bcms/ckeditor/core/dom/event.js +137 -0
- data/public/bcms/ckeditor/core/dom/node.js +649 -0
- data/public/bcms/ckeditor/core/dom/nodelist.js +23 -0
- data/public/bcms/ckeditor/core/dom/range.js +1668 -0
- data/public/bcms/ckeditor/core/dom/text.js +123 -0
- data/public/bcms/ckeditor/core/dom/walker.js +411 -0
- data/public/bcms/ckeditor/core/dom/window.js +96 -0
- data/public/bcms/ckeditor/core/dtd.js +200 -0
- data/public/bcms/ckeditor/core/editor.js +650 -0
- data/public/bcms/ckeditor/core/editor_basic.js +178 -0
- data/public/bcms/ckeditor/core/env.js +219 -0
- data/public/bcms/ckeditor/core/event.js +335 -0
- data/public/bcms/ckeditor/core/eventInfo.js +120 -0
- data/public/bcms/ckeditor/core/focusmanager.js +123 -0
- data/public/bcms/ckeditor/core/htmlparser.js +212 -0
- data/public/bcms/ckeditor/core/htmlparser/basicwriter.js +140 -0
- data/public/bcms/ckeditor/core/htmlparser/cdata.js +44 -0
- data/public/bcms/ckeditor/core/htmlparser/comment.js +59 -0
- data/public/bcms/ckeditor/core/htmlparser/element.js +196 -0
- data/public/bcms/ckeditor/core/htmlparser/filter.js +233 -0
- data/public/bcms/ckeditor/core/htmlparser/fragment.js +434 -0
- data/public/bcms/ckeditor/core/htmlparser/text.js +55 -0
- data/public/bcms/ckeditor/core/imagecacher.js +58 -0
- data/public/bcms/ckeditor/core/lang.js +147 -0
- data/public/bcms/ckeditor/core/loader.js +238 -0
- data/public/bcms/ckeditor/core/plugindefinition.js +66 -0
- data/public/bcms/ckeditor/core/plugins.js +82 -0
- data/public/bcms/ckeditor/core/resourcemanager.js +233 -0
- data/public/bcms/ckeditor/core/scriptloader.js +194 -0
- data/public/bcms/ckeditor/core/skins.js +185 -0
- data/public/bcms/ckeditor/core/test.js +184 -0
- data/public/bcms/ckeditor/core/themes.js +18 -0
- data/public/bcms/ckeditor/core/tools.js +531 -0
- data/public/bcms/ckeditor/core/ui.js +106 -0
- data/public/bcms/ckeditor/core/xml.js +165 -0
- data/public/bcms/ckeditor/editor.js +51 -0
- data/public/bcms/ckeditor/lang/_languages.js +82 -0
- data/public/bcms/ckeditor/lang/_translationstatus.txt +59 -0
- data/public/bcms/ckeditor/lang/af.js +674 -0
- data/public/bcms/ckeditor/lang/ar.js +674 -0
- data/public/bcms/ckeditor/lang/bg.js +674 -0
- data/public/bcms/ckeditor/lang/bn.js +674 -0
- data/public/bcms/ckeditor/lang/bs.js +674 -0
- data/public/bcms/ckeditor/lang/ca.js +674 -0
- data/public/bcms/ckeditor/lang/cs.js +674 -0
- data/public/bcms/ckeditor/lang/da.js +674 -0
- data/public/bcms/ckeditor/lang/de.js +674 -0
- data/public/bcms/ckeditor/lang/el.js +674 -0
- data/public/bcms/ckeditor/lang/en-au.js +674 -0
- data/public/bcms/ckeditor/lang/en-ca.js +674 -0
- data/public/bcms/ckeditor/lang/en-uk.js +674 -0
- data/public/bcms/ckeditor/lang/en.js +674 -0
- data/public/bcms/ckeditor/lang/eo.js +674 -0
- data/public/bcms/ckeditor/lang/es.js +674 -0
- data/public/bcms/ckeditor/lang/et.js +674 -0
- data/public/bcms/ckeditor/lang/eu.js +674 -0
- data/public/bcms/ckeditor/lang/fa.js +674 -0
- data/public/bcms/ckeditor/lang/fi.js +674 -0
- data/public/bcms/ckeditor/lang/fo.js +674 -0
- data/public/bcms/ckeditor/lang/fr-ca.js +674 -0
- data/public/bcms/ckeditor/lang/fr.js +674 -0
- data/public/bcms/ckeditor/lang/gl.js +674 -0
- data/public/bcms/ckeditor/lang/gu.js +674 -0
- data/public/bcms/ckeditor/lang/he.js +674 -0
- data/public/bcms/ckeditor/lang/hi.js +674 -0
- data/public/bcms/ckeditor/lang/hr.js +674 -0
- data/public/bcms/ckeditor/lang/hu.js +674 -0
- data/public/bcms/ckeditor/lang/is.js +674 -0
- data/public/bcms/ckeditor/lang/it.js +674 -0
- data/public/bcms/ckeditor/lang/ja.js +674 -0
- data/public/bcms/ckeditor/lang/km.js +674 -0
- data/public/bcms/ckeditor/lang/ko.js +674 -0
- data/public/bcms/ckeditor/lang/lt.js +674 -0
- data/public/bcms/ckeditor/lang/lv.js +674 -0
- data/public/bcms/ckeditor/lang/mn.js +674 -0
- data/public/bcms/ckeditor/lang/ms.js +674 -0
- data/public/bcms/ckeditor/lang/nb.js +674 -0
- data/public/bcms/ckeditor/lang/nl.js +674 -0
- data/public/bcms/ckeditor/lang/no.js +674 -0
- data/public/bcms/ckeditor/lang/pl.js +674 -0
- data/public/bcms/ckeditor/lang/pt-br.js +674 -0
- data/public/bcms/ckeditor/lang/pt.js +674 -0
- data/public/bcms/ckeditor/lang/ro.js +674 -0
- data/public/bcms/ckeditor/lang/ru.js +674 -0
- data/public/bcms/ckeditor/lang/sk.js +674 -0
- data/public/bcms/ckeditor/lang/sl.js +674 -0
- data/public/bcms/ckeditor/lang/sr-latn.js +674 -0
- data/public/bcms/ckeditor/lang/sr.js +674 -0
- data/public/bcms/ckeditor/lang/sv.js +674 -0
- data/public/bcms/ckeditor/lang/th.js +674 -0
- data/public/bcms/ckeditor/lang/tr.js +674 -0
- data/public/bcms/ckeditor/lang/uk.js +674 -0
- data/public/bcms/ckeditor/lang/vi.js +674 -0
- data/public/bcms/ckeditor/lang/zh-cn.js +674 -0
- data/public/bcms/ckeditor/lang/zh.js +674 -0
- data/public/bcms/ckeditor/plugins/about/dialogs/about.js +73 -0
- data/public/bcms/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/public/bcms/ckeditor/plugins/about/plugin.js +22 -0
- data/public/bcms/ckeditor/plugins/basicstyles/plugin.js +50 -0
- data/public/bcms/ckeditor/plugins/blockquote/plugin.js +301 -0
- data/public/bcms/ckeditor/plugins/button/plugin.js +264 -0
- data/public/bcms/ckeditor/plugins/clipboard/dialogs/paste.js +167 -0
- data/public/bcms/ckeditor/plugins/clipboard/plugin.js +208 -0
- data/public/bcms/ckeditor/plugins/colorbutton/plugin.js +202 -0
- data/public/bcms/ckeditor/plugins/contextmenu/plugin.js +178 -0
- data/public/bcms/ckeditor/plugins/dialog/dialogDefinition.js +315 -0
- data/public/bcms/ckeditor/plugins/dialog/plugin.js +2742 -0
- data/public/bcms/ckeditor/plugins/dialogui/plugin.js +1319 -0
- data/public/bcms/ckeditor/plugins/domiterator/plugin.js +354 -0
- data/public/bcms/ckeditor/plugins/editingblock/plugin.js +236 -0
- data/public/bcms/ckeditor/plugins/elementspath/plugin.js +182 -0
- data/public/bcms/ckeditor/plugins/enterkey/plugin.js +324 -0
- data/public/bcms/ckeditor/plugins/entities/plugin.js +200 -0
- data/public/bcms/ckeditor/plugins/fakeobjects/plugin.js +111 -0
- data/public/bcms/ckeditor/plugins/filebrowser/plugin.js +383 -0
- data/public/bcms/ckeditor/plugins/find/dialogs/find.js +843 -0
- data/public/bcms/ckeditor/plugins/find/plugin.js +46 -0
- data/public/bcms/ckeditor/plugins/flash/dialogs/flash.js +682 -0
- data/public/bcms/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/public/bcms/ckeditor/plugins/flash/plugin.js +165 -0
- data/public/bcms/ckeditor/plugins/floatpanel/plugin.js +325 -0
- data/public/bcms/ckeditor/plugins/font/plugin.js +227 -0
- data/public/bcms/ckeditor/plugins/format/plugin.js +191 -0
- data/public/bcms/ckeditor/plugins/forms/dialogs/button.js +135 -0
- data/public/bcms/ckeditor/plugins/forms/dialogs/checkbox.js +138 -0
- data/public/bcms/ckeditor/plugins/forms/dialogs/form.js +177 -0
- data/public/bcms/ckeditor/plugins/forms/dialogs/hiddenfield.js +91 -0
- data/public/bcms/ckeditor/plugins/forms/dialogs/radio.js +135 -0
- data/public/bcms/ckeditor/plugins/forms/dialogs/select.js +541 -0
- data/public/bcms/ckeditor/plugins/forms/dialogs/textarea.js +114 -0
- data/public/bcms/ckeditor/plugins/forms/dialogs/textfield.js +193 -0
- data/public/bcms/ckeditor/plugins/forms/plugin.js +193 -0
- data/public/bcms/ckeditor/plugins/horizontalrule/plugin.js +35 -0
- data/public/bcms/ckeditor/plugins/htmldataprocessor/plugin.js +373 -0
- data/public/bcms/ckeditor/plugins/htmlwriter/plugin.js +289 -0
- data/public/bcms/ckeditor/plugins/iframedialog/plugin.js +136 -0
- data/public/bcms/ckeditor/plugins/image/dialogs/image.js +1225 -0
- data/public/bcms/ckeditor/plugins/image/plugin.js +64 -0
- data/public/bcms/ckeditor/plugins/indent/plugin.js +323 -0
- data/public/bcms/ckeditor/plugins/justify/plugin.js +164 -0
- data/public/bcms/ckeditor/plugins/keystrokes/plugin.js +217 -0
- data/public/bcms/ckeditor/plugins/link/dialogs/anchor.js +98 -0
- data/public/bcms/ckeditor/plugins/link/dialogs/link.js +1217 -0
- data/public/{fckeditor/editor → bcms/ckeditor/plugins/link}/images/anchor.gif +0 -0
- data/public/bcms/ckeditor/plugins/link/plugin.js +188 -0
- data/public/bcms/ckeditor/plugins/list/plugin.js +570 -0
- data/public/bcms/ckeditor/plugins/listblock/plugin.js +231 -0
- data/public/bcms/ckeditor/plugins/maximize/plugin.js +267 -0
- data/public/bcms/ckeditor/plugins/menu/plugin.js +377 -0
- data/public/bcms/ckeditor/plugins/menubutton/plugin.js +93 -0
- data/public/bcms/ckeditor/plugins/newpage/plugin.js +65 -0
- data/public/{fckeditor/editor/css/images/fck_pagebreak.gif → bcms/ckeditor/plugins/pagebreak/images/pagebreak.gif} +0 -0
- data/public/bcms/ckeditor/plugins/pagebreak/plugin.js +96 -0
- data/public/bcms/ckeditor/plugins/panel/plugin.js +330 -0
- data/public/bcms/ckeditor/plugins/panelbutton/plugin.js +140 -0
- data/public/bcms/ckeditor/plugins/pastefromword/dialogs/pastefromword.js +307 -0
- data/public/bcms/ckeditor/plugins/pastefromword/plugin.js +54 -0
- data/public/bcms/ckeditor/plugins/pastetext/dialogs/pastetext.js +65 -0
- data/public/bcms/ckeditor/plugins/pastetext/plugin.js +142 -0
- data/public/bcms/ckeditor/plugins/popup/plugin.js +62 -0
- data/public/bcms/ckeditor/plugins/preview/plugin.js +97 -0
- data/public/bcms/ckeditor/plugins/print/plugin.js +41 -0
- data/public/bcms/ckeditor/plugins/removeformat/plugin.js +132 -0
- data/public/bcms/ckeditor/plugins/resize/plugin.js +115 -0
- data/public/bcms/ckeditor/plugins/richcombo/plugin.js +357 -0
- data/public/bcms/ckeditor/plugins/save/plugin.js +55 -0
- data/public/bcms/ckeditor/plugins/scayt/dialogs/options.js +494 -0
- data/public/bcms/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- data/public/bcms/ckeditor/plugins/scayt/plugin.js +511 -0
- data/public/bcms/ckeditor/plugins/selection/plugin.js +1072 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_address.png +0 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_blockquote.png +0 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_div.png +0 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_h1.png +0 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_h2.png +0 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_h3.png +0 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_h4.png +0 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_h5.png +0 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_h6.png +0 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_p.png +0 -0
- data/public/{fckeditor/editor/css → bcms/ckeditor/plugins/showblocks}/images/block_pre.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/plugin.js +153 -0
- data/public/bcms/ckeditor/plugins/smiley/dialogs/smiley.js +219 -0
- data/public/bcms/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/plugin.js +74 -0
- data/public/bcms/ckeditor/plugins/sourcearea/plugin.js +185 -0
- data/public/bcms/ckeditor/plugins/specialchar/dialogs/specialchar.js +362 -0
- data/public/bcms/ckeditor/plugins/specialchar/plugin.js +29 -0
- data/public/bcms/ckeditor/plugins/styles/plugin.js +1242 -0
- data/public/bcms/ckeditor/plugins/stylescombo/plugin.js +295 -0
- data/public/bcms/ckeditor/plugins/stylescombo/styles/default.js +85 -0
- data/public/bcms/ckeditor/plugins/tab/plugin.js +266 -0
- data/public/bcms/ckeditor/plugins/table/dialogs/table.js +550 -0
- data/public/bcms/ckeditor/plugins/table/plugin.js +70 -0
- data/public/bcms/ckeditor/plugins/tabletools/dialogs/tableCell.js +328 -0
- data/public/bcms/ckeditor/plugins/tabletools/plugin.js +701 -0
- data/public/bcms/ckeditor/plugins/templates/dialogs/templates.js +170 -0
- data/public/bcms/ckeditor/plugins/templates/plugin.js +99 -0
- data/public/bcms/ckeditor/plugins/templates/templates/default.js +94 -0
- data/public/{fckeditor/editor/dialog/fck_template → bcms/ckeditor/plugins/templates/templates}/images/template1.gif +0 -0
- data/public/{fckeditor/editor/dialog/fck_template → bcms/ckeditor/plugins/templates/templates}/images/template2.gif +0 -0
- data/public/{fckeditor/editor/dialog/fck_template → bcms/ckeditor/plugins/templates/templates}/images/template3.gif +0 -0
- data/public/bcms/ckeditor/plugins/toolbar/plugin.js +412 -0
- data/public/bcms/ckeditor/plugins/uicolor/dialogs/uicolor.js +203 -0
- data/public/bcms/ckeditor/plugins/uicolor/lang/en.js +15 -0
- data/public/bcms/ckeditor/plugins/uicolor/plugin.js +35 -0
- data/public/bcms/ckeditor/plugins/uicolor/uicolor.gif +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/yui.css +15 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/yui.js +71 -0
- data/public/bcms/ckeditor/plugins/undo/plugin.js +490 -0
- data/public/bcms/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
- data/public/bcms/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/public/bcms/ckeditor/plugins/wsc/dialogs/wsc.css +83 -0
- data/public/bcms/ckeditor/plugins/wsc/dialogs/wsc.js +169 -0
- data/public/bcms/ckeditor/plugins/wsc/plugin.js +32 -0
- data/public/bcms/ckeditor/plugins/wysiwygarea/plugin.js +636 -0
- data/public/bcms/ckeditor/skins/kama/dialog.css +742 -0
- data/public/bcms/ckeditor/skins/kama/editor.css +21 -0
- data/public/bcms/ckeditor/skins/kama/elementspath.css +68 -0
- data/public/bcms/ckeditor/skins/kama/icons.css +309 -0
- data/public/bcms/ckeditor/skins/kama/icons.png +0 -0
- data/public/{fckeditor/editor/skins/default/images/dialog.sides.gif → bcms/ckeditor/skins/kama/images/dialog_sides.gif} +0 -0
- data/public/{fckeditor/editor/skins/default/images/dialog.sides.png → bcms/ckeditor/skins/kama/images/dialog_sides.png} +0 -0
- data/public/{fckeditor/editor/skins/default/images/dialog.sides.rtl.png → bcms/ckeditor/skins/kama/images/dialog_sides_rtl.png} +0 -0
- data/public/bcms/ckeditor/skins/kama/images/mini.gif +0 -0
- data/public/bcms/ckeditor/skins/kama/images/noimage.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/sprites.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/public/{fckeditor/editor/skins/default/images/toolbar.start.gif → bcms/ckeditor/skins/kama/images/toolbar_start.gif} +0 -0
- data/public/bcms/ckeditor/skins/kama/mainui.css +139 -0
- data/public/bcms/ckeditor/skins/kama/menu.css +179 -0
- data/public/bcms/ckeditor/skins/kama/panel.css +203 -0
- data/public/bcms/ckeditor/skins/kama/presets.css +49 -0
- data/public/bcms/ckeditor/skins/kama/reset.css +78 -0
- data/public/bcms/ckeditor/skins/kama/richcombo.css +260 -0
- data/public/bcms/ckeditor/skins/kama/skin.js +291 -0
- data/public/bcms/ckeditor/skins/kama/templates.css +71 -0
- data/public/bcms/ckeditor/skins/kama/toolbar.css +384 -0
- data/public/bcms/ckeditor/skins/office2003/dialog.css +643 -0
- data/public/bcms/ckeditor/skins/office2003/editor.css +21 -0
- data/public/bcms/ckeditor/skins/office2003/elementspath.css +68 -0
- data/public/bcms/ckeditor/skins/office2003/icons.css +309 -0
- data/public/bcms/ckeditor/skins/office2003/icons.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/mini.gif +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/noimage.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/sprites.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/mainui.css +97 -0
- data/public/bcms/ckeditor/skins/office2003/menu.css +175 -0
- data/public/bcms/ckeditor/skins/office2003/panel.css +198 -0
- data/public/bcms/ckeditor/skins/office2003/presets.css +49 -0
- data/public/bcms/ckeditor/skins/office2003/reset.css +78 -0
- data/public/bcms/ckeditor/skins/office2003/richcombo.css +279 -0
- data/public/bcms/ckeditor/skins/office2003/skin.js +77 -0
- data/public/bcms/ckeditor/skins/office2003/templates.css +71 -0
- data/public/bcms/ckeditor/skins/office2003/toolbar.css +442 -0
- data/public/bcms/ckeditor/skins/v2/dialog.css +653 -0
- data/public/bcms/ckeditor/skins/v2/editor.css +21 -0
- data/public/bcms/ckeditor/skins/v2/elementspath.css +68 -0
- data/public/bcms/ckeditor/skins/v2/icons.css +309 -0
- data/public/bcms/ckeditor/skins/v2/icons.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
- data/public/bcms/ckeditor/skins/v2/images/dialog_sides.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/mini.gif +0 -0
- data/public/bcms/ckeditor/skins/v2/images/noimage.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/sprites.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
- data/public/{fckeditor/editor/skins/silver/images/toolbar.start.gif → bcms/ckeditor/skins/v2/images/toolbar_start.gif} +0 -0
- data/public/bcms/ckeditor/skins/v2/mainui.css +112 -0
- data/public/bcms/ckeditor/skins/v2/menu.css +178 -0
- data/public/bcms/ckeditor/skins/v2/panel.css +198 -0
- data/public/bcms/ckeditor/skins/v2/presets.css +50 -0
- data/public/bcms/ckeditor/skins/v2/reset.css +78 -0
- data/public/bcms/ckeditor/skins/v2/richcombo.css +275 -0
- data/public/bcms/ckeditor/skins/v2/skin.js +73 -0
- data/public/bcms/ckeditor/skins/v2/templates.css +71 -0
- data/public/bcms/ckeditor/skins/v2/toolbar.css +399 -0
- data/public/bcms/ckeditor/tests/_assets/sample.css +4 -0
- data/public/bcms/ckeditor/tests/_assets/sample.js +1 -0
- data/public/bcms/ckeditor/tests/_assets/sample.txt +1 -0
- data/public/bcms/ckeditor/tests/_assets/sample.xml +5 -0
- data/public/bcms/ckeditor/tests/_assets/sample_xml.txt +5 -0
- data/public/bcms/ckeditor/tests/core/_editor/custom_config_1.js +10 -0
- data/public/bcms/ckeditor/tests/core/_editor/custom_config_2.js +9 -0
- data/public/bcms/ckeditor/tests/core/ajax.html +163 -0
- data/public/bcms/ckeditor/tests/core/bootstrap.html +66 -0
- data/public/bcms/ckeditor/tests/core/ckeditor.html +160 -0
- data/public/bcms/ckeditor/tests/core/dom/document.html +126 -0
- data/public/bcms/ckeditor/tests/core/dom/documentfragment.html +292 -0
- data/public/bcms/ckeditor/tests/core/dom/element.html +637 -0
- data/public/bcms/ckeditor/tests/core/dom/node.html +164 -0
- data/public/bcms/ckeditor/tests/core/dom/range.html +2411 -0
- data/public/bcms/ckeditor/tests/core/dom/text.html +128 -0
- data/public/bcms/ckeditor/tests/core/dom/walker.html +340 -0
- data/public/bcms/ckeditor/tests/core/dom/window.html +53 -0
- data/public/bcms/ckeditor/tests/core/editor.html +123 -0
- data/public/bcms/ckeditor/tests/core/env.html +52 -0
- data/public/bcms/ckeditor/tests/core/event.html +487 -0
- data/public/bcms/ckeditor/tests/core/htmlparser/fragment.html +188 -0
- data/public/bcms/ckeditor/tests/core/htmlparser/htmlparser.html +91 -0
- data/public/bcms/ckeditor/tests/core/plugins.html +45 -0
- data/public/bcms/ckeditor/tests/core/plugins/myplugins/sample/my_plugin.js +3 -0
- data/public/bcms/ckeditor/tests/core/scriptloader.html +52 -0
- data/public/bcms/ckeditor/tests/core/tools.html +170 -0
- data/public/bcms/ckeditor/tests/core/xml.html +150 -0
- data/public/bcms/ckeditor/tests/plugins/domiterator/domiterator.html +236 -0
- data/public/bcms/ckeditor/tests/plugins/htmldataprocessor/htmldataprocessor.html +386 -0
- data/public/bcms/ckeditor/tests/plugins/link/link.html +123 -0
- data/public/bcms/ckeditor/tests/plugins/list/list.html +217 -0
- data/public/bcms/ckeditor/tests/plugins/selection/selection.html +49 -0
- data/public/bcms/ckeditor/tests/plugins/styles/styles.html +596 -0
- data/public/bcms/ckeditor/tests/test.css +81 -0
- data/public/bcms/ckeditor/tests/test.js +93 -0
- data/public/bcms/ckeditor/tests/testall.html +114 -0
- data/public/bcms/ckeditor/tests/yuitest.js +75 -0
- data/public/bcms/ckeditor/themes/default/theme.js +232 -0
- data/public/stylesheets/cms/administration.css +52 -51
- data/public/stylesheets/cms/application.css +55 -51
- data/public/stylesheets/cms/block.css +13 -13
- data/public/stylesheets/cms/buttons.css +91 -91
- data/public/stylesheets/cms/content_library.css +49 -57
- data/public/stylesheets/cms/content_types.css +3 -3
- data/public/stylesheets/cms/dashboard.css +25 -43
- data/public/stylesheets/cms/data_table.css +57 -81
- data/public/stylesheets/cms/date_picker.css +13 -14
- data/public/stylesheets/cms/form_layout.css +133 -140
- data/public/stylesheets/cms/jquery.contextMenu.css +43 -35
- data/public/stylesheets/cms/login.css +50 -51
- data/public/stylesheets/cms/menu.css +61 -63
- data/public/stylesheets/cms/nav.css +53 -53
- data/public/stylesheets/cms/page_toolbar.css +80 -82
- data/public/stylesheets/cms/reset.css +21 -21
- data/public/stylesheets/cms/selectbox.css +16 -18
- data/public/stylesheets/cms/sitemap.css +138 -134
- data/public/stylesheets/cms/thickbox.css +120 -105
- data/rails_generators/content_block/templates/migration.rb +1 -1
- data/rails_generators/portlet/USAGE +3 -1
- data/rails_generators/portlet/portlet_generator.rb +4 -0
- data/rails_generators/portlet/templates/_form.html.erb +1 -2
- data/rails_generators/portlet/templates/portlet.rb +4 -1
- data/rails_generators/portlet/templates/portlet_helper.rb +5 -0
- data/rails_generators/template/USAGE +10 -0
- data/rails_generators/template/template_generator.rb +18 -0
- data/rails_generators/template/templates/template.erb +3 -0
- data/templates/blank.rb +11 -1
- data/templates/demo.rb +11 -1
- data/templates/module.rb +15 -4
- data/test/functional/cms/dashboard_controller_test.rb +19 -2
- data/test/functional/tests/pretend_controller_test.rb +54 -0
- data/test/integration/cms/ckeditor_test.rb +27 -0
- data/test/integration/cms/password_management_test.rb +1 -2
- data/test/test_helper.rb +14 -0
- data/test/unit/helpers/application_helper_test.rb +48 -0
- data/test/unit/helpers/form_builder_test.rb +21 -2
- data/test/unit/helpers/menu_helper_test.rb +164 -142
- data/test/unit/helpers/page_helper_test.rb +11 -3
- data/test/unit/lib/acts_as_content_page_test.rb +72 -0
- data/test/unit/lib/cms/authentication/controller_test.rb +20 -0
- data/test/unit/lib/cms_domain_support_test.rb +43 -0
- data/test/unit/lib/command_line_test.rb +70 -0
- data/test/unit/lib/content_block_test.rb +41 -4
- data/test/unit/lib/content_rendering_support_test.rb +40 -0
- data/test/unit/models/attachment_test.rb +2 -2
- data/test/unit/models/content_type_test.rb +19 -7
- data/test/unit/models/page_template_test.rb +4 -1
- data/test/unit/models/portlet_test.rb +49 -1
- data/test/unit/models/sections_test.rb +41 -2
- data/test/unit/models/task_test.rb +37 -22
- data/test/unit/models/user_test.rb +165 -51
- metadata +424 -323
- data/doc/guides/html/developer_guide.html +0 -308
- data/public/fckeditor/editor/css/behaviors/disablehandles.htc +0 -15
- data/public/fckeditor/editor/css/behaviors/showtableborders.htc +0 -36
- data/public/fckeditor/editor/css/fck_editorarea.css +0 -110
- data/public/fckeditor/editor/css/fck_internal.css +0 -199
- data/public/fckeditor/editor/css/fck_showtableborders_gecko.css +0 -49
- data/public/fckeditor/editor/css/images/fck_anchor.gif +0 -0
- data/public/fckeditor/editor/css/images/fck_flashlogo.gif +0 -0
- data/public/fckeditor/editor/css/images/fck_hiddenfield.gif +0 -0
- data/public/fckeditor/editor/css/images/fck_plugin.gif +0 -0
- data/public/fckeditor/editor/dialog/common/fck_dialog_common.css +0 -85
- data/public/fckeditor/editor/dialog/common/fck_dialog_common.js +0 -311
- data/public/fckeditor/editor/dialog/common/images/locked.gif +0 -0
- data/public/fckeditor/editor/dialog/common/images/reset.gif +0 -0
- data/public/fckeditor/editor/dialog/common/images/unlocked.gif +0 -0
- data/public/fckeditor/editor/dialog/fck_about.html +0 -161
- data/public/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif +0 -0
- data/public/fckeditor/editor/dialog/fck_about/logo_fredck.gif +0 -0
- data/public/fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif +0 -0
- data/public/fckeditor/editor/dialog/fck_anchor.html +0 -220
- data/public/fckeditor/editor/dialog/fck_button.html +0 -104
- data/public/fckeditor/editor/dialog/fck_checkbox.html +0 -104
- data/public/fckeditor/editor/dialog/fck_colorselector.html +0 -172
- data/public/fckeditor/editor/dialog/fck_div.html +0 -364
- data/public/fckeditor/editor/dialog/fck_docprops.html +0 -600
- data/public/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +0 -113
- data/public/fckeditor/editor/dialog/fck_flash.html +0 -152
- data/public/fckeditor/editor/dialog/fck_flash/fck_flash.js +0 -300
- data/public/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +0 -50
- data/public/fckeditor/editor/dialog/fck_form.html +0 -109
- data/public/fckeditor/editor/dialog/fck_hiddenfield.html +0 -115
- data/public/fckeditor/editor/dialog/fck_image.html +0 -258
- data/public/fckeditor/editor/dialog/fck_image/fck_image.js +0 -512
- data/public/fckeditor/editor/dialog/fck_image/fck_image_preview.html +0 -72
- data/public/fckeditor/editor/dialog/fck_link.html +0 -295
- data/public/fckeditor/editor/dialog/fck_link/fck_link.js +0 -893
- data/public/fckeditor/editor/dialog/fck_listprop.html +0 -120
- data/public/fckeditor/editor/dialog/fck_paste.html +0 -346
- data/public/fckeditor/editor/dialog/fck_radiobutton.html +0 -104
- data/public/fckeditor/editor/dialog/fck_replace.html +0 -648
- data/public/fckeditor/editor/dialog/fck_select.html +0 -180
- data/public/fckeditor/editor/dialog/fck_select/fck_select.js +0 -194
- data/public/fckeditor/editor/dialog/fck_smiley.html +0 -111
- data/public/fckeditor/editor/dialog/fck_source.html +0 -68
- data/public/fckeditor/editor/dialog/fck_specialchar.html +0 -121
- data/public/fckeditor/editor/dialog/fck_spellerpages.html +0 -70
- data/public/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html +0 -0
- data/public/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js +0 -87
- data/public/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html +0 -153
- data/public/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +0 -148
- data/public/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +0 -199
- data/public/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +0 -181
- data/public/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +0 -461
- data/public/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html +0 -71
- data/public/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +0 -49
- data/public/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js +0 -272
- data/public/fckeditor/editor/dialog/fck_table.html +0 -298
- data/public/fckeditor/editor/dialog/fck_tablecell.html +0 -257
- data/public/fckeditor/editor/dialog/fck_template.html +0 -242
- data/public/fckeditor/editor/dialog/fck_textarea.html +0 -94
- data/public/fckeditor/editor/dialog/fck_textfield.html +0 -136
- data/public/fckeditor/editor/dtd/fck_dtd_test.html +0 -41
- data/public/fckeditor/editor/dtd/fck_xhtml10strict.js +0 -116
- data/public/fckeditor/editor/dtd/fck_xhtml10transitional.js +0 -140
- data/public/fckeditor/editor/fckdebug.html +0 -153
- data/public/fckeditor/editor/fckdialog.html +0 -812
- data/public/fckeditor/editor/fckeditor.html +0 -317
- data/public/fckeditor/editor/fckeditor.original.html +0 -424
- data/public/fckeditor/editor/filemanager/browser/default/browser.css +0 -87
- data/public/fckeditor/editor/filemanager/browser/default/browser.html +0 -200
- data/public/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +0 -95
- data/public/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +0 -114
- data/public/fckeditor/editor/filemanager/browser/default/frmfolders.html +0 -198
- data/public/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +0 -169
- data/public/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +0 -68
- data/public/fckeditor/editor/filemanager/browser/default/frmupload.html +0 -115
- data/public/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/Folder.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/Folder32.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/FolderUp.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/ai.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/avi.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/bmp.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/default.icon.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/gif.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/html.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/jpg.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/mdb.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/mp3.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/ppt.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/rdp.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/txt.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/vsd.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/ai.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/avi.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/bmp.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/cs.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/dll.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/doc.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/exe.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/fla.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/gif.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/htm.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/html.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/jpg.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/js.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/mdb.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/mp3.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/pdf.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/png.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/ppt.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/rdp.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/swf.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/swt.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/txt.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/vsd.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/xls.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/xml.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/icons/zip.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/images/spacer.gif +0 -0
- data/public/fckeditor/editor/filemanager/browser/default/js/common.js +0 -88
- data/public/fckeditor/editor/filemanager/browser/default/js/fckxml.js +0 -147
- data/public/fckeditor/editor/images/arrow_ltr.gif +0 -0
- data/public/fckeditor/editor/images/arrow_rtl.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/angel_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/angry_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/broken_heart.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/cake.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/confused_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/cry_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/devil_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/embaressed_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/envelope.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/heart.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/kiss.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/lightbulb.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/omg_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/regular_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/sad_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/shades_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/teeth_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/thumbs_down.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/thumbs_up.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/tounge_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif +0 -0
- data/public/fckeditor/editor/images/smiley/msn/wink_smile.gif +0 -0
- data/public/fckeditor/editor/images/spacer.gif +0 -0
- data/public/fckeditor/editor/js/fckadobeair.js +0 -176
- data/public/fckeditor/editor/js/fckeditorcode_gecko.js +0 -108
- data/public/fckeditor/editor/js/fckeditorcode_ie.js +0 -109
- data/public/fckeditor/editor/lang/_translationstatus.txt +0 -78
- data/public/fckeditor/editor/lang/af.js +0 -526
- data/public/fckeditor/editor/lang/ar.js +0 -526
- data/public/fckeditor/editor/lang/bg.js +0 -526
- data/public/fckeditor/editor/lang/bn.js +0 -526
- data/public/fckeditor/editor/lang/bs.js +0 -526
- data/public/fckeditor/editor/lang/ca.js +0 -526
- data/public/fckeditor/editor/lang/cs.js +0 -526
- data/public/fckeditor/editor/lang/da.js +0 -526
- data/public/fckeditor/editor/lang/de.js +0 -526
- data/public/fckeditor/editor/lang/el.js +0 -526
- data/public/fckeditor/editor/lang/en-au.js +0 -526
- data/public/fckeditor/editor/lang/en-ca.js +0 -526
- data/public/fckeditor/editor/lang/en-uk.js +0 -526
- data/public/fckeditor/editor/lang/en.js +0 -526
- data/public/fckeditor/editor/lang/eo.js +0 -526
- data/public/fckeditor/editor/lang/es.js +0 -526
- data/public/fckeditor/editor/lang/et.js +0 -526
- data/public/fckeditor/editor/lang/eu.js +0 -527
- data/public/fckeditor/editor/lang/fa.js +0 -526
- data/public/fckeditor/editor/lang/fi.js +0 -526
- data/public/fckeditor/editor/lang/fo.js +0 -526
- data/public/fckeditor/editor/lang/fr-ca.js +0 -526
- data/public/fckeditor/editor/lang/fr.js +0 -526
- data/public/fckeditor/editor/lang/gl.js +0 -526
- data/public/fckeditor/editor/lang/gu.js +0 -526
- data/public/fckeditor/editor/lang/he.js +0 -526
- data/public/fckeditor/editor/lang/hi.js +0 -526
- data/public/fckeditor/editor/lang/hr.js +0 -526
- data/public/fckeditor/editor/lang/hu.js +0 -526
- data/public/fckeditor/editor/lang/it.js +0 -526
- data/public/fckeditor/editor/lang/ja.js +0 -526
- data/public/fckeditor/editor/lang/km.js +0 -526
- data/public/fckeditor/editor/lang/ko.js +0 -526
- data/public/fckeditor/editor/lang/lt.js +0 -526
- data/public/fckeditor/editor/lang/lv.js +0 -526
- data/public/fckeditor/editor/lang/mn.js +0 -526
- data/public/fckeditor/editor/lang/ms.js +0 -526
- data/public/fckeditor/editor/lang/nb.js +0 -526
- data/public/fckeditor/editor/lang/nl.js +0 -526
- data/public/fckeditor/editor/lang/no.js +0 -526
- data/public/fckeditor/editor/lang/pl.js +0 -526
- data/public/fckeditor/editor/lang/pt-br.js +0 -526
- data/public/fckeditor/editor/lang/pt.js +0 -526
- data/public/fckeditor/editor/lang/ro.js +0 -526
- data/public/fckeditor/editor/lang/ru.js +0 -526
- data/public/fckeditor/editor/lang/sk.js +0 -526
- data/public/fckeditor/editor/lang/sl.js +0 -526
- data/public/fckeditor/editor/lang/sr-latn.js +0 -526
- data/public/fckeditor/editor/lang/sr.js +0 -526
- data/public/fckeditor/editor/lang/sv.js +0 -526
- data/public/fckeditor/editor/lang/th.js +0 -526
- data/public/fckeditor/editor/lang/tr.js +0 -526
- data/public/fckeditor/editor/lang/uk.js +0 -526
- data/public/fckeditor/editor/lang/vi.js +0 -526
- data/public/fckeditor/editor/lang/zh-cn.js +0 -526
- data/public/fckeditor/editor/lang/zh.js +0 -526
- data/public/fckeditor/editor/plugins/autogrow/fckplugin.js +0 -99
- data/public/fckeditor/editor/plugins/bbcode/_sample/sample.config.js +0 -26
- data/public/fckeditor/editor/plugins/bbcode/_sample/sample.html +0 -67
- data/public/fckeditor/editor/plugins/bbcode/fckplugin.js +0 -123
- data/public/fckeditor/editor/plugins/dragresizetable/fckplugin.js +0 -524
- data/public/fckeditor/editor/plugins/placeholder/fck_placeholder.html +0 -105
- data/public/fckeditor/editor/plugins/placeholder/fckplugin.js +0 -187
- data/public/fckeditor/editor/plugins/placeholder/lang/de.js +0 -27
- data/public/fckeditor/editor/plugins/placeholder/lang/en.js +0 -27
- data/public/fckeditor/editor/plugins/placeholder/lang/es.js +0 -27
- data/public/fckeditor/editor/plugins/placeholder/lang/fr.js +0 -27
- data/public/fckeditor/editor/plugins/placeholder/lang/it.js +0 -27
- data/public/fckeditor/editor/plugins/placeholder/lang/pl.js +0 -27
- data/public/fckeditor/editor/plugins/placeholder/placeholder.gif +0 -0
- data/public/fckeditor/editor/plugins/simplecommands/fckplugin.js +0 -29
- data/public/fckeditor/editor/plugins/tablecommands/fckplugin.js +0 -33
- data/public/fckeditor/editor/skins/_fckviewstrips.html +0 -121
- data/public/fckeditor/editor/skins/default/fck_dialog.css +0 -402
- data/public/fckeditor/editor/skins/default/fck_dialog_ie6.js +0 -110
- data/public/fckeditor/editor/skins/default/fck_editor.css +0 -464
- data/public/fckeditor/editor/skins/default/fck_strip.gif +0 -0
- data/public/fckeditor/editor/skins/default/images/sprites.gif +0 -0
- data/public/fckeditor/editor/skins/default/images/sprites.png +0 -0
- data/public/fckeditor/editor/skins/default/images/toolbar.arrowright.gif +0 -0
- data/public/fckeditor/editor/skins/default/images/toolbar.buttonarrow.gif +0 -0
- data/public/fckeditor/editor/skins/default/images/toolbar.collapse.gif +0 -0
- data/public/fckeditor/editor/skins/default/images/toolbar.end.gif +0 -0
- data/public/fckeditor/editor/skins/default/images/toolbar.expand.gif +0 -0
- data/public/fckeditor/editor/skins/default/images/toolbar.separator.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/fck_dialog.css +0 -402
- data/public/fckeditor/editor/skins/office2003/fck_dialog_ie6.js +0 -110
- data/public/fckeditor/editor/skins/office2003/fck_editor.css +0 -476
- data/public/fckeditor/editor/skins/office2003/fck_strip.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/images/dialog.sides.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/images/dialog.sides.png +0 -0
- data/public/fckeditor/editor/skins/office2003/images/dialog.sides.rtl.png +0 -0
- data/public/fckeditor/editor/skins/office2003/images/sprites.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/images/sprites.png +0 -0
- data/public/fckeditor/editor/skins/office2003/images/toolbar.arrowright.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/images/toolbar.bg.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/images/toolbar.buttonarrow.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/images/toolbar.collapse.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/images/toolbar.end.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/images/toolbar.expand.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/images/toolbar.separator.gif +0 -0
- data/public/fckeditor/editor/skins/office2003/images/toolbar.start.gif +0 -0
- data/public/fckeditor/editor/skins/silver/fck_dialog.css +0 -402
- data/public/fckeditor/editor/skins/silver/fck_dialog_ie6.js +0 -110
- data/public/fckeditor/editor/skins/silver/fck_editor.css +0 -473
- data/public/fckeditor/editor/skins/silver/fck_strip.gif +0 -0
- data/public/fckeditor/editor/skins/silver/images/dialog.sides.gif +0 -0
- data/public/fckeditor/editor/skins/silver/images/dialog.sides.png +0 -0
- data/public/fckeditor/editor/skins/silver/images/dialog.sides.rtl.png +0 -0
- data/public/fckeditor/editor/skins/silver/images/sprites.gif +0 -0
- data/public/fckeditor/editor/skins/silver/images/sprites.png +0 -0
- data/public/fckeditor/editor/skins/silver/images/toolbar.arrowright.gif +0 -0
- data/public/fckeditor/editor/skins/silver/images/toolbar.buttonarrow.gif +0 -0
- data/public/fckeditor/editor/skins/silver/images/toolbar.buttonbg.gif +0 -0
- data/public/fckeditor/editor/skins/silver/images/toolbar.collapse.gif +0 -0
- data/public/fckeditor/editor/skins/silver/images/toolbar.end.gif +0 -0
- data/public/fckeditor/editor/skins/silver/images/toolbar.expand.gif +0 -0
- data/public/fckeditor/editor/skins/silver/images/toolbar.separator.gif +0 -0
- data/public/fckeditor/fckconfig.js +0 -364
- data/public/fckeditor/fckdebug.html +0 -153
- data/public/fckeditor/fckdialog.html +0 -812
- data/public/fckeditor/fckeditor.html +0 -317
- data/public/fckeditor/fckeditor.js +0 -328
- data/public/fckeditor/fckeditor.original.html +0 -424
- data/public/fckeditor/fckpackager.xml +0 -262
- data/public/fckeditor/fckstyles.xml +0 -111
- data/public/fckeditor/fcktemplates.xml +0 -103
- data/public/javascripts/cms/editor.js +0 -56
@@ -0,0 +1,201 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
5
|
+
<title></title>
|
6
|
+
<link rel="stylesheet" type="text/css" href="files/stylesheets/syntax.css" />
|
7
|
+
<script type="text/javascript" src="files/javascripts/code_highlighter.js"></script>
|
8
|
+
<script type="text/javascript" src="files/javascripts/highlighters.js"></script>
|
9
|
+
<style type="text/css">
|
10
|
+
body {
|
11
|
+
background: #FFFFFF url(images/bg.png) repeat-x scroll 0 0;
|
12
|
+
font-family: "Trebuchet MS", Helvetica, Verdana, Arial, sans-serif;
|
13
|
+
margin: 0;
|
14
|
+
padding: 0;
|
15
|
+
}
|
16
|
+
|
17
|
+
#page {
|
18
|
+
margin: 0 auto;
|
19
|
+
text-align: left;
|
20
|
+
width: 1000px;
|
21
|
+
}
|
22
|
+
|
23
|
+
#header {
|
24
|
+
height: 110px;
|
25
|
+
}
|
26
|
+
|
27
|
+
div.top_cap {
|
28
|
+
background: transparent url(images/top_cap.png) no-repeat scroll 0 0;
|
29
|
+
height: 10px;
|
30
|
+
}
|
31
|
+
|
32
|
+
#contentwrap {
|
33
|
+
background: transparent url(images/dot.png) repeat scroll 0 0;
|
34
|
+
float: left;
|
35
|
+
width: 1000px;
|
36
|
+
}
|
37
|
+
|
38
|
+
div.bottom_cap {
|
39
|
+
background: transparent url(images/bottom_cap.png) no-repeat scroll 0 0;
|
40
|
+
height: 9px;
|
41
|
+
}
|
42
|
+
|
43
|
+
div.top_cap_content {
|
44
|
+
background: transparent url(images/top_cap_content.png) no-repeat scroll 0 0;
|
45
|
+
height: 5px;
|
46
|
+
}
|
47
|
+
|
48
|
+
#content {
|
49
|
+
background-color: #FFFFFF;
|
50
|
+
margin: 0 5px;
|
51
|
+
padding: 0 10px;
|
52
|
+
}
|
53
|
+
|
54
|
+
div.title {
|
55
|
+
padding: 20px;
|
56
|
+
}
|
57
|
+
|
58
|
+
div.title h1 {
|
59
|
+
border-bottom: 3px solid #505358;
|
60
|
+
color: #FFFFFF;
|
61
|
+
font-size: 24pt;
|
62
|
+
font-weight: normal;
|
63
|
+
line-height: 1;
|
64
|
+
margin: 0 0 10px;
|
65
|
+
padding-bottom: 10px;
|
66
|
+
}
|
67
|
+
|
68
|
+
td.sidebar {
|
69
|
+
font-size: 8pt;
|
70
|
+
width: 165px;
|
71
|
+
padding: 5px;
|
72
|
+
}
|
73
|
+
|
74
|
+
td.sidebar ol {
|
75
|
+
margin-left: 20px;
|
76
|
+
padding: 0;
|
77
|
+
line-height: 1.5;
|
78
|
+
}
|
79
|
+
|
80
|
+
td.sidebar ol li {
|
81
|
+
margin: 0;
|
82
|
+
padding: 0;
|
83
|
+
}
|
84
|
+
|
85
|
+
td.sidebar ol li ul {
|
86
|
+
list-style-type: none;
|
87
|
+
padding-left: 10px;
|
88
|
+
}
|
89
|
+
|
90
|
+
td.guides {
|
91
|
+
font-size: 10pt;
|
92
|
+
width: 800px;
|
93
|
+
padding: 10px;
|
94
|
+
}
|
95
|
+
|
96
|
+
.code_container {
|
97
|
+
padding: 10px;
|
98
|
+
background: #eee;
|
99
|
+
border: 1px solid #ccc;
|
100
|
+
overflow: auto;
|
101
|
+
width: 760px;
|
102
|
+
}
|
103
|
+
|
104
|
+
pre, code {
|
105
|
+
overflow: auto;
|
106
|
+
white-space:pre;
|
107
|
+
}
|
108
|
+
.note {
|
109
|
+
-moz-background-clip:border;
|
110
|
+
-moz-background-inline-policy:continuous;
|
111
|
+
-moz-background-origin:padding;
|
112
|
+
background:#FFF9D8 url(../images/tab_note.gif) no-repeat scroll left top;
|
113
|
+
border:medium none;
|
114
|
+
margin:0.25em 0 1.5em;
|
115
|
+
padding:1em 1em 0.25em 48px;
|
116
|
+
}
|
117
|
+
</style>
|
118
|
+
</head>
|
119
|
+
<body>
|
120
|
+
<div id="page">
|
121
|
+
<div id="header">
|
122
|
+
<a href="index.html"><img style="border:0px" src="images/browsercms_logo.png" alt="BrowserCMS"/></a>
|
123
|
+
</div>
|
124
|
+
<div id="main">
|
125
|
+
<div class="top_cap"></div>
|
126
|
+
<div id="contentwrap">
|
127
|
+
<div class="title">
|
128
|
+
<h1></h1>
|
129
|
+
</div>
|
130
|
+
<div class="top_cap_content"></div>
|
131
|
+
<div id="content">
|
132
|
+
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
133
|
+
<tr>
|
134
|
+
<td class="sidebar" valign="top">
|
135
|
+
<div id="subCol">
|
136
|
+
<h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />Chapters</h3>
|
137
|
+
<ol class="chapters">
|
138
|
+
</ol></div>
|
139
|
+
</td>
|
140
|
+
<td class="guides">
|
141
|
+
|
142
|
+
<h2>Using <span class="caps">CMS</span> Authentication</h2>
|
143
|
+
<p>When you create public controllers, you may want to take advantage of the <span class="caps">CMS</span> authentication system. Create an action that
|
144
|
+
looks like this:</p>
|
145
|
+
<div class="code_container"><code class="ruby">class MyNewController < ApplicationController
|
146
|
+
|
147
|
+
# This adds methods to your controller to work with the authenticated user.
|
148
|
+
include Cms::Authentication::Controller
|
149
|
+
|
150
|
+
def do_something_interesting
|
151
|
+
# The current_user method looks up the user based on either a cookie, or session variable.
|
152
|
+
user = current_user
|
153
|
+
|
154
|
+
if user.guest?
|
155
|
+
redirect_to "/system/access-denied"
|
156
|
+
else
|
157
|
+
redirect_to "/my_target/page"
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end</code></div>
|
161
|
+
<p>The current_user method is also available in Portlets (maybe), as well as in the view files for both portlets and templates.</p>
|
162
|
+
<h3>Understanding Guest users
|
163
|
+
Many visitors to a <span class="caps">CMS</span> site will not be logged in. These users are considered to be members of a special group, called ‘Guest’. This
|
164
|
+
group allows staff to set permissions for denying entry to specific sections. When you call the following:</h3>
|
165
|
+
<div class="code_container"><code class="ruby">user = current_user</code></div>
|
166
|
+
<p>if there the user is not logged in, a
|
167
|
+
dirty_workaround_for_notextile_2
|
168
|
+
object will be returned. This user has all the permissions of the guest group, which are
|
169
|
+
usually limited to viewing public sections.</p>
|
170
|
+
<h2>Working with the Content <span class="caps">API</span>
|
171
|
+
One of the central features that the content <span class="caps">API</span> adds to models is versioning and publishing. Each content block can either be published or in draft. The data for a block is split between two tables, the primary table and it’s version table. The primary table
|
172
|
+
stores the ‘live’ version of a block, typically the last ‘Published’ version of a block. The versions table stores all other versions, including future edits which are unpublished.</h2>
|
173
|
+
<h3>Differences between ActiveRecord and Content <span class="caps">API</span>
|
174
|
+
This can cause some confusion when using basic ActiveRecord operations, where you might not get what you expect. For example, suppose we create an Event Block</h3>
|
175
|
+
<div class="code_container"><code class="ruby">class Event < ActiveRecord::Base
|
176
|
+
acts_as_content_block
|
177
|
+
end
|
178
|
+
|
179
|
+
event = Event.create!(:name=>"Event #1", :save_and_publish=>true)
|
180
|
+
event.name = "Event #2"
|
181
|
+
event.save!
|
182
|
+
|
183
|
+
assert_equals "Event #2", Event.find(event.id) # This is false, and will fail.</code></div>
|
184
|
+
<p>In this case, “Event #2” is a draft, stored in the ‘events_versions’ table. To create and publish the event, you can do this:</p>
|
185
|
+
<div class="code_container"><code class="ruby">event = Event.create!(:name=>"Event #1", :save_and_publish=>true)
|
186
|
+
event.name = "Event #2"
|
187
|
+
event.publish! # This will both publish and save the record.
|
188
|
+
|
189
|
+
assert_equals "Event #2", Event.find(event.id) # This is now true.</code></div>
|
190
|
+
</td>
|
191
|
+
</tr>
|
192
|
+
</table>
|
193
|
+
</div>
|
194
|
+
</div>
|
195
|
+
<br clear="all"/>
|
196
|
+
<div class="bottom_cap"></div>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
</body>
|
200
|
+
</html>
|
201
|
+
|
@@ -105,7 +105,15 @@
|
|
105
105
|
overflow: auto;
|
106
106
|
white-space:pre;
|
107
107
|
}
|
108
|
-
|
108
|
+
.note {
|
109
|
+
-moz-background-clip:border;
|
110
|
+
-moz-background-inline-policy:continuous;
|
111
|
+
-moz-background-origin:padding;
|
112
|
+
background:#FFF9D8 url(../images/tab_note.gif) no-repeat scroll left top;
|
113
|
+
border:medium none;
|
114
|
+
margin:0.25em 0 1.5em;
|
115
|
+
padding:1em 1em 0.25em 48px;
|
116
|
+
}
|
109
117
|
</style>
|
110
118
|
</head>
|
111
119
|
<body>
|
@@ -105,7 +105,15 @@
|
|
105
105
|
overflow: auto;
|
106
106
|
white-space:pre;
|
107
107
|
}
|
108
|
-
|
108
|
+
.note {
|
109
|
+
-moz-background-clip:border;
|
110
|
+
-moz-background-inline-policy:continuous;
|
111
|
+
-moz-background-origin:padding;
|
112
|
+
background:#FFF9D8 url(../images/tab_note.gif) no-repeat scroll left top;
|
113
|
+
border:medium none;
|
114
|
+
margin:0.25em 0 1.5em;
|
115
|
+
padding:1em 1em 0.25em 48px;
|
116
|
+
}
|
109
117
|
</style>
|
110
118
|
</head>
|
111
119
|
<body>
|
@@ -131,54 +139,88 @@
|
|
131
139
|
</td>
|
132
140
|
<td class="guides">
|
133
141
|
|
134
|
-
<h2>
|
135
|
-
<p>
|
136
|
-
|
137
|
-
<
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
142
|
+
<h2>Creating your own modules</h2>
|
143
|
+
<p>Creating your own modules is a useful way to expand the functionality of BrowserCMS via gems.</p>
|
144
|
+
<h3>Getting Started</h3>
|
145
|
+
<p>Run the following command to generate a basic BrowserCMS application that is ready to turn into a module.</p>
|
146
|
+
<p><code>bcms bcms_[module name] -m module</code></p>
|
147
|
+
<p>The module template used to create this application will create the following files:</p>
|
148
|
+
<ul>
|
149
|
+
<li><code>.gitignore</code></li>
|
150
|
+
</ul>
|
151
|
+
<blockquote>
|
152
|
+
<p>This file prevents files you almost certainly will not want to be added to git to be added to git.</p>
|
153
|
+
</blockquote>
|
154
|
+
<ul>
|
155
|
+
<li><code>public/bcms/[module name]/README</code></li>
|
156
|
+
</ul>
|
157
|
+
<blockquote>
|
158
|
+
<p>Explains what this directory is for. It can safely be deleted.</p>
|
159
|
+
</blockquote>
|
160
|
+
<ul>
|
161
|
+
<li><code>bcms_[module name].gemspec</code></li>
|
162
|
+
</ul>
|
163
|
+
<blockquote>
|
164
|
+
<p>Creates a gemspec file in case you want to manage the gemspec by hand.</p>
|
165
|
+
</blockquote>
|
166
|
+
<ul>
|
167
|
+
<li><code>config/initializers/init_module.rb</code></li>
|
168
|
+
</ul>
|
169
|
+
<blockquote>
|
170
|
+
<p>Requires the following file.</p>
|
171
|
+
</blockquote>
|
172
|
+
<ul>
|
173
|
+
<li><code>lib/bcms_[module name].rb</code></li>
|
174
|
+
</ul>
|
175
|
+
<blockquote>
|
176
|
+
<p>Requires the following file.</p>
|
177
|
+
</blockquote>
|
178
|
+
<ul>
|
179
|
+
<li><code>lib/bcms_[module name]/routes.rb</code></li>
|
180
|
+
</ul>
|
181
|
+
<blockquote>
|
182
|
+
<p>Has boilerplate code ready in case you have specific routes the application will need to have available. For example, if your module has content blocks that will be managed by the <span class="caps">CMS</span> administrative interface, routes for the controllers handling this management will need to be added here.</p>
|
183
|
+
</blockquote>
|
184
|
+
<ul>
|
185
|
+
<li><code>rails/init.rb</code></li>
|
186
|
+
</ul>
|
187
|
+
<blockquote>
|
188
|
+
<p>Adds the gem root to the rails paths, adds all migration files to the list of files that will be copied into any application using the module when <code>script/generate browser_cms</code> is run, and adds all files in <code>public/bcms/bcms_[module name]/</code> to the list of files that will be copied into any application using the module when <code>script/generate browser_cms</code> is run.</p>
|
189
|
+
</blockquote>
|
190
|
+
<ul>
|
191
|
+
<li><code>LICENSE.txt</code></li>
|
192
|
+
</ul>
|
193
|
+
<blockquote>
|
194
|
+
<p><span class="caps">GNU</span> Lesser General Public License</p>
|
195
|
+
</blockquote>
|
196
|
+
<ul>
|
197
|
+
<li><code>COPYRIGHT.txt</code></li>
|
198
|
+
</ul>
|
199
|
+
<blockquote>
|
200
|
+
<p>BrowserMedia’s copyright text.</p>
|
201
|
+
</blockquote>
|
202
|
+
<ul>
|
203
|
+
<li><code>GPL.txt</code></li>
|
204
|
+
</ul>
|
205
|
+
<blockquote>
|
206
|
+
<p><span class="caps">GNU</span> General Public License</p>
|
207
|
+
</blockquote>
|
208
|
+
<p>Note: the module template was developed primarily for BrowserMedia in-house use. Therefore the license, copywrite, and gemspec files all reflect our organization. Please edit and/or remove these files to fit your needs.</p>
|
209
|
+
<h3>Conventions When Building Your Module</h3>
|
210
|
+
<p>Build your module as if you were building a rails application that does whatever you want.</p>
|
211
|
+
<p>That said, there are some conventions that tend to make things easier.</p>
|
212
|
+
<p>First, place any files that are used as configuration files for public assects (for example, the fckeditor) in the <code>public/bcms_config/[module_name]</code> directory and have the gem only copy them if they are not already there. For example you can add code like the following to the <code>rails/init.rb</code> file.</p>
|
213
|
+
<div class="code_container"><code class="ruby">unless File.exists?("#{RAILS_ROOT}/public/bcms_config/fckeditor/fckstyles.xml")
|
214
|
+
Cms.add_generator_paths gem_root, "public/bcms_config/fckeditor/fckstyles.xml"
|
152
215
|
end</code></div>
|
153
|
-
<p>
|
154
|
-
<h3>
|
155
|
-
|
156
|
-
|
157
|
-
<
|
158
|
-
<p>
|
159
|
-
|
160
|
-
|
161
|
-
usually limited to viewing public sections.</p>
|
162
|
-
<h2>Working with the Content <span class="caps">API</span>
|
163
|
-
One of the central features that the content <span class="caps">API</span> adds to models is versioning and publishing. Each content block can either be published or in draft. The data for a block is split between two tables, the primary table and it’s version table. The primary table
|
164
|
-
stores the ‘live’ version of a block, typically the last ‘Published’ version of a block. The versions table stores all other versions, including future edits which are unpublished.</h2>
|
165
|
-
<h3>Differences between ActiveRecord and Content <span class="caps">API</span>
|
166
|
-
This can cause some confusion when using basic ActiveRecord operations, where you might not get what you expect. For example, suppose we create an Event Block</h3>
|
167
|
-
<div class="code_container"><code class="ruby">class Event < ActiveRecord::Base
|
168
|
-
acts_as_content_block
|
169
|
-
end
|
170
|
-
|
171
|
-
event = Event.create!(:name=>"Event #1", :save_and_publish=>true)
|
172
|
-
event.name = "Event #2"
|
173
|
-
event.save!
|
174
|
-
|
175
|
-
assert_equals "Event #2", Event.find(event.id) # This is false, and will fail.</code></div>
|
176
|
-
<p>In this case, “Event #2” is a draft, stored in the ‘events_versions’ table. To create and publish the event, you can do this:</p>
|
177
|
-
<div class="code_container"><code class="ruby">event = Event.create!(:name=>"Event #1", :save_and_publish=>true)
|
178
|
-
event.name = "Event #2"
|
179
|
-
event.publish! # This will both publish and save the record.
|
180
|
-
|
181
|
-
assert_equals "Event #2", Event.find(event.id) # This is now true.</code></div>
|
216
|
+
<p>This will make the required configuration file available to the fckeditor, but it won’t overwrite it (or even ask you if you want to overwrite it) every time you run <code>script/generate browser_cms</code> for your application.</p>
|
217
|
+
<h3>Testing Your Gem</h3>
|
218
|
+
<p>We strongly encourage the creation of unit, functional, and integration tests as part of your module.</p>
|
219
|
+
<p>We also suggest that you test your gem against a BrowserCMS application. To do this, first run</p>
|
220
|
+
<p><code>bcms module_tester -m demo</code></p>
|
221
|
+
<p>wherever (I use <code>/var/tmp</code>). Edit the <code>config/environment.rb</code> file to include the line</p>
|
222
|
+
<p><code>gem.config 'bcms_[module name]'</code></p>
|
223
|
+
<p>then run the app locally and make sure your module works as expected.</p>
|
182
224
|
</td>
|
183
225
|
</tr>
|
184
226
|
</table>
|
@@ -0,0 +1,506 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
5
|
+
<title>BrowserCMS Designer Guide</title>
|
6
|
+
<link rel="stylesheet" type="text/css" href="files/stylesheets/syntax.css" />
|
7
|
+
<script type="text/javascript" src="files/javascripts/code_highlighter.js"></script>
|
8
|
+
<script type="text/javascript" src="files/javascripts/highlighters.js"></script>
|
9
|
+
<style type="text/css">
|
10
|
+
body {
|
11
|
+
background: #FFFFFF url(images/bg.png) repeat-x scroll 0 0;
|
12
|
+
font-family: "Trebuchet MS", Helvetica, Verdana, Arial, sans-serif;
|
13
|
+
margin: 0;
|
14
|
+
padding: 0;
|
15
|
+
}
|
16
|
+
|
17
|
+
#page {
|
18
|
+
margin: 0 auto;
|
19
|
+
text-align: left;
|
20
|
+
width: 1000px;
|
21
|
+
}
|
22
|
+
|
23
|
+
#header {
|
24
|
+
height: 110px;
|
25
|
+
}
|
26
|
+
|
27
|
+
div.top_cap {
|
28
|
+
background: transparent url(images/top_cap.png) no-repeat scroll 0 0;
|
29
|
+
height: 10px;
|
30
|
+
}
|
31
|
+
|
32
|
+
#contentwrap {
|
33
|
+
background: transparent url(images/dot.png) repeat scroll 0 0;
|
34
|
+
float: left;
|
35
|
+
width: 1000px;
|
36
|
+
}
|
37
|
+
|
38
|
+
div.bottom_cap {
|
39
|
+
background: transparent url(images/bottom_cap.png) no-repeat scroll 0 0;
|
40
|
+
height: 9px;
|
41
|
+
}
|
42
|
+
|
43
|
+
div.top_cap_content {
|
44
|
+
background: transparent url(images/top_cap_content.png) no-repeat scroll 0 0;
|
45
|
+
height: 5px;
|
46
|
+
}
|
47
|
+
|
48
|
+
#content {
|
49
|
+
background-color: #FFFFFF;
|
50
|
+
margin: 0 5px;
|
51
|
+
padding: 0 10px;
|
52
|
+
}
|
53
|
+
|
54
|
+
div.title {
|
55
|
+
padding: 20px;
|
56
|
+
}
|
57
|
+
|
58
|
+
div.title h1 {
|
59
|
+
border-bottom: 3px solid #505358;
|
60
|
+
color: #FFFFFF;
|
61
|
+
font-size: 24pt;
|
62
|
+
font-weight: normal;
|
63
|
+
line-height: 1;
|
64
|
+
margin: 0 0 10px;
|
65
|
+
padding-bottom: 10px;
|
66
|
+
}
|
67
|
+
|
68
|
+
td.sidebar {
|
69
|
+
font-size: 8pt;
|
70
|
+
width: 165px;
|
71
|
+
padding: 5px;
|
72
|
+
}
|
73
|
+
|
74
|
+
td.sidebar ol {
|
75
|
+
margin-left: 20px;
|
76
|
+
padding: 0;
|
77
|
+
line-height: 1.5;
|
78
|
+
}
|
79
|
+
|
80
|
+
td.sidebar ol li {
|
81
|
+
margin: 0;
|
82
|
+
padding: 0;
|
83
|
+
}
|
84
|
+
|
85
|
+
td.sidebar ol li ul {
|
86
|
+
list-style-type: none;
|
87
|
+
padding-left: 10px;
|
88
|
+
}
|
89
|
+
|
90
|
+
td.guides {
|
91
|
+
font-size: 10pt;
|
92
|
+
width: 800px;
|
93
|
+
padding: 10px;
|
94
|
+
}
|
95
|
+
|
96
|
+
.code_container {
|
97
|
+
padding: 10px;
|
98
|
+
background: #eee;
|
99
|
+
border: 1px solid #ccc;
|
100
|
+
overflow: auto;
|
101
|
+
width: 760px;
|
102
|
+
}
|
103
|
+
|
104
|
+
pre, code {
|
105
|
+
overflow: auto;
|
106
|
+
white-space:pre;
|
107
|
+
}
|
108
|
+
.note {
|
109
|
+
-moz-background-clip:border;
|
110
|
+
-moz-background-inline-policy:continuous;
|
111
|
+
-moz-background-origin:padding;
|
112
|
+
background:#FFF9D8 url(../images/tab_note.gif) no-repeat scroll left top;
|
113
|
+
border:medium none;
|
114
|
+
margin:0.25em 0 1.5em;
|
115
|
+
padding:1em 1em 0.25em 48px;
|
116
|
+
}
|
117
|
+
</style>
|
118
|
+
</head>
|
119
|
+
<body>
|
120
|
+
<div id="page">
|
121
|
+
<div id="header">
|
122
|
+
<a href="index.html"><img style="border:0px" src="images/browsercms_logo.png" alt="BrowserCMS"/></a>
|
123
|
+
</div>
|
124
|
+
<div id="main">
|
125
|
+
<div class="top_cap"></div>
|
126
|
+
<div id="contentwrap">
|
127
|
+
<div class="title">
|
128
|
+
<h1>BrowserCMS Designer Guide</h1>
|
129
|
+
</div>
|
130
|
+
<div class="top_cap_content"></div>
|
131
|
+
<div id="content">
|
132
|
+
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
133
|
+
<tr>
|
134
|
+
<td class="sidebar" valign="top">
|
135
|
+
<div id="subCol">
|
136
|
+
<h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />Chapters</h3>
|
137
|
+
<ol class="chapters">
|
138
|
+
<li><a href="#introduction">Introduction</a><ul><li><a href="#typical-design-process">Typical Design Process</a></li><li><a href="#design-considerations">Design Considerations</a></li></ul></li><li><a href="#creating-a-page-template">Creating a Page Template</a><ul><li><a href="#files-or-content">Files or Content?</a></li><li><a href="#understanding-containers">Understanding Containers</a></li><li><a href="#adding-a-sidebar-container">Adding A Sidebar Container</a></li></ul></li><li><a href="#tags-quick-reference">Tags Quick Reference</a><ul><li><a href="#required-tags">Required Tags</a></li><li><a href="#container-tag"><tt>container</tt> Tag</a></li><li><a href="#cms-toolbar-tag"><tt>cms_toolbar</tt> Tag</a></li><li><a href="#html-head-tag"><span class="caps">HTML</span> Head Tag</a></li><li><a href="#page-title-tag"><tt>page_title</tt> Tag</a></li><li><a href="#current-page-tag"><tt>current_page</tt> Tag</a></li><li><a href="#render-portlet-tag"><tt>render_portlet</tt> Tag</a></li><li><a href="#render-connectable-tag"><tt>render_connectable</tt> Tag</a></li></ul></li><li><a href="#navigation">Navigation</a><ul><li><a href="#basic-rules-of-menus">Basic Rules of Menus</a></li><li><a href="#using-menus">Using Menus</a></li><li><a href="#how-deep-should-menus-be">How Deep Should Menus Be?</a></li><li><a href="#primary-navigation">Primary Navigation</a></li><li><a href="#sub-navigation">Sub Navigation</a></li><li><a href="#site-maps-and-flyout-menus">Site Maps and Flyout Menus</a></li><li><a href="#using-breadcrumbs">Using Breadcrumbs</a></li></ul></li><li><a href="#using-partials">Using Partials</a><ul></ul></li></ol></div>
|
139
|
+
</td>
|
140
|
+
<td class="guides">
|
141
|
+
<h2>BrowserCMS Designer Guide</h2>
|
142
|
+
<p>This guide covers how to set up templates for BrowserCMS. After reading this guide, you should understand how to:</p>
|
143
|
+
<ul>
|
144
|
+
<li>How to create page templates</li>
|
145
|
+
<li>How to take advantage of dynamic menus</li>
|
146
|
+
<li>How to reuse common bits of html with page partials</li>
|
147
|
+
<li>How to use tags to add dynamic content to templates and partials</li>
|
148
|
+
</ul>
|
149
|
+
<h3 id="introduction">1 Introduction</h3>
|
150
|
+
<p>One of the primary goals of implementing a content management system is to separate Design from Content. This allows designers to provide an attractive design that users can easily apply. A <span class="caps">CMS</span> can be thought of as a ‘Web Page’ factory, where designers can create the template (i.e. the molds) that users without design knowledge can use to stamp out new pages.</p>
|
151
|
+
<p>BrowserCMS supports this concept by the use of page templates. Each page within the site has a single page template that governs it’s layout. Templates are essentially html pages with the editable areas specified. A template can be anything from a basic two column subpage to homepage design with a half dozen separate editable areas. BrowserCMS supports an ‘in-context’ page editor, that allows users to see which areas of the page are editable.</p>
|
152
|
+
<h4 id="typical-design-process">1.1 Typical Design Process</h4>
|
153
|
+
<p>When you are developing a site with BrowserCMS, there are a lot of ways to organize and design the site. One of the goals of the project is to support highly graphical designs that pass through multiple team members hands. As such, the template creation process is optimized to mimic the steps that would work for any web development project, without constraining the design to fit the tool.</p>
|
154
|
+
<p>Here is an example of a web design process to create templates for BrowserCMS.</p>
|
155
|
+
<ol>
|
156
|
+
<li>A designer creates a Photoshop (<span class="caps">PSD</span> or <span class="caps">JPG</span>) which represents the desire final look of a page.</li>
|
157
|
+
<li>A developer converts the <span class="caps">PSD</span> into a static <span class="caps">HTML</span> file which implements that design.</li>
|
158
|
+
<li>The developer can take this html file, add it to the <span class="caps">CMS</span> as a page template just by renaming it from .htm to .html.erb</li>
|
159
|
+
<li>The developer can add a few helper methods to the template replacing the ‘static’ text to make it editable through the <span class="caps">CMS</span> interface.</li>
|
160
|
+
</ol>
|
161
|
+
<p>There are few additional considerations we will get into, but this basic process allows developers to work in a medium they are well trained in (<span class="caps">HTML</span> production) with minimal training on BrowserCMS itself. For the purposes of this document, assume there are three separate and distinct roles around creating a <span class="caps">CMS</span> site.</p>
|
162
|
+
<ol>
|
163
|
+
<li>Designer – A person in charge of defining the overall look and feel of the pages within a site. Produces a <span class="caps">PSD</span>.</li>
|
164
|
+
<li>Developer – A person in charge of converting the ideal look (<span class="caps">PSD</span>) into an <span class="caps">HTML</span> page and ultimately a <span class="caps">CMS</span> template.</li>
|
165
|
+
<li>Programmer – A person in charge of coding content types (blocks) and dynamic behavior (portlets).</li>
|
166
|
+
</ol>
|
167
|
+
<h4 id="design-considerations">1.2 Design Considerations</h4>
|
168
|
+
<p>There are some considerations that designers/developers should take into account if they want to get the maximum benefit from working w/ BrowserCMS. Here’s a quick list:</p>
|
169
|
+
<p>1. BrowserCMS can render menus (one or more levels deep) automatically from the site architecture. Developers should understand how menu code is generated when styling them, which happens in a <a href="http://www.csszengarden.com"><span class="caps">CSS</span> Zen Garden</a> style.
|
170
|
+
2. The Site Map is how pages and sections are organized. Developers should understand how this will affect auto-generated menus.
|
171
|
+
3. In addition to static content, the look of some areas of pages will be rendered dynamically by portlets and blocks. Developers may need to work with programmers to determine whether view code will be dynamically generated via portlets or statically placed by users.</p>
|
172
|
+
<h3 id="creating-a-page-template">2 Creating a Page Template</h3>
|
173
|
+
<p>There are two ways to create a template, as a file within the project (much like how Rails layouts work) or as content in the database. Let’s start with creating a file based template. Assuming we are starting from a new <em>blank</em> BrowserCMS project, lets create a template that will represent our subpages. Run the following from the command line:</p>
|
174
|
+
<div class="code_container"><code class="html">$ script/generate template subpage</code></div>
|
175
|
+
<p>This generates a file called <tt>app/views/layouts/templates/subpage.html.erb</tt>. For experience Rails developers, you will note that within the traditional <tt>layouts</tt> directory we have create a subdirectory called <tt>templates</tt>. All files placed within this directory are available as page templates with the UI. Open up this template file and it should look like this:</p>
|
176
|
+
<div class="code_container"><code class="html"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
177
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
178
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
179
|
+
<head>
|
180
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
181
|
+
<title><%= page_title %></title>
|
182
|
+
<%= yield :html_head %>
|
183
|
+
</head>
|
184
|
+
<body style="margin: 0; padding: 0; text-align: center;">
|
185
|
+
<%= cms_toolbar %>
|
186
|
+
<div id="wrapper" style="width: 700px; margin: 0 auto; text-align: left; padding: 30px">
|
187
|
+
Breadcrumbs: <%= render_breadcrumbs %>
|
188
|
+
Main Menu: <%= render_menu %>
|
189
|
+
<h1><%= page_title %></h1>
|
190
|
+
<%= container :main %>
|
191
|
+
</div>
|
192
|
+
</body>
|
193
|
+
</html></code></div>
|
194
|
+
<p>This is a bare bones <span class="caps">XHTML</span> template with one editable area (i.e. One Column). It has no <span class="caps">CSS</span> stylesheets or javascript. It’s about the simplest possible template we can have to create a renderable page in BrowserCMS.</p>
|
195
|
+
<h4 id="files-or-content">2.1 Files or Content?</h4>
|
196
|
+
<p>Since templates can stored as either files or database content (or a combination of both), site designers will need to decide which path they want to use. Ultimately, the decision is based on the question of <strong>who should be able to modify templates</strong>? On projects where site users have some <span class="caps">HTML</span> knowledge and want to be to update templates via the <span class="caps">CMS</span> UI, database templates may be appropriate. On other projects, where design is intended to more tightly controlled, file templates might be appropriate.</p>
|
197
|
+
<p>It’s also possible to start out using file templates for speed of development, and then migrate the content of the templates into the database before launch.</p>
|
198
|
+
<h4 id="understanding-containers">2.2 Understanding Containers</h4>
|
199
|
+
<p>There are a bits of ruby code (helpers) that our basic template has, but let’s focus on the <tt>container</tt> helper. Open up the <span class="caps">CMS</span> UI and go to <tt>/cms/sitemap</tt> and Add a New Page. Name it ‘About Us’, and select ‘Subpage’ from the ‘Template’ dropdown to use this new template. Click Save. You should see a mostly white page. Click the ‘Turn On’ button in the upper right to enable the editor, and you should see a single grey box. This box is the <tt>container</tt> we defined in our template. Users can insert new or existing content into pages, and the containers determine where they go. Add some Text content to the page in this container.</p>
|
200
|
+
<div class='note'><p>Container are placeholders for content. When you have two pages that use the same template, they do not share the content. Putting some Text into the <tt>:main</tt> container of Page A doesn’t mean it will also appear on Page B just because that page also has a <tt>:main</tt> container.</p></div>
|
201
|
+
<h4 id="adding-a-sidebar-container">2.3 Adding A Sidebar Container</h4>
|
202
|
+
<p>Let’s alter our template to add a second column (i.e. Sidebar). Modify the <tt>subpage.html</tt> to look like the following:</p>
|
203
|
+
<div class="code_container"><code class="html"><head>
|
204
|
+
<title><%= page_title %> | Our Fancy Site</title>
|
205
|
+
<style>
|
206
|
+
body, html { margin: 0; padding: 0; text-align: center; }
|
207
|
+
#wrapper { width: 700px; margin: 0 auto; text-align: left; padding: 30px }
|
208
|
+
#main { float: left; width: 500px; }
|
209
|
+
#sidebar { float: right; padding: 0 30px 0 0; width: 150px;}
|
210
|
+
</style>
|
211
|
+
<%= yield :html_head %>
|
212
|
+
</head>
|
213
|
+
<body>
|
214
|
+
<%= cms_toolbar %>
|
215
|
+
<div id="wrapper">
|
216
|
+
<div id="header">
|
217
|
+
Breadcrumbs: <%= render_breadcrumbs %>
|
218
|
+
Main Menu: <%= render_menu %>
|
219
|
+
<h1><%= page_title %></h1>
|
220
|
+
</div>
|
221
|
+
<div id="main"><%= container :main %></div>
|
222
|
+
<div id="sidebar"><%= container :sidebar %></div>
|
223
|
+
</div>
|
224
|
+
</body></code></div>
|
225
|
+
<p>We have added several <tt>div</tt> elements to the template to clearly define a header, main and sidebar areas of our page. We have also cleaned up the <span class="caps">CSS</span> placed in the <tt>head</tt> element of the page. This <span class="caps">CSS</span> could also be moved to an external stylesheet as well. Now refresh the page and you should see an additional column on the right with a new <tt>:sidebar</tt> container being rendered. The content placed in the <tt>:main</tt> container will still there, though moved around based on the <span class="caps">CSS</span> rules of the template.</p>
|
226
|
+
<p>Having seen the sample templates, it should be possible to construct <span class="caps">HTML</span> templates using typical <span class="caps">HTML</span> and <span class="caps">CSS</span>, place containers in them where content should appear and get a reasonable looking set of templates.</p>
|
227
|
+
<h3 id="tags-quick-reference">3 Tags Quick Reference</h3>
|
228
|
+
<p>This section covers a reference for all the tags (aka Helper Methods) that can be used in Page Templates to render various elements. Here is a quick list of the available tags, their purpose and whether they are required or not.</p>
|
229
|
+
<p>._ Name |<em>. Purpose | Required? |
|
230
|
+
| <tt>container</tt> | A named area that allows users to add/edit content | Yes |
|
231
|
+
| <tt>cms</em>toolbar</tt></notextile> | Renders the <span class="caps">CMS</span> toolbar controller required for editing and navigation. Should be very first element in <tt>body</tt> | Yes |
|
232
|
+
| <tt>yield :html_head | This allows the CMS to insert javascript and other information into the page. Should be last element in </tt>head+ | Yes |
|
233
|
+
| <tt>page_title</tt> | Inserts the ‘Name’ of the page (or ‘Title’ if it exists) | No |
|
234
|
+
| <tt>current_page</tt> | Returns a reference to the <tt>Page</tt> object that is currently being rendered | No |
|
235
|
+
| <tt>render_breadcrumbs</tt> | Generates breadcrumbs based on the current page and its location in the sitemap | No |
|
236
|
+
| <tt>render_menu</tt> | Generates a menu based on the current page and its location in the sitemap | No |
|
237
|
+
| <tt>render_portlet</tt> | Renders a specific portlet by name | No |
|
238
|
+
| <tt>render_connectable</tt> | Renders a specific content block | No |</p>
|
239
|
+
<p>In addition, since Page Templates are Rails layouts, you can make use of any of the Asset Tags":http://guides.rubyonrails.org/layouts_and_rendering.html#structuring-layouts like <tt>stylesheet_link_tag</tt> or <tt>image_tag</tt>.</p>
|
240
|
+
<h4 id="required-tags">3.1 Required Tags</h4>
|
241
|
+
<p>While most of the tags are optional, there are several tags which must be included or page template just won’t work correctly. Here’s the minimum necessary tags required.</p>
|
242
|
+
<p>1. <tt>yield :html_head</tt> – Leaving this out will cause problems with in page editing.
|
243
|
+
2. <tt>cms_toolbar</tt> – Leaving this out will provide editing and navigation to other <span class="caps">CMS</span> pages.
|
244
|
+
3. <tt>container</tt> – Having at least one (typically called <tt>:main</tt>) is required to allow content to be added to pages.</p>
|
245
|
+
<h4 id="container-tag">3.2 <tt>container</tt> Tag</h4>
|
246
|
+
<p>This tag is used to allow areas of the page to be editted and render through the <span class="caps">CMS</span>. It takes a single argument which is the name of the container. Template developers can name containers whatever they like, but its recommened that the names should generally reflect the area or purpose of a particular container.</p>
|
247
|
+
<div class="code_container"><code class="html"><div><%= container :main %></div>
|
248
|
+
<div><%= container :footer %></div></code></div>
|
249
|
+
<p>Container names are just labels. So if you defined 5 containers on a template (header, footer, left, main, right), you could swap between any two templates which defined all those containers.</p>
|
250
|
+
<div class='note'><p>Be aware that if you add content to a page in a container (like <tt>:sidebar</tt>) then change a pages template to one which does not have that container, the content will be ‘orphaned’. To remove that content, you would need to swap back to the previous template, remove the content, then change back to the new template again.</p></div>
|
251
|
+
<h4 id="cms-toolbar-tag">3.3 <tt>cms_toolbar</tt> Tag</h4>
|
252
|
+
<p>This tag is how the toolbar is inserted into templates. It should be the first element in the <tt>body</tt> element of a page. In most cases, you can just use it as follows:</p>
|
253
|
+
<div class="code_container"><code class="html"><body>
|
254
|
+
<%= cms_toolbar %>
|
255
|
+
<h2>About Us</h2>
|
256
|
+
<!-- Text goes here -->
|
257
|
+
</body></code></div>
|
258
|
+
<p>The toolbar is written out as an iframe which makes its less likely that styles/javascript will clash with the page being editted.</p>
|
259
|
+
<h4 id="html-head-tag">3.4 <span class="caps">HTML</span> Head Tag</h4>
|
260
|
+
<p>This tag is technically a standard <tt>yield</tt> call, with a particularly named <tt>:html_head</tt>. This tag must be included in all <span class="caps">CMS</span> templates to allow it to insert the necessary javascript and style elements. It should probably be the last element in <tt>head</tt> element of a page.</p>
|
261
|
+
<div class="code_container"><code class="html"><head>
|
262
|
+
<title><%= page_title %></title>
|
263
|
+
<%= yield :html_head %>
|
264
|
+
</head></code></div>
|
265
|
+
<h4 id="page-title-tag">3.5 <tt>page_title</tt> Tag</h4>
|
266
|
+
<p>This tag will output the <tt>name</tt> attribute of the current page. If the <tt>title</tt> attribute is specified, it will output that instead. This allows users to have one label for a page appear in the navigation (navigation and the sitemap always use <tt>name</tt>) and another in the header or title bar on a page.</p>
|
267
|
+
<p>Example:</p>
|
268
|
+
<div class="code_container"><code class="html"><title>My Site | <%= page_title %></title></code></div>
|
269
|
+
<p>This is using the page_title tag to title element of a page.</p>
|
270
|
+
<div class="code_container"><code class="html"><h1><%= page_title %></h1></code></div>
|
271
|
+
<p>Another common usage of <tt>page_title</tt> is for the H1 or H2 on a page.</p>
|
272
|
+
<h4 id="current-page-tag">3.6 <tt>current_page</tt> Tag</h4>
|
273
|
+
<p>This doesn’t render anything, but returns a reference to the current <tt>Page</tt> object that is being rendered. It can be used to access other attributes of the page, like the name of the section or the <tt>description</tt> of the Page. Here are some common examples:</p>
|
274
|
+
<div class="code_container"><code class="html"><%= current_page.name %></code></div>
|
275
|
+
<p>This outputs the <tt>name</tt> attribute of the page, similar to how <tt>page_title</tt> works. You might do this if you had specified a <tt>title</tt> attribute for pages which was different than the <tt>name</tt>, but wanted to compare names.</p>
|
276
|
+
<div class="code_container"><code class="html"><%= current_page.section.name %></code></div>
|
277
|
+
<p>This outputs the <tt>name</tt> of the current page’s section.</p>
|
278
|
+
<div class="code_container"><code class="html"><% if current_page.top_level_section.name == 'About Us' %>
|
279
|
+
<%= image_tag "/fancy/about_us_section_image.png" %>
|
280
|
+
<% end %></code></div>
|
281
|
+
<p>This renders a specific image if the page is within the top level ‘About Us’ section. The <tt>top_level_section</tt> method finds the very top level section for a give page, regardless of how far down it is in the sitemap. Useful for making comparisons based on the first level of navigation.</p>
|
282
|
+
<div class='note'><p>Any page or section attribute is reachable in the way. You will need to look at the <span class="caps">API</span> documentation for <tt>Page</tt> and <tt>Section</tt> to see all the available attributes.</p></div>
|
283
|
+
<h4 id="render-portlet-tag">3.7 <tt>render_portlet</tt> Tag</h4>
|
284
|
+
<p>This tag will render a portlet from a template. Normally portlets are placed individually on each page by users. This tag is useful for common elements that might appear on multiple pages throughout the site. An example of this might be a Login Portlet which should appear as part of the header on all pages. Here’s an example:</p>
|
285
|
+
<div class="code_container"><code class="html"><%= render_portlet "Nav Login Form" %></code></div>
|
286
|
+
<p>The only argument to <tt>render_portlet</tt> is a name. This name will match the name specified in the UI when you add a portlet. You will need to create the portlet and name in appropriately for this tag to work. The portlet will render itself based on its template.</p>
|
287
|
+
<h4 id="render-connectable-tag">3.8 <tt>render_connectable</tt> Tag</h4>
|
288
|
+
<p>This tag can render a specific block in a page. It takes one argument, the block itself. This could be used to automatically include, say a footer, into a page as part of the template. For instance:</p>
|
289
|
+
<div class="code_container"><code class="html"><% footer = HtmlBlock.find(12) %>
|
290
|
+
<%= render_connectable(footer) %></code></div>
|
291
|
+
<p>Here we use Active Record to query for a specific HtmlBlock (i.e. Text) with the id of 12. Then we pass it to <tt>render_connectable</tt> to display itself.</p>
|
292
|
+
<h3 id="navigation">4 Navigation</h3>
|
293
|
+
<p>Most websites typically features some form of navigation via menus and/or breadcrumbs. Some navigation is highly graphical and changes infrequently. Other’s might use drop downs (via Javascript), while still users have site maps that drill down to the deepest pages. BrowserCMS is designed to support many different navigation choices, including everything from hand coded horizontal navigation to dynamic left side menus.</p>
|
294
|
+
<p>One of the features that BrowserCMS provides is an menu and breadcrumb generation tags. These tags can automatically generate menus/breadcrumbs based on the current page. For breadcrumbs, they render linkable items for the page and its parents. For menus, it can show a page, all it’s siblings as well as highlight the currently selected sections. The primary advantage of this is for rendering menus which can frequently change, like section navigation. As pages are added and published in the sitemap, they will automatically appear in the menus.</p>
|
295
|
+
<h4 id="basic-rules-of-menus">4.1 Basic Rules of Menus</h4>
|
296
|
+
<p>Understanding dynamic menus can be tricky things, so you will likely need to experiment with them, but here are some basic rules to remember.</p>
|
297
|
+
<ol>
|
298
|
+
<li>Menus will automatically generate names and URLs based on the <tt>name</tt> and <tt>path</tt> attributes of pages in the sitemap.</li>
|
299
|
+
<li>Hidden pages/section are not shown. If you mark a page or section as ‘hidden’ via the sitemap, it will never be shown in the menu.</li>
|
300
|
+
<li>Unpublished pages are not shown. If you change a page name or url, it won’t appear until the page is published.</li>
|
301
|
+
<li>Moving pages and sections around in the sitemap will reorder them in the menus automatically.</li>
|
302
|
+
</ol>
|
303
|
+
<p>Here’s an example of a site map representing part of the <a href="http://en.wikipedia.org/wiki/National_Football_Conference">National Football League’s</a> conference system. While not all readesr may be familiar with ‘American’ football, it does provide a nice example of a tree structure that has multiple levels (Conferences > Divisions > Teams). We will use this sitemap in the following examples to highlight how to build menus.</p>
|
304
|
+
<p><img src="images/nfl_sitemap.png" alt="" /></p>
|
305
|
+
<h4 id="using-menus">4.2 Using Menus</h4>
|
306
|
+
<p>To render a menu, you can make use of the <tt>render_menu</tt> tag. It will generate <span class="caps">HTML</span> markup that can be styled via <span class="caps">CSS</span> to render either horizontal or vertical navigation.</p>
|
307
|
+
<div class="code_container"><code class="ruby"><%= render_menu %></code></div>
|
308
|
+
<p>This would render a menu starting with all the top level sections, creating unordered lists as far down as the current page. If I navigate to the <em>Dallas</em> page (+/nfc/east/dallas), the following <span class="caps">HTML</span> would be rendered:</p>
|
309
|
+
<div class="code_container"><code class="html"><div id="menu" class="menu">
|
310
|
+
<ul>
|
311
|
+
<li id="section_3" class="depth-1 first open">
|
312
|
+
<a href="/nfc/east/dallas">NFC</a>
|
313
|
+
<ul>
|
314
|
+
<li id="section_5" class="depth-2 first open">
|
315
|
+
<a href="/nfc/east/dallas">East</a>
|
316
|
+
<ul>
|
317
|
+
<li id="page_5" class="depth-3 first on">
|
318
|
+
<a href="/nfc/east/dallas">Dallas</a>
|
319
|
+
</li>
|
320
|
+
<li id="page_6" class="depth-3 last">
|
321
|
+
<a href="/nfc/east/new-york">New York</a>
|
322
|
+
</li>
|
323
|
+
</ul>
|
324
|
+
</li>
|
325
|
+
<li id="section_6" class="depth-2">
|
326
|
+
<a href="/nfc/north/chicago">North</a>
|
327
|
+
</li>
|
328
|
+
<li id="section_7" class="depth-2">
|
329
|
+
<a href="/nfc/west">West</a>
|
330
|
+
</li>
|
331
|
+
<li id="section_11" class="depth-2 last">
|
332
|
+
<a href="/nfc/south/tampa-bay">South</a>
|
333
|
+
</li>
|
334
|
+
</ul>
|
335
|
+
</li>
|
336
|
+
<li id="section_4" class="depth-1 last">
|
337
|
+
<a href="/afc/east">AFC</a>
|
338
|
+
</li>
|
339
|
+
</ul>
|
340
|
+
</div></code></div>
|
341
|
+
<p>Things to note:</p>
|
342
|
+
<ul>
|
343
|
+
<li>The top level containing element for the menu is marked as <tt>id</tt> and <tt>class</tt> = <tt>menu</tt>. (<tt>class</tt> can be changed via parameters.)</li>
|
344
|
+
<li>We are currently on the ‘Dallas’ page. So the dallas <tt>li</tt> is marked with an <tt>on</tt> class.</li>
|
345
|
+
<li>The ‘<span class="caps">NFC</span>’ and ‘East’ sections are open (because they are ancestors of the ‘Dallas’ page). They are marked with an <tt>open</tt> class.</li>
|
346
|
+
<li>All siblings to ‘open’ sections are shown (i.e. we see ‘<span class="caps">AFC</span>’ and ‘North’, but nothing under them). The first and last element of each list is marked with <tt>first</tt> and <tt>last</tt>.</li>
|
347
|
+
<li>The depth of each element has a style. For instance, the ‘Dallas’ page is at <tt>depth-3</tt>.</li>
|
348
|
+
</ul>
|
349
|
+
<h4 id="how-deep-should-menus-be">4.3 How Deep Should Menus Be?</h4>
|
350
|
+
<p>Since we have not given any options to <tt>render_menu</tt>, it will render all levels down to the current page. In a deeply nested site, you could end up with 4 to 5 levels. In general practice, its often best to limit menus to 2-3 levels. You can do this by specifying how deep and when we want to start menus. For instance, the following menu code would behave identically to the previous one.</p>
|
351
|
+
<div class="code_container"><code class="html"><%= render_menu :from_top=>0, :depth=>3 %></code></div>
|
352
|
+
<p>This menu will show all items below level 0 (<tt>from_top=>0</tt>) and showing a total 3 levels of navigation (+depth=>3). Our ‘top level’ sections/pages (like <em><span class="caps">AFC</span></em>, <em><span class="caps">NFC</span></em> and _Home__) are all at depth=>1, so they are shown. The <em>East</em> page is second level and the <em>Dallas</em> page is the 3 level, so we see all three levels of navigation.</p>
|
353
|
+
<p>In general, the <tt>:depth</tt> option is used to ‘cut off’ navigation after a certain point (since a vertical leftside nav can only render so many levels), while <tt>:from_top</tt> is used to determine how high to start. Here’s some further examples:</p>
|
354
|
+
<h4 id="primary-navigation">4.4 Primary Navigation</h4>
|
355
|
+
<p>Want to show only the first level of navigation? Try this:</p>
|
356
|
+
<div class="code_container"><code class="html"><%= render_menu :from_top=>0, :depth=>1 %></code></div>
|
357
|
+
<p>This will render only a single level of our top level navigation, regardless of how deep our site goes. Here’s the output when we are on the <em>Dallas</em> page.</p>
|
358
|
+
<div class="code_container"><code class="html"><div id="menu" class="menu">
|
359
|
+
<ul>
|
360
|
+
<li id="page_1" class="depth-1 first">
|
361
|
+
<a href="/">Home</a>
|
362
|
+
</li>
|
363
|
+
<li id="section_3" class="depth-1">
|
364
|
+
<a href="/nfc/east/dallas">NFC</a>
|
365
|
+
</li>
|
366
|
+
<li id="section_4" class="depth-1 last">
|
367
|
+
<a href="#">AFC</a>
|
368
|
+
</li>
|
369
|
+
</ul>
|
370
|
+
</div>
|
371
|
+
<h1>Dallas</h1></code></div>
|
372
|
+
<h4 id="sub-navigation">4.5 Sub Navigation</h4>
|
373
|
+
<p>Suppose we wanted to have two menus on a site, a horizontal ‘primary’ navigation and a vertical ‘sub’ navigation. In this case, we want to show our <span class="caps">NFL</span> conferences as the primary navigation, and when you drill down the Division would be shown as the left side navigation. Here’s how the left nav can be generated.</p>
|
374
|
+
<div class="code_container"><code class="html"><%= render_menu :from_top=>1, :depth=>2, :class=>"leftmenu" %></code></div>
|
375
|
+
<p>Here is the output when we are on the <em>Dallas</em> page.</p>
|
376
|
+
<div class="code_container"><code class="html"><div id="menu" class="leftmenu">
|
377
|
+
<ul>
|
378
|
+
<li id="section_5" class="depth-1 first open">
|
379
|
+
<a href="/nfc/east/dallas">East</a>
|
380
|
+
<ul>
|
381
|
+
<li id="page_5" class="depth-2 first on">
|
382
|
+
<a href="/nfc/east/dallas">Dallas</a>
|
383
|
+
|
384
|
+
</li>
|
385
|
+
<li id="page_6" class="depth-2 last">
|
386
|
+
<a href="/nfc/east/new-york">New York</a>
|
387
|
+
</li>
|
388
|
+
</ul>
|
389
|
+
</li>
|
390
|
+
<li id="section_6" class="depth-1">
|
391
|
+
<a href="/nfc/north/chicago">North</a>
|
392
|
+
|
393
|
+
</li>
|
394
|
+
<li id="section_7" class="depth-1">
|
395
|
+
<a href="/nfc/west/atlanta">West</a>
|
396
|
+
</li>
|
397
|
+
<li id="section_11" class="depth-1 last">
|
398
|
+
<a href="/nfc/south/tampa-bay">South</a>
|
399
|
+
</li>
|
400
|
+
</ul>
|
401
|
+
|
402
|
+
</div></code></div>
|
403
|
+
<h4 id="site-maps-and-flyout-menus">4.6 Site Maps and Flyout Menus</h4>
|
404
|
+
<p>You can also handle sitemaps and flyout menus by specifying some additional attributes. Normally, menus will not show the entire tree, but you can make them by doing the following:</p>
|
405
|
+
<div class="code_container"><code class="html"><%= render_menu :show_all_siblings=>true %></code></div>
|
406
|
+
<p>This will render every visible node in the tree, regardless of which page we are currently on. It follows the same <tt>:from_top</tt> and <tt>:depth</tt> rules as other menus.</p>
|
407
|
+
<h4 id="using-breadcrumbs">4.7 Using Breadcrumbs</h4>
|
408
|
+
<p>Breadcrumbs work very similar fashion to menus, except that they only render a single list which includes the current page and all ancestors.</p>
|
409
|
+
<div class="code_container"><code class="html"><%= render_breadcrumbs %></code></div>
|
410
|
+
<p>If we are on the <em>Dallas</em> page, this will render the following <span class="caps">HTML</span>:</p>
|
411
|
+
<div class="code_container"><code class="html"><ul class="breadcrumbs">
|
412
|
+
<li class="first"><a href="/">My Site</a></li>
|
413
|
+
<li><a href="/nfc/east/dallas">NFC</a></li>
|
414
|
+
<li><a href="/nfc/east/dallas">East</a></li>
|
415
|
+
|
416
|
+
<li>Dallas</li>
|
417
|
+
</ul></code></div>
|
418
|
+
<p>If we moved to the <em>Detroit</em> page, it would render this:</p>
|
419
|
+
<div class="code_container"><code class="html"><ul class="breadcrumbs">
|
420
|
+
<li class="first"><a href="/">My Site</a></li>
|
421
|
+
<li><a href="/nfc/east/dallas">NFC</a></li>
|
422
|
+
<li><a href="/nfc/north/chicago">North</a></li>
|
423
|
+
|
424
|
+
<li>Detroit</li>
|
425
|
+
</ul></code></div>
|
426
|
+
|
427
|
+
<p>You can also specify some options to it:</p>
|
428
|
+
<div class="code_container"><code class="html"><%= render_breadcrumbs :from_top=>1 %></code></div>
|
429
|
+
<p>This would exclude the top level section (i.e. the name of the site <em>My Site</em>). This would render the following if I was on the <em>Dallas</em> page:</p>
|
430
|
+
<div class="code_container"><code class="html"><ul class="breadcrumbs">
|
431
|
+
<li class="first"><a href="/nfc/east/dallas">NFC</a></li>
|
432
|
+
<li><a href="/nfc/east/dallas">East</a></li>
|
433
|
+
<li>Dallas</li>
|
434
|
+
</ul></code></div>
|
435
|
+
<h3 id="using-partials">5 Using Partials</h3>
|
436
|
+
<p>A site which has multiple templates will likely have duplicate <span class="caps">HTML</span>. Areas of the page like Headers and Footers can easily be exactly the same between two templates. In order to avoid duplication, it is possible to use partials to extract and reuse view code. Like templates, partials can either be content in the repository or files, depending on how developers want to organize their project. See the Rails <a href="http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials">Layouts and Views Guide</a> for more information on how partials work.</p>
|
437
|
+
<p>Let’s extract our common header code from our <tt>subpage</tt> template. Here’s how the file looked earlier:</p>
|
438
|
+
<div class="code_container"><code class="html"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
439
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
440
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
441
|
+
<head>
|
442
|
+
<head>
|
443
|
+
<title><%= page_title %> | Our Fancy Site</title>
|
444
|
+
<style>
|
445
|
+
body, html { margin: 0; padding: 0; text-align: center; }
|
446
|
+
#wrapper { width: 700px; margin: 0 auto; text-align: left; padding: 30px }
|
447
|
+
#main { float: left; width: 500px; }
|
448
|
+
#sidebar { float: right; padding: 0 30px 0 0; width: 150px;}
|
449
|
+
</style>
|
450
|
+
<%= yield :html_head %>
|
451
|
+
</head>
|
452
|
+
<body>
|
453
|
+
<%= cms_toolbar %>
|
454
|
+
<div id="wrapper">
|
455
|
+
<div id="header">
|
456
|
+
Breadcrumbs: <%= render_breadcrumbs %>
|
457
|
+
Main Menu: <%= render_menu %>
|
458
|
+
<h1><%= page_title %></h1>
|
459
|
+
</div>
|
460
|
+
<div id="main"><%= container :main %></div>
|
461
|
+
<div id="sidebar"><%= container :sidebar %></div>
|
462
|
+
</div>
|
463
|
+
</body>
|
464
|
+
</html></code></div>
|
465
|
+
<p>Create a new file called <tt>app/views/partials/_header.html.erb</tt>. By placing partials in this directory, they will match where the content repository based templates are written out to. This will allow templates to include partials regardless of where its data is stored. Copy/Paste code from <tt>subpage.html.erb</tt> so that <tt>_header.html.erb</tt> looks like this:</p>
|
466
|
+
<div class="code_container"><code class="html"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
467
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
468
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
469
|
+
<head>
|
470
|
+
<title><%= page_title %> | Our Fancy Site</title>
|
471
|
+
<style>
|
472
|
+
body, html { margin: 0; padding: 0; text-align: center; }
|
473
|
+
#wrapper { width: 700px; margin: 0 auto; text-align: left; padding: 30px }
|
474
|
+
#main { float: left; width: 500px; }
|
475
|
+
#sidebar { float: right; padding: 0 30px 0 0; width: 150px;}
|
476
|
+
</style>
|
477
|
+
<%= yield :html_head %>
|
478
|
+
</head>
|
479
|
+
<body>
|
480
|
+
<%= cms_toolbar %></code></div>
|
481
|
+
<p>Then update <tt>subpage</tt> to look like this:</p>
|
482
|
+
<div class="code_container"><code class="html"><%= render :partial=>"partials/header" %>
|
483
|
+
<div id="wrapper">
|
484
|
+
<div id="header">
|
485
|
+
Breadcrumbs: <%= render_breadcrumbs %>
|
486
|
+
Main Menu: <%= render_menu %>
|
487
|
+
<h1><%= page_title %></h1>
|
488
|
+
</div>
|
489
|
+
<div id="main"><%= container :main %></div>
|
490
|
+
<div id="sidebar"><%= container :sidebar %></div>
|
491
|
+
</div>
|
492
|
+
</body>
|
493
|
+
</html></code></div>
|
494
|
+
<p>Now when you refresh a page using the Subpage template, it should look exactly the same.</p>
|
495
|
+
</td>
|
496
|
+
</tr>
|
497
|
+
</table>
|
498
|
+
</div>
|
499
|
+
</div>
|
500
|
+
<br clear="all"/>
|
501
|
+
<div class="bottom_cap"></div>
|
502
|
+
</div>
|
503
|
+
</div>
|
504
|
+
</body>
|
505
|
+
</html>
|
506
|
+
|