browsercms-artirix 4.0.0.rc1.art4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +5 -0
- data/COPYRIGHT.txt +27 -0
- data/GPL.txt +674 -0
- data/LICENSE.txt +165 -0
- data/README.markdown +45 -0
- data/app/assets/fonts/icomoon.dev.svg +61 -0
- data/app/assets/fonts/icomoon.eot +0 -0
- data/app/assets/fonts/icomoon.svg +61 -0
- data/app/assets/fonts/icomoon.ttf +0 -0
- data/app/assets/fonts/icomoon.woff +0 -0
- data/app/assets/images/ckeditor/plugins/delete_content/icons/deletecontent.png +0 -0
- data/app/assets/images/ckeditor/plugins/edit_content/icons/editcontent.png +0 -0
- data/app/assets/images/ckeditor/plugins/move_content/icons/movecontentdown.png +0 -0
- data/app/assets/images/ckeditor/plugins/move_content/icons/movecontentup.png +0 -0
- data/app/assets/images/cms/administration/user_browser_bg.gif +0 -0
- data/app/assets/images/cms/arrow-down.png +0 -0
- data/app/assets/images/cms/arrow-up.png +0 -0
- data/app/assets/images/cms/bg.png +0 -0
- data/app/assets/images/cms/bl_curve.png +0 -0
- data/app/assets/images/cms/bottom_cap.png +0 -0
- data/app/assets/images/cms/bottom_cap_content.png +0 -0
- data/app/assets/images/cms/browse.gif +0 -0
- data/app/assets/images/cms/browser_media_logo.png +0 -0
- data/app/assets/images/cms/browsercms_logo.png +0 -0
- data/app/assets/images/cms/buttons/button.png +0 -0
- data/app/assets/images/cms/buttons/button_bg.png +0 -0
- data/app/assets/images/cms/buttons/button_cap.png +0 -0
- data/app/assets/images/cms/buttons/button_cap_h.png +0 -0
- data/app/assets/images/cms/buttons/button_cap_off.gif +0 -0
- data/app/assets/images/cms/buttons/button_cap_off_middle.gif +0 -0
- data/app/assets/images/cms/buttons/button_h.png +0 -0
- data/app/assets/images/cms/buttons/button_left_bg.png +0 -0
- data/app/assets/images/cms/buttons/button_off.png +0 -0
- data/app/assets/images/cms/buttons/button_off_middle.png +0 -0
- data/app/assets/images/cms/buttons/delete_x.png +0 -0
- data/app/assets/images/cms/buttons/delete_x_disabled.png +0 -0
- data/app/assets/images/cms/buttons/delete_x_h.png +0 -0
- data/app/assets/images/cms/buttons/sm_button.gif +0 -0
- data/app/assets/images/cms/buttons/sm_button_2.gif +0 -0
- data/app/assets/images/cms/buttons/sm_button_2_h.gif +0 -0
- data/app/assets/images/cms/buttons/sm_button_h.gif +0 -0
- data/app/assets/images/cms/cogs.png +0 -0
- data/app/assets/images/cms/containers/add.gif +0 -0
- data/app/assets/images/cms/containers/alpha.png +0 -0
- data/app/assets/images/cms/containers/beta.png +0 -0
- data/app/assets/images/cms/containers/delete.gif +0 -0
- data/app/assets/images/cms/containers/down.gif +0 -0
- data/app/assets/images/cms/containers/edit.gif +0 -0
- data/app/assets/images/cms/containers/up.gif +0 -0
- data/app/assets/images/cms/containers/view.gif +0 -0
- data/app/assets/images/cms/content_bg.gif +0 -0
- data/app/assets/images/cms/dashboard/bottom_cap.png +0 -0
- data/app/assets/images/cms/dashboard/bottom_cap_content.png +0 -0
- data/app/assets/images/cms/dashboard/header_bg.gif +0 -0
- data/app/assets/images/cms/dashboard/header_left_bg.gif +0 -0
- data/app/assets/images/cms/dashboard/home.png +0 -0
- data/app/assets/images/cms/dashboard/table_header_bg.gif +0 -0
- data/app/assets/images/cms/dashboard/top_cap.png +0 -0
- data/app/assets/images/cms/dashed.gif +0 -0
- data/app/assets/images/cms/datepicker/clear.gif +0 -0
- data/app/assets/images/cms/datepicker/close.gif +0 -0
- data/app/assets/images/cms/dk_button_l.gif +0 -0
- data/app/assets/images/cms/dk_button_r.gif +0 -0
- data/app/assets/images/cms/dot.png +0 -0
- data/app/assets/images/cms/draft_status.gif +0 -0
- data/app/assets/images/cms/file-uploading.gif +0 -0
- data/app/assets/images/cms/gray_long_bg.gif +0 -0
- data/app/assets/images/cms/home.png +0 -0
- data/app/assets/images/cms/icons/actions/add.png +0 -0
- data/app/assets/images/cms/icons/actions/config.png +0 -0
- data/app/assets/images/cms/icons/actions/connect.png +0 -0
- data/app/assets/images/cms/icons/actions/delete.png +0 -0
- data/app/assets/images/cms/icons/actions/down.png +0 -0
- data/app/assets/images/cms/icons/actions/edit.png +0 -0
- data/app/assets/images/cms/icons/actions/folder.png +0 -0
- data/app/assets/images/cms/icons/actions/folder_add.png +0 -0
- data/app/assets/images/cms/icons/actions/folder_delete.png +0 -0
- data/app/assets/images/cms/icons/actions/folder_edit.png +0 -0
- data/app/assets/images/cms/icons/actions/folder_move.png +0 -0
- data/app/assets/images/cms/icons/actions/folder_open.png +0 -0
- data/app/assets/images/cms/icons/actions/history.png +0 -0
- data/app/assets/images/cms/icons/actions/home.png +0 -0
- data/app/assets/images/cms/icons/actions/left.png +0 -0
- data/app/assets/images/cms/icons/actions/link.png +0 -0
- data/app/assets/images/cms/icons/actions/page.png +0 -0
- data/app/assets/images/cms/icons/actions/page_add.png +0 -0
- data/app/assets/images/cms/icons/actions/page_edit.png +0 -0
- data/app/assets/images/cms/icons/actions/page_move.png +0 -0
- data/app/assets/images/cms/icons/actions/redo.png +0 -0
- data/app/assets/images/cms/icons/actions/refresh.png +0 -0
- data/app/assets/images/cms/icons/actions/right.png +0 -0
- data/app/assets/images/cms/icons/actions/root_folder.png +0 -0
- data/app/assets/images/cms/icons/actions/root_link.png +0 -0
- data/app/assets/images/cms/icons/actions/root_page.png +0 -0
- data/app/assets/images/cms/icons/actions/undo.png +0 -0
- data/app/assets/images/cms/icons/actions/up.png +0 -0
- data/app/assets/images/cms/icons/actions/view.png +0 -0
- data/app/assets/images/cms/icons/file_types/doc.png +0 -0
- data/app/assets/images/cms/icons/file_types/file.png +0 -0
- data/app/assets/images/cms/icons/file_types/gif.png +0 -0
- data/app/assets/images/cms/icons/file_types/htm.png +0 -0
- data/app/assets/images/cms/icons/file_types/pdf.png +0 -0
- data/app/assets/images/cms/icons/file_types/ppt.png +0 -0
- data/app/assets/images/cms/icons/file_types/swf.png +0 -0
- data/app/assets/images/cms/icons/file_types/txt.png +0 -0
- data/app/assets/images/cms/icons/file_types/xls.png +0 -0
- data/app/assets/images/cms/icons/file_types/xml.png +0 -0
- data/app/assets/images/cms/icons/file_types/zip.png +0 -0
- data/app/assets/images/cms/icons/status/archived.gif +0 -0
- data/app/assets/images/cms/icons/status/draft.gif +0 -0
- data/app/assets/images/cms/icons/status/hidden.gif +0 -0
- data/app/assets/images/cms/icons/status/locked.gif +0 -0
- data/app/assets/images/cms/icons/status/published.gif +0 -0
- data/app/assets/images/cms/icons/status/unlocked.gif +0 -0
- data/app/assets/images/cms/icons/user.png +0 -0
- data/app/assets/images/cms/login_bg.jpg +0 -0
- data/app/assets/images/cms/login_bottom.jpg +0 -0
- data/app/assets/images/cms/login_top.gif +0 -0
- data/app/assets/images/cms/logo.png +0 -0
- data/app/assets/images/cms/lt_button_bg.gif +0 -0
- data/app/assets/images/cms/lt_button_l.gif +0 -0
- data/app/assets/images/cms/lt_button_r.gif +0 -0
- data/app/assets/images/cms/menu/block_cap_h.gif +0 -0
- data/app/assets/images/cms/menu/bottom_cap.png +0 -0
- data/app/assets/images/cms/menu/bottom_cap_menu.png +0 -0
- data/app/assets/images/cms/menu/bottom_cap_menu_first.png +0 -0
- data/app/assets/images/cms/menu/menu_header_first_bg.gif +0 -0
- data/app/assets/images/cms/menu/selected_block_cap.gif +0 -0
- data/app/assets/images/cms/menu/top_cap.png +0 -0
- data/app/assets/images/cms/menu/top_cap_menu_header.png +0 -0
- data/app/assets/images/cms/menu.png +0 -0
- data/app/assets/images/cms/menu_h.gif +0 -0
- data/app/assets/images/cms/menu_header.png +0 -0
- data/app/assets/images/cms/menu_open.png +0 -0
- data/app/assets/images/cms/menu_open_bg.gif +0 -0
- data/app/assets/images/cms/nav/on_bg.gif +0 -0
- data/app/assets/images/cms/nav.png +0 -0
- data/app/assets/images/cms/nav_admin.gif +0 -0
- data/app/assets/images/cms/nav_admin_h.gif +0 -0
- data/app/assets/images/cms/nav_admin_on.gif +0 -0
- data/app/assets/images/cms/nav_cap.png +0 -0
- data/app/assets/images/cms/nav_cap_h.gif +0 -0
- data/app/assets/images/cms/nav_content_library.gif +0 -0
- data/app/assets/images/cms/nav_content_library_h.gif +0 -0
- data/app/assets/images/cms/nav_content_library_on.gif +0 -0
- data/app/assets/images/cms/nav_dash.gif +0 -0
- data/app/assets/images/cms/nav_dash_h.gif +0 -0
- data/app/assets/images/cms/nav_dash_on.gif +0 -0
- data/app/assets/images/cms/nav_h.gif +0 -0
- data/app/assets/images/cms/nav_sitemap.gif +0 -0
- data/app/assets/images/cms/nav_sitemap_h.gif +0 -0
- data/app/assets/images/cms/nav_sitemap_on.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_bg.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_inset_bg.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_inset_draft_bg.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_inset_draft_l.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_inset_draft_r.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_inset_l.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_inset_published_bg.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_inset_published_l.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_inset_published_r.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_inset_r.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_l.gif +0 -0
- data/app/assets/images/cms/page_toolbar/page_toolbar_r.gif +0 -0
- data/app/assets/images/cms/page_toolbar/status_draft_bg.gif +0 -0
- data/app/assets/images/cms/page_toolbar/status_draft_l.gif +0 -0
- data/app/assets/images/cms/page_toolbar/status_l.gif +0 -0
- data/app/assets/images/cms/page_toolbar/status_published_bg.gif +0 -0
- data/app/assets/images/cms/page_toolbar/status_published_l.gif +0 -0
- data/app/assets/images/cms/page_toolbar/visual_editor_bg.gif +0 -0
- data/app/assets/images/cms/page_toolbar/visual_editor_end.gif +0 -0
- data/app/assets/images/cms/page_toolbar/visual_editor_r.gif +0 -0
- data/app/assets/images/cms/page_toolbar/visual_editor_state_bg.gif +0 -0
- data/app/assets/images/cms/pages/add_connectable.gif +0 -0
- data/app/assets/images/cms/pages/connect_connectable.gif +0 -0
- data/app/assets/images/cms/pages/container_border.gif +0 -0
- data/app/assets/images/cms/pages/container_border_l.gif +0 -0
- data/app/assets/images/cms/pages/container_border_r.gif +0 -0
- data/app/assets/images/cms/pages/delete_connectable.gif +0 -0
- data/app/assets/images/cms/pages/down_connectable.gif +0 -0
- data/app/assets/images/cms/pages/down_connectable_disabled.gif +0 -0
- data/app/assets/images/cms/pages/edit_connectable.gif +0 -0
- data/app/assets/images/cms/pages/edit_connectable_2.gif +0 -0
- data/app/assets/images/cms/pages/show_connectable.gif +0 -0
- data/app/assets/images/cms/pages/up_connectable.gif +0 -0
- data/app/assets/images/cms/pages/up_connectable_disabled.gif +0 -0
- data/app/assets/images/cms/pagination/first.gif +0 -0
- data/app/assets/images/cms/pagination/first_h.gif +0 -0
- data/app/assets/images/cms/pagination/input.gif +0 -0
- data/app/assets/images/cms/pagination/last.gif +0 -0
- data/app/assets/images/cms/pagination/last_h.gif +0 -0
- data/app/assets/images/cms/pagination/next.gif +0 -0
- data/app/assets/images/cms/pagination/next_h.gif +0 -0
- data/app/assets/images/cms/pagination/previous.gif +0 -0
- data/app/assets/images/cms/pagination/previous_h.gif +0 -0
- data/app/assets/images/cms/pencil.png +0 -0
- data/app/assets/images/cms/plus.png +0 -0
- data/app/assets/images/cms/published_status.gif +0 -0
- data/app/assets/images/cms/search.png +0 -0
- data/app/assets/images/cms/search_submit.gif +0 -0
- data/app/assets/images/cms/search_submit_h.gif +0 -0
- data/app/assets/images/cms/searchbox_gradient.gif +0 -0
- data/app/assets/images/cms/select_bg.gif +0 -0
- data/app/assets/images/cms/select_bg_2.gif +0 -0
- data/app/assets/images/cms/sitemap/bottom_cap.png +0 -0
- data/app/assets/images/cms/sitemap/buffer_caps.png +0 -0
- data/app/assets/images/cms/sitemap/contract.png +0 -0
- data/app/assets/images/cms/sitemap/corners.gif +0 -0
- data/app/assets/images/cms/sitemap/corners_hover.gif +0 -0
- data/app/assets/images/cms/sitemap/divider.gif +0 -0
- data/app/assets/images/cms/sitemap/expand.png +0 -0
- data/app/assets/images/cms/sitemap/gradient.gif +0 -0
- data/app/assets/images/cms/sitemap/gray_contract.png +0 -0
- data/app/assets/images/cms/sitemap/gray_expand.png +0 -0
- data/app/assets/images/cms/sitemap/no_contents.png +0 -0
- data/app/assets/images/cms/sitemap/site_root_cap.png +0 -0
- data/app/assets/images/cms/sitemap/tooltip.gif +0 -0
- data/app/assets/images/cms/sitemap/top_cap_content.png +0 -0
- data/app/assets/images/cms/solid.gif +0 -0
- data/app/assets/images/cms/table/bl.gif +0 -0
- data/app/assets/images/cms/table/br.gif +0 -0
- data/app/assets/images/cms/table/divider.gif +0 -0
- data/app/assets/images/cms/table/td_cap_first_h.gif +0 -0
- data/app/assets/images/cms/table/td_cap_first_s.gif +0 -0
- data/app/assets/images/cms/table/td_cap_last_h.gif +0 -0
- data/app/assets/images/cms/table/td_cap_last_s.gif +0 -0
- data/app/assets/images/cms/table/td_last_bg.gif +0 -0
- data/app/assets/images/cms/table/th_bg.gif +0 -0
- data/app/assets/images/cms/table/th_divider.gif +0 -0
- data/app/assets/images/cms/table/th_last_bg.gif +0 -0
- data/app/assets/images/cms/table/tl.gif +0 -0
- data/app/assets/images/cms/table/tr.gif +0 -0
- data/app/assets/images/cms/table/tr_bg.gif +0 -0
- data/app/assets/images/cms/toolbar_bg.png +0 -0
- data/app/assets/images/cms/top_cap.png +0 -0
- data/app/assets/images/cms/top_cap_content.png +0 -0
- data/app/assets/images/cms/top_cap_menu_header.png +0 -0
- data/app/assets/images/cms/user.png +0 -0
- data/app/assets/images/cms/user_search_submit.gif +0 -0
- data/app/assets/images/cms/usercontrols_bg.png +0 -0
- data/app/assets/images/cms/usercontrols_bg_cap.png +0 -0
- data/app/assets/javascripts/bcms/ckeditor.js +8 -0
- data/app/assets/javascripts/bcms/ckeditor_inline.js +23 -0
- data/app/assets/javascripts/bcms/ckeditor_load.js +54 -0
- data/app/assets/javascripts/bcms/ckeditor_standard_config.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/delete_content/plugin.js +36 -0
- data/app/assets/javascripts/ckeditor/plugins/edit_content/plugin.js +24 -0
- data/app/assets/javascripts/ckeditor/plugins/move_content/plugin.js +25 -0
- data/app/assets/javascripts/cms/ajax.js +60 -0
- data/app/assets/javascripts/cms/application.js +18 -0
- data/app/assets/javascripts/cms/attachment_manager.js +88 -0
- data/app/assets/javascripts/cms/content_library.js +121 -0
- data/app/assets/javascripts/cms/content_types.js +13 -0
- data/app/assets/javascripts/cms/core_library.js.erb +210 -0
- data/app/assets/javascripts/cms/form_builder.js +250 -0
- data/app/assets/javascripts/cms/namespace.js +2 -0
- data/app/assets/javascripts/cms/new_content_button.js +27 -0
- data/app/assets/javascripts/cms/page_editor.js +189 -0
- data/app/assets/javascripts/cms/page_toolbar.js +13 -0
- data/app/assets/javascripts/cms/site.js +2 -0
- data/app/assets/javascripts/cms/sitemap.js +219 -0
- data/app/assets/javascripts/cms/toolbar.js +21 -0
- data/app/assets/javascripts/cms/user.js +40 -0
- data/app/assets/javascripts/jquery.exists.js +5 -0
- data/app/assets/javascripts/jquery.taglist.js +157 -0
- data/app/assets/stylesheets/cms/_assets.scss +60 -0
- data/app/assets/stylesheets/cms/_base.scss +42 -0
- data/app/assets/stylesheets/cms/_cms-buttons.scss +73 -0
- data/app/assets/stylesheets/cms/_cms-forms.scss +70 -0
- data/app/assets/stylesheets/cms/_colors.scss +20 -0
- data/app/assets/stylesheets/cms/_dashboard.scss +25 -0
- data/app/assets/stylesheets/cms/_glyph.scss +60 -0
- data/app/assets/stylesheets/cms/_main-area.scss +62 -0
- data/app/assets/stylesheets/cms/_nav.scss +197 -0
- data/app/assets/stylesheets/cms/_sidebar.scss +64 -0
- data/app/assets/stylesheets/cms/_sitemap.scss +209 -0
- data/app/assets/stylesheets/cms/_submenu.scss +48 -0
- data/app/assets/stylesheets/cms/application.scss +49 -0
- data/app/assets/stylesheets/cms/core.scss +96 -0
- data/app/assets/stylesheets/cms/default-forms.scss +3 -0
- data/app/assets/stylesheets/cms/includes/_animation.scss +2 -0
- data/app/assets/stylesheets/cms/includes/_rem.scss +120 -0
- data/app/assets/stylesheets/cms/includes/animation/_animate.scss +31 -0
- data/app/assets/stylesheets/cms/includes/animation/_core.scss +127 -0
- data/app/assets/stylesheets/cms/includes/animation/_shared.scss +22 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/_attention-seekers.scss +152 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/_bouncing.scss +3 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/_classes.scss +21 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/_fading.scss +3 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/_flippers.scss +87 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/_lightspeed.scss +24 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/_rotating.scss +3 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/_specials.scss +42 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/bouncing/_bouncing-entrances.scss +68 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/bouncing/_bouncing-exits.scss +60 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/fading/_fading-entrances.scss +86 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/fading/_fading-exits.scss +86 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/rotating/_rotating-entrances.scss +58 -0
- data/app/assets/stylesheets/cms/includes/animation/animate/rotating/_rotating-exits.scss +58 -0
- data/app/assets/stylesheets/cms/page_content_editing.scss +4 -0
- data/app/assets/stylesheets/cms/page_editor.scss +4 -0
- data/app/assets/stylesheets/cms/style.scss +138 -0
- data/app/assets/stylesheets/cms/styles/_alerts.scss +150 -0
- data/app/assets/stylesheets/cms/styles/_base-grid.scss +299 -0
- data/app/assets/stylesheets/cms/styles/_buttons.scss +247 -0
- data/app/assets/stylesheets/cms/styles/_dropdown.scss +155 -0
- data/app/assets/stylesheets/cms/styles/_forms.scss +728 -0
- data/app/assets/stylesheets/cms/styles/_glyph.scss +86 -0
- data/app/assets/stylesheets/cms/styles/_images.scss +86 -0
- data/app/assets/stylesheets/cms/styles/_lists.scss +115 -0
- data/app/assets/stylesheets/cms/styles/_modal.scss +174 -0
- data/app/assets/stylesheets/cms/styles/_progress.scss +43 -0
- data/app/assets/stylesheets/cms/styles/_tables.scss +141 -0
- data/app/assets/stylesheets/cms/styles/_text.scss +134 -0
- data/app/controllers/cms/application_controller.rb +11 -0
- data/app/controllers/cms/attachments_controller.rb +48 -0
- data/app/controllers/cms/base_controller.rb +22 -0
- data/app/controllers/cms/cache_controller.rb +23 -0
- data/app/controllers/cms/categories_controller.rb +7 -0
- data/app/controllers/cms/category_types_controller.rb +12 -0
- data/app/controllers/cms/connectors_controller.rb +70 -0
- data/app/controllers/cms/content_block_controller.rb +361 -0
- data/app/controllers/cms/content_controller.rb +173 -0
- data/app/controllers/cms/content_types_controller.rb +14 -0
- data/app/controllers/cms/dashboard_controller.rb +13 -0
- data/app/controllers/cms/dynamic_views_controller.rb +81 -0
- data/app/controllers/cms/email_messages_controller.rb +21 -0
- data/app/controllers/cms/file_blocks_controller.rb +4 -0
- data/app/controllers/cms/form_entries_controller.rb +140 -0
- data/app/controllers/cms/form_fields_controller.rb +74 -0
- data/app/controllers/cms/forms_controller.rb +35 -0
- data/app/controllers/cms/groups_controller.rb +25 -0
- data/app/controllers/cms/home_controller.rb +10 -0
- data/app/controllers/cms/html_blocks_controller.rb +4 -0
- data/app/controllers/cms/image_blocks_controller.rb +4 -0
- data/app/controllers/cms/inline_content_controller.rb +50 -0
- data/app/controllers/cms/links_controller.rb +81 -0
- data/app/controllers/cms/page_components_controller.rb +20 -0
- data/app/controllers/cms/page_route_conditions_controller.rb +4 -0
- data/app/controllers/cms/page_route_options_controller.rb +58 -0
- data/app/controllers/cms/page_route_requirements_controller.rb +4 -0
- data/app/controllers/cms/page_routes_controller.rb +51 -0
- data/app/controllers/cms/pages_controller.rb +151 -0
- data/app/controllers/cms/passwords_controller.rb +22 -0
- data/app/controllers/cms/portlet_controller.rb +21 -0
- data/app/controllers/cms/portlets_controller.rb +35 -0
- data/app/controllers/cms/redirects_controller.rb +25 -0
- data/app/controllers/cms/resource_controller.rb +125 -0
- data/app/controllers/cms/routes_controller.rb +22 -0
- data/app/controllers/cms/section_nodes_controller.rb +24 -0
- data/app/controllers/cms/sections_controller.rb +100 -0
- data/app/controllers/cms/sessions_controller.rb +15 -0
- data/app/controllers/cms/sites/passwords_controller.rb +32 -0
- data/app/controllers/cms/sites/sessions_controller.rb +20 -0
- data/app/controllers/cms/tags_controller.rb +16 -0
- data/app/controllers/cms/tasks_controller.rb +56 -0
- data/app/controllers/cms/toolbar_controller.rb +18 -0
- data/app/controllers/cms/user_controller.rb +8 -0
- data/app/controllers/cms/users_controller.rb +125 -0
- data/app/controllers/tests/pretend_controller.rb +32 -0
- data/app/helpers/cms/application_helper.rb +258 -0
- data/app/helpers/cms/content_block_helper.rb +55 -0
- data/app/helpers/cms/content_types_helper.rb +4 -0
- data/app/helpers/cms/form_tag_helper.rb +36 -0
- data/app/helpers/cms/menu_helper.rb +167 -0
- data/app/helpers/cms/mobile_helper.rb +29 -0
- data/app/helpers/cms/nav_menu_helper.rb +23 -0
- data/app/helpers/cms/page_helper.rb +169 -0
- data/app/helpers/cms/path_helper.rb +113 -0
- data/app/helpers/cms/rendering_helper.rb +112 -0
- data/app/helpers/cms/section_nodes_helper.rb +112 -0
- data/app/helpers/cms/sites/authentication_helper.rb +25 -0
- data/app/helpers/cms/sites/devise_shim_helper.rb +31 -0
- data/app/helpers/cms/template_support.rb +18 -0
- data/app/helpers/cms/ui_elements_helper.rb +168 -0
- data/app/helpers/forgot_password_portlet_helper.rb +9 -0
- data/app/helpers/login_portlet_helper.rb +10 -0
- data/app/inputs/attachments_input.rb +14 -0
- data/app/inputs/cms_text_area_input.rb +10 -0
- data/app/inputs/date_picker_input.rb +8 -0
- data/app/inputs/file_picker_input.rb +75 -0
- data/app/inputs/name_input.rb +42 -0
- data/app/inputs/path_input.rb +18 -0
- data/app/inputs/tag_list_input.rb +3 -0
- data/app/inputs/template_editor_input.rb +24 -0
- data/app/inputs/text_editor_input.rb +19 -0
- data/app/models/cms/abstract_file_block.rb +50 -0
- data/app/models/cms/attachment.rb +267 -0
- data/app/models/cms/category.rb +56 -0
- data/app/models/cms/category_type.rb +43 -0
- data/app/models/cms/connector.rb +99 -0
- data/app/models/cms/content.rb +31 -0
- data/app/models/cms/content_type.rb +191 -0
- data/app/models/cms/dynamic_view.rb +81 -0
- data/app/models/cms/email_message.rb +63 -0
- data/app/models/cms/email_message_mailer.rb +12 -0
- data/app/models/cms/external_user.rb +60 -0
- data/app/models/cms/file_block.rb +19 -0
- data/app/models/cms/form.rb +47 -0
- data/app/models/cms/form_entry.rb +75 -0
- data/app/models/cms/form_field.rb +78 -0
- data/app/models/cms/group.rb +62 -0
- data/app/models/cms/group_permission.rb +12 -0
- data/app/models/cms/group_section.rb +9 -0
- data/app/models/cms/group_type.rb +16 -0
- data/app/models/cms/group_type_permission.rb +8 -0
- data/app/models/cms/guest_user.rb +57 -0
- data/app/models/cms/html_block.rb +38 -0
- data/app/models/cms/image_block.rb +23 -0
- data/app/models/cms/link.rb +20 -0
- data/app/models/cms/page.rb +437 -0
- data/app/models/cms/page_component.rb +43 -0
- data/app/models/cms/page_partial.rb +40 -0
- data/app/models/cms/page_route.rb +140 -0
- data/app/models/cms/page_route_condition.rb +5 -0
- data/app/models/cms/page_route_option.rb +7 -0
- data/app/models/cms/page_route_requirement.rb +5 -0
- data/app/models/cms/page_template.rb +45 -0
- data/app/models/cms/permission.rb +17 -0
- data/app/models/cms/persistent_user.rb +223 -0
- data/app/models/cms/portlet.rb +237 -0
- data/app/models/cms/redirect.rb +12 -0
- data/app/models/cms/search_filter.rb +18 -0
- data/app/models/cms/section.rb +224 -0
- data/app/models/cms/section_node.rb +144 -0
- data/app/models/cms/site.rb +45 -0
- data/app/models/cms/tag.rb +69 -0
- data/app/models/cms/tagging.rb +14 -0
- data/app/models/cms/task.rb +75 -0
- data/app/models/cms/templates.rb +31 -0
- data/app/models/cms/user.rb +43 -0
- data/app/models/cms/user_group_membership.rb +9 -0
- data/app/models/cms/view_context.rb +81 -0
- data/app/portlets/deprecated_placeholder.rb +12 -0
- data/app/portlets/dynamic_portlet.rb +7 -0
- data/app/portlets/email_page_portlet.rb +32 -0
- data/app/portlets/forgot_password_portlet.rb +15 -0
- data/app/portlets/helpers/cms/list_portlet_helper.rb +5 -0
- data/app/portlets/list_portlet.rb +40 -0
- data/app/portlets/login_portlet.rb +13 -0
- data/app/portlets/tag_cloud_portlet.rb +15 -0
- data/app/presenters/cms/user_presenter.rb +47 -0
- data/app/views/cms/application/_add_content_modal.html.erb +3 -0
- data/app/views/cms/application/_buttons.html.erb +7 -0
- data/app/views/cms/application/_exception.html.erb +6 -0
- data/app/views/cms/application/_form_errors.html.erb +7 -0
- data/app/views/cms/application/_form_with_buttons.html.erb +10 -0
- data/app/views/cms/application/_main_content.html.erb +3 -0
- data/app/views/cms/application/_main_with_sidebar.html.erb +8 -0
- data/app/views/cms/application/_mobile_toolbar.html.erb +16 -0
- data/app/views/cms/application/_page_title.html.erb +5 -0
- data/app/views/cms/application/_pagination.html.erb +26 -0
- data/app/views/cms/application/_row.html.erb +1 -0
- data/app/views/cms/application/_save_buttons.html.erb +7 -0
- data/app/views/cms/application/_sidebar_layout.html.erb +3 -0
- data/app/views/cms/application/_version.html.erb +23 -0
- data/app/views/cms/application/_version_conflict_diff.html.erb +11 -0
- data/app/views/cms/application/_version_conflict_error.html.erb +6 -0
- data/app/views/cms/attachments/_attachment.html.erb +16 -0
- data/app/views/cms/attachments/_attachment_manager.html.erb +39 -0
- data/app/views/cms/attachments/_attachment_table.html.erb +22 -0
- data/app/views/cms/attachments/_attachment_wrapper.html.erb +4 -0
- data/app/views/cms/attachments/_no_attachments_defined.html.erb +1 -0
- data/app/views/cms/cache/show.html.erb +7 -0
- data/app/views/cms/categories/_form.html.erb +27 -0
- data/app/views/cms/category_types/_form.html.erb +1 -0
- data/app/views/cms/connectors/new.html.erb +38 -0
- data/app/views/cms/content/editing_frame.html.erb +1 -0
- data/app/views/cms/content/no_page.html.erb +19 -0
- data/app/views/cms/content/show.html.erb +21 -0
- data/app/views/cms/content_block/_block_form.html.erb +15 -0
- data/app/views/cms/content_block/_buttonbar.html.erb +29 -0
- data/app/views/cms/content_block/_buttons.html.erb +13 -0
- data/app/views/cms/content_block/_hidden_fields.html.erb +13 -0
- data/app/views/cms/content_block/_sidebar.html.erb +36 -0
- data/app/views/cms/content_block/edit.html.erb +3 -0
- data/app/views/cms/content_block/index.html.erb +87 -0
- data/app/views/cms/content_block/new.html.erb +3 -0
- data/app/views/cms/content_block/render_block_in_main_container.html.erb +10 -0
- data/app/views/cms/content_block/show.html.erb +1 -0
- data/app/views/cms/content_block/show_in_isolation.html.erb +15 -0
- data/app/views/cms/content_block/versions.html.erb +24 -0
- data/app/views/cms/content_types/_order_field.html.erb +5 -0
- data/app/views/cms/content_types/index.html.erb +3 -0
- data/app/views/cms/dashboard/_page_drafts.html.erb +39 -0
- data/app/views/cms/dashboard/_tasks.html.erb +41 -0
- data/app/views/cms/dashboard/index.html.erb +13 -0
- data/app/views/cms/dynamic_views/_form.html.erb +9 -0
- data/app/views/cms/dynamic_views/edit.html.erb +2 -0
- data/app/views/cms/dynamic_views/index.html.erb +33 -0
- data/app/views/cms/dynamic_views/new.html.erb +2 -0
- data/app/views/cms/email_messages/index.html.erb +36 -0
- data/app/views/cms/email_messages/show.html.erb +50 -0
- data/app/views/cms/file_blocks/_form.html.erb +3 -0
- data/app/views/cms/file_blocks/_section_selector.html.erb +13 -0
- data/app/views/cms/file_blocks/render.html.erb +5 -0
- data/app/views/cms/forgot_password_mailer/reset_password.text.html.erb +3 -0
- data/app/views/cms/forgot_password_mailer/reset_password.text.plain.erb +3 -0
- data/app/views/cms/form_entries/_buttons.html.erb +2 -0
- data/app/views/cms/form_entries/_form.html.erb +7 -0
- data/app/views/cms/form_entries/_internal_form.html.erb +9 -0
- data/app/views/cms/form_entries/edit.html.erb +5 -0
- data/app/views/cms/form_entries/error.html.erb +3 -0
- data/app/views/cms/form_entries/index.html.erb +5 -0
- data/app/views/cms/form_entries/new.html.erb +5 -0
- data/app/views/cms/form_entries/show.html.erb +13 -0
- data/app/views/cms/form_entries/submit.html.erb +1 -0
- data/app/views/cms/form_fields/_form.html.erb +8 -0
- data/app/views/cms/form_fields/_select.html.erb +3 -0
- data/app/views/cms/form_fields/_text_area.html.erb +3 -0
- data/app/views/cms/form_fields/_text_field.html.erb +3 -0
- data/app/views/cms/form_fields/edit.html.erb +0 -0
- data/app/views/cms/form_fields/new.html.erb +26 -0
- data/app/views/cms/form_fields/preview.html.erb +16 -0
- data/app/views/cms/forms/_form.html.erb +67 -0
- data/app/views/cms/forms/render.html.erb +15 -0
- data/app/views/cms/forms/show.html.erb +6 -0
- data/app/views/cms/groups/_form.html.erb +38 -0
- data/app/views/cms/groups/_permissions.html.erb +14 -0
- data/app/views/cms/groups/_sections.html.erb +12 -0
- data/app/views/cms/groups/edit.html.erb +2 -0
- data/app/views/cms/groups/index.html.erb +36 -0
- data/app/views/cms/groups/new.html.erb +2 -0
- data/app/views/cms/html_blocks/_form.html.erb +3 -0
- data/app/views/cms/html_blocks/render.html.erb +1 -0
- data/app/views/cms/image_blocks/_form.html.erb +3 -0
- data/app/views/cms/image_blocks/render.html.erb +4 -0
- data/app/views/cms/links/_form.html.erb +8 -0
- data/app/views/cms/links/edit.html.erb +4 -0
- data/app/views/cms/links/new.html.erb +5 -0
- data/app/views/cms/menus/_menu.html.erb +9 -0
- data/app/views/cms/menus/_menu_item.html.erb +11 -0
- data/app/views/cms/page_components/_content.html.erb +18 -0
- data/app/views/cms/page_components/new.html.erb +12 -0
- data/app/views/cms/page_routes/_form.html.erb +12 -0
- data/app/views/cms/page_routes/edit.html.erb +2 -0
- data/app/views/cms/page_routes/index.html.erb +33 -0
- data/app/views/cms/page_routes/new.html.erb +2 -0
- data/app/views/cms/pages/_edit_content.html.erb +28 -0
- data/app/views/cms/pages/_form.html.erb +21 -0
- data/app/views/cms/pages/_main_form.html.erb +23 -0
- data/app/views/cms/pages/_simple_container.html.erb +8 -0
- data/app/views/cms/pages/edit.html.erb +2 -0
- data/app/views/cms/pages/new.html.erb +19 -0
- data/app/views/cms/pages/versions.html.erb +22 -0
- data/app/views/cms/passwords/new.html.erb +16 -0
- data/app/views/cms/redirects/_form.html.erb +7 -0
- data/app/views/cms/redirects/edit.html.erb +2 -0
- data/app/views/cms/redirects/index.html.erb +25 -0
- data/app/views/cms/redirects/new.html.erb +2 -0
- data/app/views/cms/routes/index.html.erb +35 -0
- data/app/views/cms/section_nodes/_children.html.erb +5 -0
- data/app/views/cms/section_nodes/_row_buttons.html.erb +11 -0
- data/app/views/cms/section_nodes/_section_node.html.erb +24 -0
- data/app/views/cms/section_nodes/_sitemap_buttons.html.erb +47 -0
- data/app/views/cms/section_nodes/_status.html.erb +5 -0
- data/app/views/cms/section_nodes/show.html.erb +9 -0
- data/app/views/cms/sections/_buttons.html.erb +6 -0
- data/app/views/cms/sections/_form.html.erb +30 -0
- data/app/views/cms/sections/edit.html.erb +4 -0
- data/app/views/cms/sections/new.html.erb +5 -0
- data/app/views/cms/sessions/new.html.erb +16 -0
- data/app/views/cms/shared/access_denied.html.erb +2 -0
- data/app/views/cms/shared/error.html.erb +40 -0
- data/app/views/cms/shared/error.xml.erb +8 -0
- data/app/views/cms/sites/_flash.html.erb +8 -0
- data/app/views/cms/sites/passwords/new.html.erb +2 -0
- data/app/views/cms/sites/sessions/new.html.erb +2 -0
- data/app/views/cms/tags/_form.html.erb +1 -0
- data/app/views/cms/tags/render.html.erb +52 -0
- data/app/views/cms/tasks/new.html.erb +22 -0
- data/app/views/cms/toolbar/_new_pages_menu.html.erb +10 -0
- data/app/views/cms/users/_form.html.erb +9 -0
- data/app/views/cms/users/_password.html.erb +2 -0
- data/app/views/cms/users/_user_fields.html.erb +7 -0
- data/app/views/cms/users/change_password.html.erb +12 -0
- data/app/views/cms/users/edit.html.erb +2 -0
- data/app/views/cms/users/index.html.erb +65 -0
- data/app/views/cms/users/new.html.erb +2 -0
- data/app/views/devise/confirmations/new.html.erb +16 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +19 -0
- data/app/views/devise/passwords/new.html.erb +15 -0
- data/app/views/devise/registrations/edit.html.erb +28 -0
- data/app/views/devise/registrations/new.html.erb +18 -0
- data/app/views/devise/shared/_links.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +16 -0
- data/app/views/layouts/cms/_content_types.html.erb +13 -0
- data/app/views/layouts/cms/_footer.erb +4 -0
- data/app/views/layouts/cms/_head.html.erb +8 -0
- data/app/views/layouts/cms/_main_menu.html.erb +78 -0
- data/app/views/layouts/cms/application.html.erb +23 -0
- data/app/views/layouts/cms/content_page.html.erb +5 -0
- data/app/views/layouts/cms/page_editor.html.erb +90 -0
- data/app/views/portlets/deprecated_placeholders/_form.html.erb +1 -0
- data/app/views/portlets/deprecated_placeholders/render.html.erb +8 -0
- data/app/views/portlets/dynamic/_form.html.erb +3 -0
- data/app/views/portlets/email_page/_form.html.erb +5 -0
- data/app/views/portlets/email_page/render.html.erb +17 -0
- data/app/views/portlets/forgot_password/_form.html.erb +5 -0
- data/app/views/portlets/forgot_password/render.html.erb +2 -0
- data/app/views/portlets/list/_form.html.erb +33 -0
- data/app/views/portlets/list/_list.html.erb +6 -0
- data/app/views/portlets/list/_table.html.erb +13 -0
- data/app/views/portlets/list/render.html.erb +1 -0
- data/app/views/portlets/login/_form.html.erb +4 -0
- data/app/views/portlets/login/render.html.erb +10 -0
- data/app/views/portlets/portlets/_form.html.erb +20 -0
- data/app/views/portlets/tag_cloud/_form.html.erb +4 -0
- data/app/views/portlets/tag_cloud/render.html.erb +5 -0
- data/app/views/tests/pretend/open_with_layout.html.erb +5 -0
- data/bin/bcms +321 -0
- data/bin/browsercms +4 -0
- data/bin/rake +16 -0
- data/config/routes.rb +135 -0
- data/db/browsercms.seeds.rb +63 -0
- data/db/migrate/20080815014337_browsercms300.rb +287 -0
- data/db/migrate/20130327184912_browsercms400.rb +120 -0
- data/db/migrate/20150715173336_create_default_users.rb +12 -0
- data/db/seeds.rb +1 -0
- data/doc/README_FOR_APP +6 -0
- data/doc/design/blue_button.psd +0 -0
- data/doc/design/gray_box.psd +0 -0
- data/doc/design/main_nav.psd +0 -0
- data/doc/features/design_integration.md +45 -0
- data/doc/features/external_user.md +7 -0
- data/doc/features/form_builder.md +40 -0
- data/doc/features/simple_form_refactor.md +60 -0
- data/doc/performance_tuning_notes.md +12 -0
- data/doc/release_notes.md +837 -0
- data/doc/test_procedure.txt +141 -0
- data/lib/acts_as_list.rb +257 -0
- data/lib/browsercms-artirix.rb +1 -0
- data/lib/browsercms.rb +73 -0
- data/lib/cms/acts/cms_user.rb +131 -0
- data/lib/cms/acts/content_block.rb +61 -0
- data/lib/cms/acts/content_page.rb +90 -0
- data/lib/cms/acts.rb +7 -0
- data/lib/cms/admin_tab.rb +15 -0
- data/lib/cms/attachments/attachment_serving.rb +59 -0
- data/lib/cms/attachments/configuration.rb +88 -0
- data/lib/cms/authentication/controller.rb +120 -0
- data/lib/cms/authentication/test_password_strategy.rb +28 -0
- data/lib/cms/authentication.rb +4 -0
- data/lib/cms/authoring.rb +9 -0
- data/lib/cms/behaviors/archiving.rb +43 -0
- data/lib/cms/behaviors/attaching.rb +363 -0
- data/lib/cms/behaviors/categorizing.rb +31 -0
- data/lib/cms/behaviors/connecting.rb +141 -0
- data/lib/cms/behaviors/dynamic_attributes.rb +384 -0
- data/lib/cms/behaviors/flush_cache_on_change.rb +31 -0
- data/lib/cms/behaviors/hiding.rb +46 -0
- data/lib/cms/behaviors/namespacing.rb +15 -0
- data/lib/cms/behaviors/naming.rb +16 -0
- data/lib/cms/behaviors/publishing.rb +205 -0
- data/lib/cms/behaviors/rendering.rb +195 -0
- data/lib/cms/behaviors/searching.rb +45 -0
- data/lib/cms/behaviors/soft_deleting.rb +103 -0
- data/lib/cms/behaviors/taggable.rb +66 -0
- data/lib/cms/behaviors/userstamping.rb +42 -0
- data/lib/cms/behaviors/versioning.rb +360 -0
- data/lib/cms/behaviors.rb +34 -0
- data/lib/cms/caching.rb +62 -0
- data/lib/cms/commands/actions.rb +107 -0
- data/lib/cms/commands/to_version400.rb +10 -0
- data/lib/cms/concerns/can_be_addressable.rb +326 -0
- data/lib/cms/concerns/has_content_type.rb +46 -0
- data/lib/cms/concerns/ignores_publishing.rb +9 -0
- data/lib/cms/concerns.rb +7 -0
- data/lib/cms/configuration/configurable_template.rb +24 -0
- data/lib/cms/configuration/devise.rb +256 -0
- data/lib/cms/configuration.rb +79 -0
- data/lib/cms/configure_simple_form.rb +142 -0
- data/lib/cms/configure_simple_form_bootstrap.rb +58 -0
- data/lib/cms/content_filter.rb +18 -0
- data/lib/cms/content_page.rb +77 -0
- data/lib/cms/content_rendering_support.rb +114 -0
- data/lib/cms/controllers/admin_controller.rb +78 -0
- data/lib/cms/data_loader.rb +54 -0
- data/lib/cms/date_picker.rb +23 -0
- data/lib/cms/default_accessible.rb +13 -0
- data/lib/cms/domain_support.rb +38 -0
- data/lib/cms/engine.rb +135 -0
- data/lib/cms/engine_helper.rb +103 -0
- data/lib/cms/error_handling.rb +84 -0
- data/lib/cms/error_pages.rb +8 -0
- data/lib/cms/extensions/action_view/base.rb +13 -0
- data/lib/cms/extensions/active_model/name.rb +13 -0
- data/lib/cms/extensions/active_record/base.rb +37 -0
- data/lib/cms/extensions/active_record/connection_adapters/abstract/schema_statements.rb +94 -0
- data/lib/cms/extensions/active_record/errors.rb +12 -0
- data/lib/cms/extensions/active_support/cache/file_store.rb +9 -0
- data/lib/cms/extensions/hash.rb +11 -0
- data/lib/cms/extensions/integer.rb +16 -0
- data/lib/cms/extensions/nil.rb +19 -0
- data/lib/cms/extensions/string.rb +24 -0
- data/lib/cms/extensions.rb +5 -0
- data/lib/cms/form_builder/content_block_form_builder.rb +45 -0
- data/lib/cms/form_builder/default_input.rb +13 -0
- data/lib/cms/form_builder/deprecated_inputs.rb +40 -0
- data/lib/cms/form_builder/workflow_buttons.rb +38 -0
- data/lib/cms/installation_actions.rb +8 -0
- data/lib/cms/mobile_aware.rb +67 -0
- data/lib/cms/module.rb +36 -0
- data/lib/cms/module_installation.rb +31 -0
- data/lib/cms/polymorphic_single_table_inheritance.rb +19 -0
- data/lib/cms/publish_workflow.rb +26 -0
- data/lib/cms/responders/content_responder.rb +14 -0
- data/lib/cms/route_extensions.rb +157 -0
- data/lib/cms/users_service.rb +208 -0
- data/lib/cms/version.rb +11 -0
- data/lib/command_line.rb +39 -0
- data/lib/generators/browser_cms/demo_site/USAGE +3 -0
- data/lib/generators/browser_cms/demo_site/templates/demo.seeds.rb +249 -0
- data/lib/generators/browser_cms/demo_site/templates/demo_site.rake +14 -0
- data/lib/generators/browser_cms/demo_site/templates/logo.jpg +0 -0
- data/lib/generators/browser_cms/demo_site/templates/splash.jpg +0 -0
- data/lib/generators/browser_cms/demo_site/templates/style.css +257 -0
- data/lib/generators/browser_cms.rb +12 -0
- data/lib/generators/cms/content_block/USAGE +22 -0
- data/lib/generators/cms/content_block/content_block_generator.rb +103 -0
- data/lib/generators/cms/content_block/templates/_form.html.erb +27 -0
- data/lib/generators/cms/content_block/templates/application_controller.rb.erb +4 -0
- data/lib/generators/cms/content_block/templates/render.html.erb +23 -0
- data/lib/generators/cms/install/USAGE +8 -0
- data/lib/generators/cms/install/install_generator.rb +16 -0
- data/lib/generators/cms/portlet/USAGE +26 -0
- data/lib/generators/cms/portlet/portlet_generator.rb +38 -0
- data/lib/generators/cms/portlet/templates/_form.html.erb +5 -0
- data/lib/generators/cms/portlet/templates/portlet.rb +12 -0
- data/lib/generators/cms/portlet/templates/portlet_helper.rb +5 -0
- data/lib/generators/cms/portlet/templates/render.html.erb +1 -0
- data/lib/generators/cms/portlet/templates/unit_test.erb +9 -0
- data/lib/generators/cms/project/USAGE +1 -0
- data/lib/generators/cms/project/templates/COPYRIGHT.txt +23 -0
- data/lib/generators/cms/project/templates/GPL.txt +674 -0
- data/lib/generators/cms/project/templates/LICENSE.txt +165 -0
- data/lib/generators/cms/project/templates/USAGE +3 -0
- data/lib/generators/cms/project/templates/devise.rb.erb +7 -0
- data/lib/generators/cms/project/templates/gitignore.erb +11 -0
- data/lib/generators/cms/project/templates/install_generator.erb +21 -0
- data/lib/generators/cms/project/templates/module_tasks.rake +10 -0
- data/lib/generators/cms/template/USAGE +10 -0
- data/lib/generators/cms/template/template_generator.rb +29 -0
- data/lib/generators/cms/template/templates/template.erb +2 -0
- data/lib/sequence.rb +6 -0
- data/lib/tasks/cms.rake +23 -0
- data/lib/templates/active_record/model/model.rb +17 -0
- data/vendor/assets/javascripts/jquery.cookie.js +91 -0
- data/vendor/assets/javascripts/jquery.selectbox.js +209 -0
- metadata +1048 -0
@@ -0,0 +1,326 @@
|
|
1
|
+
module Cms
|
2
|
+
module Concerns
|
3
|
+
module CanBeAddressable
|
4
|
+
|
5
|
+
# Adds Addressable behavior to a model. This allows models to be inserted into the sitemap, having parent
|
6
|
+
# sections. By default, this method is available to all ActiveRecord::Base classes.
|
7
|
+
#
|
8
|
+
# @params [Hash] options
|
9
|
+
# @option options [String] :path The base path where instances will be placed.
|
10
|
+
# @option options [String] :no_dynamic_path Set as true if the Record has a :path attribute managed as a column in the db. (Default: false)
|
11
|
+
# @option options [Symbol] :destroy_if Name of a custom method used to determine when this object should be destroyed. Rather than dependant: destroy to determine if the section node should be destroyed when this object is.
|
12
|
+
def is_addressable(options={})
|
13
|
+
has_one_options = {as: :node, inverse_of: :node, class_name: 'Cms::SectionNode', validate: true}
|
14
|
+
unless options[:destroy_if]
|
15
|
+
has_one_options[:dependent] = :destroy
|
16
|
+
else
|
17
|
+
before_destroy options[:destroy_if]
|
18
|
+
after_destroy :destroy_node
|
19
|
+
end
|
20
|
+
|
21
|
+
has_one :section_node, has_one_options
|
22
|
+
# For reasons that aren't clear, just using :autosave doesn't work.
|
23
|
+
after_save do
|
24
|
+
if section_node && section_node.changed?
|
25
|
+
section_node.save
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
after_validation do
|
30
|
+
# Copy errors from association for slug
|
31
|
+
if section_node && !section_node.valid?
|
32
|
+
section_node.errors[:slug].each do |message|
|
33
|
+
errors.add(:slug, message)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
include Cms::Concerns::Addressable
|
39
|
+
extend Cms::Concerns::Addressable::ClassMethods
|
40
|
+
include Cms::Concerns::Addressable::NodeAccessors
|
41
|
+
include Cms::Concerns::Addressable::MarkAsDirty
|
42
|
+
extend Cms::Configuration::ConfigurableTemplate
|
43
|
+
|
44
|
+
if options[:path]
|
45
|
+
@path = options[:path]
|
46
|
+
include GenericSitemapBehavior
|
47
|
+
end
|
48
|
+
|
49
|
+
@template = options[:template]
|
50
|
+
|
51
|
+
unless options[:no_dynamic_path]
|
52
|
+
include Addressable::DynamicPath
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# @return [Boolean] Until is_addressable is called, this will always be false.
|
57
|
+
def addressable?
|
58
|
+
false
|
59
|
+
end
|
60
|
+
|
61
|
+
# @return [Boolean] Some addressable content types don't require a slug.
|
62
|
+
def requires_slug?
|
63
|
+
false
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Implements behavior for displaying content blocks that should appear in the sitemap.
|
68
|
+
#
|
69
|
+
module GenericSitemapBehavior
|
70
|
+
def self.included(klass)
|
71
|
+
klass.before_validation :assign_parent_if_needed
|
72
|
+
end
|
73
|
+
|
74
|
+
def partial_for
|
75
|
+
"addressable_content_block"
|
76
|
+
end
|
77
|
+
|
78
|
+
def hidden?
|
79
|
+
false
|
80
|
+
end
|
81
|
+
|
82
|
+
def assign_parent_if_needed
|
83
|
+
unless parent || parent_id
|
84
|
+
new_parent = Cms::Section.with_path(self.class.path).first
|
85
|
+
|
86
|
+
unless new_parent
|
87
|
+
logger.warn "Creating default section for #{self.try(:display_name)} in #{self.class.path}."
|
88
|
+
section_attributes = {:name => self.class.name.demodulize.pluralize,
|
89
|
+
:path => self.class.path,
|
90
|
+
:hidden => true,
|
91
|
+
allow_groups: :all}
|
92
|
+
section_parent = Cms::Section.root.first
|
93
|
+
if section_parent
|
94
|
+
section_attributes[:parent] = section_parent
|
95
|
+
end
|
96
|
+
new_parent = Cms::Section.create!(section_attributes)
|
97
|
+
end
|
98
|
+
self.parent_id = new_parent.id
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
module Addressable
|
104
|
+
|
105
|
+
module ClassMethods
|
106
|
+
|
107
|
+
def requires_slug?
|
108
|
+
!@path.nil?
|
109
|
+
end
|
110
|
+
|
111
|
+
# The base path where new records will be added.
|
112
|
+
# @return [String]
|
113
|
+
def path
|
114
|
+
@path
|
115
|
+
end
|
116
|
+
|
117
|
+
# @return [Boolean] Once is_addressable is called, this will always be true.
|
118
|
+
def addressable?
|
119
|
+
true
|
120
|
+
end
|
121
|
+
|
122
|
+
def calculate_path(slug)
|
123
|
+
"#{self.path}/#{slug}"
|
124
|
+
end
|
125
|
+
|
126
|
+
# Used in UI forms to show what the complete URL will look like with a slug added to it.
|
127
|
+
def base_path
|
128
|
+
"#{self.path}/"
|
129
|
+
end
|
130
|
+
|
131
|
+
# Find an addressable object with the given content type.
|
132
|
+
#
|
133
|
+
# @param [String] slug
|
134
|
+
# @return [Addressable] The content block with that slug (if it exists). Nil otherwise
|
135
|
+
def with_slug(slug)
|
136
|
+
section_node = SectionNode.where(slug: slug).where(node_type: self.name).first
|
137
|
+
section_node ? section_node.node : nil
|
138
|
+
end
|
139
|
+
|
140
|
+
# Returns the layout (Page Template) that should be used to render instances of this content.
|
141
|
+
# Can be specified as is_addressable template: 'subpage'
|
142
|
+
# @return [String] template/default unless template was set.
|
143
|
+
def layout
|
144
|
+
normalize_layout(self, @template)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
module DynamicPath
|
149
|
+
|
150
|
+
# @return [String] The relative path to this content
|
151
|
+
def path
|
152
|
+
self.class.calculate_path(slug)
|
153
|
+
end
|
154
|
+
|
155
|
+
def slug
|
156
|
+
if section_node
|
157
|
+
section_node.slug
|
158
|
+
else
|
159
|
+
nil
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
def slug=(slug)
|
164
|
+
if section_node
|
165
|
+
section_node.slug = slug
|
166
|
+
else
|
167
|
+
@slug = slug # Store temporarily until there is a section_node created.
|
168
|
+
end
|
169
|
+
dirty!
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Resources are accessible to guests if their parent section is. Variables are passed in for performance reasons
|
174
|
+
# since this gets called 'MANY' times on the sitemap.
|
175
|
+
#
|
176
|
+
# @param [Array<Section>] public_sections
|
177
|
+
# @param [Section] parent
|
178
|
+
def accessible_to_guests?(public_sections, parent)
|
179
|
+
public_sections.include?(parent)
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns all classes which need a custom route to show themselves.
|
183
|
+
def self.classes_that_require_custom_routes
|
184
|
+
descendants.select { |klass| klass.path != nil }
|
185
|
+
end
|
186
|
+
|
187
|
+
# List of all classes that can be in the sitemap.
|
188
|
+
#
|
189
|
+
# @return [Array<Class>] Returns all classes which inherit from Cms::Concerns::Addressable
|
190
|
+
def self.descendants
|
191
|
+
ObjectSpace.each_object(::Class).select { |klass| klass < Cms::Concerns::Addressable }
|
192
|
+
end
|
193
|
+
|
194
|
+
# Allows for manual destruction of node
|
195
|
+
def destroy_node
|
196
|
+
node.destroy
|
197
|
+
end
|
198
|
+
|
199
|
+
# Whether or not this content is the 'landing' page for its section.
|
200
|
+
#
|
201
|
+
# @return [Boolean] false always, since a content block won't ever be the landing page for the section
|
202
|
+
def landing_page?
|
203
|
+
false
|
204
|
+
end
|
205
|
+
|
206
|
+
# Returns the value that will appear in the <title> element of the page when this content is rendered.
|
207
|
+
# Subclasses can override this.
|
208
|
+
#
|
209
|
+
# @return [String]
|
210
|
+
# @example Override the page title
|
211
|
+
# class MyWidget < ActiveRecord::Base
|
212
|
+
# def page_title
|
213
|
+
# "My Widget | #{name}"
|
214
|
+
# end
|
215
|
+
# end
|
216
|
+
def page_title
|
217
|
+
name
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns a list of all Addressable objects that are ancestors to this record.
|
221
|
+
# @param [Hash] options
|
222
|
+
# @option [Symbol] :include_self If this object should be included in the Array
|
223
|
+
# @return [Array<Addressable>] Or [] if no ancestors and/or has no parent.
|
224
|
+
#
|
225
|
+
def ancestors(options={})
|
226
|
+
return [] unless node
|
227
|
+
ancestor_nodes = node.ancestors
|
228
|
+
ancestors = ancestor_nodes.collect { |node| node.node }
|
229
|
+
ancestors << self if options[:include_self]
|
230
|
+
ancestors
|
231
|
+
end
|
232
|
+
|
233
|
+
def parent
|
234
|
+
@parent if @parent
|
235
|
+
node ? node.section : nil
|
236
|
+
end
|
237
|
+
|
238
|
+
def cache_parent(section)
|
239
|
+
@parent = section
|
240
|
+
end
|
241
|
+
|
242
|
+
def parent_id
|
243
|
+
parent.try(:id)
|
244
|
+
end
|
245
|
+
|
246
|
+
def parent_id=(id)
|
247
|
+
self.parent = Cms::Section.find(id)
|
248
|
+
# Handles slug being set before there is a parent
|
249
|
+
if @slug
|
250
|
+
self.slug = @slug
|
251
|
+
@slug = nil
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
def parent=(sec)
|
256
|
+
if node
|
257
|
+
node.move_to_end(sec)
|
258
|
+
else
|
259
|
+
build_section_node(:node_id => self.id, :section => sec)
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
# Computes the name of the partial used to render this object in the sitemap.
|
264
|
+
def partial_for
|
265
|
+
self.class.name.demodulize.underscore
|
266
|
+
end
|
267
|
+
|
268
|
+
# alias :node, :section_node
|
269
|
+
module NodeAccessors
|
270
|
+
def node
|
271
|
+
section_node
|
272
|
+
end
|
273
|
+
|
274
|
+
def node=(n)
|
275
|
+
self.section_node = n
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
# These exist for backwards compatibility to avoid having to change tests.
|
280
|
+
# I want to get rid of these in favor of parent and parent_id
|
281
|
+
module DeprecatedPageAccessors
|
282
|
+
|
283
|
+
def self.included(model_class)
|
284
|
+
#model_class.attr_accessible :section_id, :section
|
285
|
+
end
|
286
|
+
|
287
|
+
|
288
|
+
def build_node(opts)
|
289
|
+
build_section_node(opts)
|
290
|
+
end
|
291
|
+
|
292
|
+
def section_id
|
293
|
+
section ? section.id : nil
|
294
|
+
end
|
295
|
+
|
296
|
+
def section_id=(sec_id)
|
297
|
+
self.section = Section.find(sec_id)
|
298
|
+
end
|
299
|
+
|
300
|
+
def section
|
301
|
+
parent
|
302
|
+
end
|
303
|
+
|
304
|
+
def section=(sec)
|
305
|
+
self.parent = sec
|
306
|
+
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
# Allows records to be marked as being changed, which can be called to trigger updates when
|
311
|
+
# associated objects may have been changed.
|
312
|
+
module MarkAsDirty
|
313
|
+
# Forces this record to be changed, even if nothing has changed
|
314
|
+
# This is necessary if just the section.id has changed, for example
|
315
|
+
# test if this is necessary now that the attributes are in the
|
316
|
+
# model itself.
|
317
|
+
def dirty!
|
318
|
+
# Seems like a hack, is there a better way?
|
319
|
+
self.updated_at = Time.now
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
324
|
+
|
325
|
+
end
|
326
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Cms
|
2
|
+
module Concerns
|
3
|
+
module HasContentType
|
4
|
+
|
5
|
+
# Adds ContentType information to the object.
|
6
|
+
# @param [Hash] options
|
7
|
+
# @option options [Symbol] :module The module name, same as would be passed to content_module()
|
8
|
+
def has_content_type(options={})
|
9
|
+
include InstanceMethods
|
10
|
+
extend ClassMethods
|
11
|
+
|
12
|
+
if options[:module]
|
13
|
+
content_module options[:module]
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
# Used as a marker for finding classes that implement Content Types.
|
19
|
+
module InstanceMethods
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
module ClassMethods
|
24
|
+
|
25
|
+
# Returns the Cms::ContentType which provides information about the content.
|
26
|
+
def content_type
|
27
|
+
Cms::ContentType.new(name: self.name)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Allows a content block to configure which module it will be placed in.
|
31
|
+
# @param [Symbol] module_name (Optional) Sets value if provided.
|
32
|
+
# @return [Symbol] module_name
|
33
|
+
def content_module(module_name=nil)
|
34
|
+
if module_name
|
35
|
+
@module_name = module_name
|
36
|
+
end
|
37
|
+
if @module_name
|
38
|
+
@module_name
|
39
|
+
else
|
40
|
+
:general
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Allows content types (like Category) to be handled as blocks.
|
2
|
+
# Intended as temporary
|
3
|
+
module Cms::Concerns::IgnoresPublishing
|
4
|
+
|
5
|
+
# Needs due to content controller automatically setting a default 'publish_on_save: false' when creating content.
|
6
|
+
def self.included(klass)
|
7
|
+
klass.send :attr_accessor, :publish_on_save
|
8
|
+
end
|
9
|
+
end
|
data/lib/cms/concerns.rb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Each concern should be automatically added to each ActiveRecord class using extend.
|
2
|
+
module Cms::Concerns; end
|
3
|
+
|
4
|
+
Dir["#{File.dirname(__FILE__)}/concerns/*.rb"].each do |b|
|
5
|
+
require File.join("cms", "concerns", File.basename(b, ".rb"))
|
6
|
+
ActiveRecord::Base.extend "Cms::Concerns::#{File.basename(b, ".rb").camelize}".constantize
|
7
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Cms
|
2
|
+
module Configuration
|
3
|
+
|
4
|
+
# Handles content that has configurable templates. Use the following rails configuration:
|
5
|
+
#
|
6
|
+
# config.cms.templates['cms/form'] = 'my-form-layout'
|
7
|
+
# config.cms.templates['cms/sites/sessions_controller'] = :subpage
|
8
|
+
module ConfigurableTemplate
|
9
|
+
|
10
|
+
# Given a class name return a layout file path.
|
11
|
+
# Looks in app.config.cms.templates first, then for the explicit_template
|
12
|
+
def normalize_layout(klass, explicit_template)
|
13
|
+
found = Rails.configuration.cms.templates[klass.name.underscore]
|
14
|
+
if found
|
15
|
+
"templates/#{found}"
|
16
|
+
elsif explicit_template
|
17
|
+
"templates/#{explicit_template}"
|
18
|
+
else
|
19
|
+
"templates/default"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,256 @@
|
|
1
|
+
# Happens before configuration in applications, so these values can be overridden.
|
2
|
+
Devise.setup do |config|
|
3
|
+
|
4
|
+
# Tells devise to use routing instructions in Cms::Engine.
|
5
|
+
# See https://github.com/plataformatec/devise/wiki/How-To:-Use-devise-inside-a-mountable-engine for details.
|
6
|
+
config.router_name = :cms
|
7
|
+
|
8
|
+
# BrowserCMS apps will have their own secret_key.
|
9
|
+
#config.secret_key = ''
|
10
|
+
|
11
|
+
# ==> Mailer Configuration
|
12
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
13
|
+
# note that it will be overwritten if you use your own mailer class
|
14
|
+
# with default "from" parameter.
|
15
|
+
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
16
|
+
|
17
|
+
# Configure the class responsible to send e-mails.
|
18
|
+
# config.mailer = 'Devise::Mailer'
|
19
|
+
|
20
|
+
# ==> ORM configuration
|
21
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
22
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
23
|
+
# available as additional gems.
|
24
|
+
require 'devise/orm/active_record'
|
25
|
+
|
26
|
+
# ==> Configuration for any authentication mechanism
|
27
|
+
# Configure which keys are used when authenticating a user. The default is
|
28
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
29
|
+
# authenticating a user, both parameters are required. Remember that those
|
30
|
+
# parameters are used only when authenticating and not when retrieving from
|
31
|
+
# session. If you need permissions, you should implement that in a before filter.
|
32
|
+
# You can also supply a hash where the value is a boolean determining whether
|
33
|
+
# or not authentication should be aborted when the value is not present.
|
34
|
+
config.authentication_keys = [ :login ]
|
35
|
+
|
36
|
+
# Configure parameters from the request object used for authentication. Each entry
|
37
|
+
# given should be a request method and it will automatically be passed to the
|
38
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
39
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
40
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
41
|
+
# config.request_keys = []
|
42
|
+
|
43
|
+
# Configure which authentication keys should be case-insensitive.
|
44
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
45
|
+
# to authenticate or find a user. Default is :email.
|
46
|
+
config.case_insensitive_keys = [ :login ]
|
47
|
+
|
48
|
+
# Configure which authentication keys should have whitespace stripped.
|
49
|
+
# These keys will have whitespace before and after removed upon creating or
|
50
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
51
|
+
config.strip_whitespace_keys = [ :login ]
|
52
|
+
|
53
|
+
# Tell if authentication through request.params is enabled. True by default.
|
54
|
+
# It can be set to an array that will enable params authentication only for the
|
55
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
56
|
+
# enable it only for database (email + password) authentication.
|
57
|
+
# config.params_authenticatable = true
|
58
|
+
|
59
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
60
|
+
# It can be set to an array that will enable http authentication only for the
|
61
|
+
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
62
|
+
# enable it only for database authentication. The supported strategies are:
|
63
|
+
# :database = Support basic authentication with authentication key + password
|
64
|
+
# config.http_authenticatable = false
|
65
|
+
|
66
|
+
# If http headers should be returned for AJAX requests. True by default.
|
67
|
+
# config.http_authenticatable_on_xhr = true
|
68
|
+
|
69
|
+
# The realm used in Http Basic Authentication. 'Application' by default.
|
70
|
+
# config.http_authentication_realm = 'Application'
|
71
|
+
|
72
|
+
# It will change confirmation, password recovery and other workflows
|
73
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
74
|
+
# Does not affect registerable.
|
75
|
+
# config.paranoid = true
|
76
|
+
|
77
|
+
# By default Devise will store the user in session. You can skip storage for
|
78
|
+
# particular strategies by setting this option.
|
79
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
80
|
+
# may want to disable generating routes to Devise's sessions controller by
|
81
|
+
# passing :skip => :sessions to `devise_for` in your config/routes.rb
|
82
|
+
config.skip_session_storage = [:http_auth]
|
83
|
+
|
84
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
85
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
86
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
87
|
+
# from the server. You can disable this option at your own risk.
|
88
|
+
# config.clean_up_csrf_token_on_authentication = true
|
89
|
+
|
90
|
+
# ==> Configuration for :database_authenticatable
|
91
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
92
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
93
|
+
#
|
94
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
95
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
96
|
+
# a value less than 10 in other environments.
|
97
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
98
|
+
|
99
|
+
# Setup a pepper to generate the encrypted password.
|
100
|
+
# config.pepper = '51e7553dae80619e2250975968e7ac4d42519f981ea000f0f2fffbce0cd5e0c0e2229e228aec17fb051498f25ae827c2195bcc3bbdd2a68722758579f9ef0024'
|
101
|
+
|
102
|
+
# ==> Configuration for :confirmable
|
103
|
+
# A period that the user is allowed to access the website even without
|
104
|
+
# confirming his account. For instance, if set to 2.days, the user will be
|
105
|
+
# able to access the website for two days without confirming his account,
|
106
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
107
|
+
# the user cannot access the website without confirming his account.
|
108
|
+
# config.allow_unconfirmed_access_for = 2.days
|
109
|
+
|
110
|
+
# A period that the user is allowed to confirm their account before their
|
111
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
112
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
113
|
+
# their account can't be confirmed with the token any more.
|
114
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
115
|
+
# before confirming their account.
|
116
|
+
# config.confirm_within = 3.days
|
117
|
+
|
118
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
119
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
120
|
+
# db field (see migrations). Until confirmed new email is stored in
|
121
|
+
# unconfirmed email column, and copied to email column on successful confirmation.
|
122
|
+
config.reconfirmable = true
|
123
|
+
|
124
|
+
# Defines which key will be used when confirming an account
|
125
|
+
# config.confirmation_keys = [ :email ]
|
126
|
+
|
127
|
+
# ==> Configuration for :rememberable
|
128
|
+
# The time the user will be remembered without asking for credentials again.
|
129
|
+
# config.remember_for = 2.weeks
|
130
|
+
|
131
|
+
# If true, extends the user's remember period when remembered via cookie.
|
132
|
+
# config.extend_remember_period = false
|
133
|
+
|
134
|
+
# Options to be passed to the created cookie. For instance, you can set
|
135
|
+
# :secure => true in order to force SSL only cookies.
|
136
|
+
# config.rememberable_options = {}
|
137
|
+
|
138
|
+
# ==> Configuration for :validatable
|
139
|
+
# Range for password length. Default is 8..128.
|
140
|
+
config.password_length = 8..128
|
141
|
+
|
142
|
+
# Email regex used to validate email formats. It simply asserts that
|
143
|
+
# one (and only one) @ exists in the given string. This is mainly
|
144
|
+
# to give user feedback and not to assert the e-mail validity.
|
145
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
146
|
+
|
147
|
+
# ==> Configuration for :timeoutable
|
148
|
+
# The time you want to timeout the user session without activity. After this
|
149
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
150
|
+
# config.timeout_in = 30.minutes
|
151
|
+
|
152
|
+
# If true, expires auth token on session timeout.
|
153
|
+
# config.expire_auth_token_on_timeout = false
|
154
|
+
|
155
|
+
# ==> Configuration for :lockable
|
156
|
+
# Defines which strategy will be used to lock an account.
|
157
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
158
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
159
|
+
# config.lock_strategy = :failed_attempts
|
160
|
+
|
161
|
+
# Defines which key will be used when locking and unlocking an account
|
162
|
+
# config.unlock_keys = [ :email ]
|
163
|
+
|
164
|
+
# Defines which strategy will be used to unlock an account.
|
165
|
+
# :email = Sends an unlock link to the user email
|
166
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
167
|
+
# :both = Enables both strategies
|
168
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
169
|
+
# config.unlock_strategy = :both
|
170
|
+
|
171
|
+
# Number of authentication tries before locking an account if lock_strategy
|
172
|
+
# is failed attempts.
|
173
|
+
# config.maximum_attempts = 20
|
174
|
+
|
175
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
176
|
+
# config.unlock_in = 1.hour
|
177
|
+
|
178
|
+
# Warn on the last attempt before the account is locked.
|
179
|
+
# config.last_attempt_warning = false
|
180
|
+
|
181
|
+
# ==> Configuration for :recoverable
|
182
|
+
#
|
183
|
+
# Defines which key will be used when recovering the password for an account
|
184
|
+
# config.reset_password_keys = [ :email ]
|
185
|
+
|
186
|
+
# Time interval you can reset your password with a reset password key.
|
187
|
+
# Don't put a too small interval or your users won't have the time to
|
188
|
+
# change their passwords.
|
189
|
+
config.reset_password_within = 6.hours
|
190
|
+
|
191
|
+
# ==> Configuration for :encryptable
|
192
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
193
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
194
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
195
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
196
|
+
# REST_AUTH_SITE_KEY to pepper).
|
197
|
+
#
|
198
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
199
|
+
# config.encryptor = :sha512
|
200
|
+
|
201
|
+
# ==> Scopes configuration
|
202
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
203
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
204
|
+
# are using only default views.
|
205
|
+
# config.scoped_views = false
|
206
|
+
|
207
|
+
# Configure the default scope given to Warden. By default it's the first
|
208
|
+
# devise role declared in your routes (usually :user).
|
209
|
+
# config.default_scope = :user
|
210
|
+
|
211
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
212
|
+
# only the current scope. By default, Devise signs out all scopes.
|
213
|
+
# config.sign_out_all_scopes = true
|
214
|
+
|
215
|
+
# ==> Navigation configuration
|
216
|
+
# Lists the formats that should be treated as navigational. Formats like
|
217
|
+
# :html, should redirect to the sign in page when the user does not have
|
218
|
+
# access, but formats like :xml or :json, should return 401.
|
219
|
+
#
|
220
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
221
|
+
# should add them to the navigational formats lists.
|
222
|
+
#
|
223
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
224
|
+
# config.navigational_formats = ['*/*', :html]
|
225
|
+
|
226
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
227
|
+
config.sign_out_via = :delete
|
228
|
+
|
229
|
+
# ==> OmniAuth
|
230
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
231
|
+
# up on your models and hooks.
|
232
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
233
|
+
|
234
|
+
# ==> Warden configuration
|
235
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
236
|
+
# change the failure app, you can configure them inside the config.warden block.
|
237
|
+
#
|
238
|
+
# config.warden do |manager|
|
239
|
+
# manager.intercept_401 = false
|
240
|
+
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
241
|
+
# end
|
242
|
+
|
243
|
+
# ==> Mountable engine configurations
|
244
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
245
|
+
# is mountable, there are some extra configurations to be taken into account.
|
246
|
+
# The following options are available, assuming the engine is mounted as:
|
247
|
+
#
|
248
|
+
# mount MyEngine, at: '/my_engine'
|
249
|
+
#
|
250
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
251
|
+
# config.router_name = :my_engine
|
252
|
+
#
|
253
|
+
# When using omniauth, Devise cannot automatically set Omniauth path,
|
254
|
+
# so you need to do it manually. For the users scope, it would be:
|
255
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
256
|
+
end
|