alchemy_cms 2.5.3.1 → 2.6.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/.travis.yml +5 -13
- data/Gemfile +6 -3
- data/README.md +3 -2
- data/alchemy_cms.gemspec +22 -22
- data/app/assets/fonts/alchemy-icons.eot +0 -0
- data/app/assets/fonts/alchemy-icons.svg +54 -0
- data/app/assets/fonts/alchemy-icons.ttf +0 -0
- data/app/assets/fonts/alchemy-icons.woff +0 -0
- data/app/assets/images/alchemy/icons.png +0 -0
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +151 -0
- data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +3 -2
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js.coffee +31 -0
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +1 -1
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +98 -0
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +23 -24
- data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +27 -0
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +11 -8
- data/app/assets/javascripts/alchemy/alchemy.hotkeys.js.coffee +32 -0
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js.coffee +46 -0
- data/app/assets/javascripts/alchemy/alchemy.js +8 -2
- data/app/assets/javascripts/alchemy/alchemy.link_overlay.js.coffee +5 -4
- data/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee +49 -0
- data/app/assets/javascripts/alchemy/alchemy.onload.js.coffee +3 -0
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +71 -0
- data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +61 -0
- data/app/assets/javascripts/alchemy/alchemy.spinner.js.coffee +35 -0
- data/app/assets/javascripts/alchemy/alchemy.string_extension.js.coffee +11 -0
- data/app/assets/javascripts/alchemy/alchemy.windows.js.coffee +278 -0
- data/app/assets/stylesheets/alchemy/admin.css.scss +2 -0
- data/app/assets/stylesheets/alchemy/archive.scss +109 -65
- data/app/assets/stylesheets/alchemy/base.scss +16 -188
- data/app/assets/stylesheets/alchemy/dashboard.scss +2 -2
- data/app/assets/stylesheets/alchemy/defaults.scss +2 -1
- data/app/assets/stylesheets/alchemy/elements.scss +58 -94
- data/app/assets/stylesheets/alchemy/errors.scss +2 -2
- data/app/assets/stylesheets/alchemy/{mixins.scss → extends.scss} +104 -80
- data/app/assets/stylesheets/alchemy/flash.scss +4 -6
- data/app/assets/stylesheets/alchemy/fonts.scss +46 -0
- data/app/assets/stylesheets/alchemy/form_elements.scss +46 -45
- data/app/assets/stylesheets/alchemy/frame.scss +20 -15
- data/app/assets/stylesheets/alchemy/icons.scss +22 -9
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +476 -399
- data/app/assets/stylesheets/alchemy/login.scss +1 -1
- data/app/assets/stylesheets/alchemy/menubar.css.scss +1 -1
- data/app/assets/stylesheets/alchemy/notices.scss +5 -5
- data/app/assets/stylesheets/alchemy/pagination.scss +25 -13
- data/app/assets/stylesheets/alchemy/search.scss +29 -17
- data/app/assets/stylesheets/alchemy/sitemap.scss +41 -36
- data/app/assets/stylesheets/alchemy/tables.scss +102 -50
- data/app/assets/stylesheets/alchemy/tinymce_dialog.css.scss +18 -16
- data/app/assets/stylesheets/alchemy/toolbar.scss +84 -24
- data/app/assets/stylesheets/alchemy/upload.scss +14 -9
- data/app/assets/stylesheets/alchemy/variables.scss +1 -0
- data/app/assets/stylesheets/tiny_mce/plugins/inlinepopups/skins/alchemy/window.css.scss +18 -21
- data/app/controllers/alchemy/admin/attachments_controller.rb +29 -39
- data/app/controllers/alchemy/admin/base_controller.rb +3 -9
- data/app/controllers/alchemy/admin/clipboard_controller.rb +1 -1
- data/app/controllers/alchemy/admin/contents_controller.rb +1 -1
- data/app/controllers/alchemy/admin/dashboard_controller.rb +1 -1
- data/app/controllers/alchemy/admin/elements_controller.rb +3 -3
- data/app/controllers/alchemy/admin/essence_files_controller.rb +1 -1
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +5 -5
- data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +18 -16
- data/app/controllers/alchemy/admin/pictures_controller.rb +11 -10
- data/app/controllers/alchemy/admin/resources_controller.rb +87 -14
- data/app/controllers/alchemy/admin/tags_controller.rb +3 -3
- data/app/controllers/alchemy/admin/trash_controller.rb +3 -3
- data/app/controllers/alchemy/admin/users_controller.rb +6 -11
- data/app/controllers/alchemy/attachments_controller.rb +8 -9
- data/app/controllers/alchemy/base_controller.rb +17 -10
- data/app/controllers/alchemy/pages_controller.rb +7 -19
- data/app/controllers/alchemy/passwords_controller.rb +15 -3
- data/app/controllers/alchemy/user_sessions_controller.rb +5 -4
- data/app/controllers/alchemy/users_controller.rb +1 -1
- data/app/helpers/alchemy/admin/attachments_helper.rb +2 -2
- data/app/helpers/alchemy/admin/base_helper.rb +62 -90
- data/app/helpers/alchemy/admin/elements_helper.rb +13 -5
- data/app/helpers/alchemy/admin/essences_helper.rb +3 -5
- data/app/helpers/alchemy/admin/pages_helper.rb +6 -3
- data/app/helpers/alchemy/admin/tags_helper.rb +60 -0
- data/app/helpers/alchemy/base_helper.rb +16 -20
- data/app/helpers/alchemy/elements_helper.rb +7 -11
- data/app/helpers/alchemy/essences_helper.rb +2 -2
- data/app/helpers/alchemy/pages_helper.rb +31 -69
- data/app/helpers/alchemy/url_helper.rb +11 -3
- data/app/models/alchemy/attachment.rb +73 -45
- data/app/models/alchemy/cell.rb +1 -1
- data/app/models/alchemy/content.rb +20 -9
- data/app/models/alchemy/element.rb +9 -7
- data/app/models/alchemy/page.rb +15 -248
- data/app/models/alchemy/page/cells.rb +71 -0
- data/app/models/alchemy/page/elements.rb +147 -0
- data/app/models/alchemy/page/naming.rb +90 -0
- data/app/models/alchemy/picture.rb +18 -13
- data/app/models/alchemy/tag.rb +1 -1
- data/app/models/alchemy/user.rb +38 -6
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +14 -7
- data/app/views/alchemy/admin/attachments/_attachment.html.erb +17 -12
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +3 -8
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +20 -12
- data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +11 -0
- data/app/views/alchemy/admin/attachments/_tag_list.html.erb +31 -0
- data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +4 -0
- data/app/views/alchemy/admin/attachments/edit.html.erb +8 -7
- data/app/views/alchemy/admin/attachments/index.html.erb +19 -12
- data/app/views/alchemy/admin/attachments/new.html.erb +2 -2
- data/app/views/alchemy/admin/attachments/show.html.erb +3 -0
- data/app/views/alchemy/admin/contents/_missing.html.erb +4 -4
- data/app/views/alchemy/admin/contents/create.js.erb +1 -1
- data/app/views/alchemy/admin/contents/new.html.erb +6 -3
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/_users.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/index.html.erb +3 -3
- data/app/views/alchemy/admin/dashboard/info.html.erb +16 -13
- data/app/views/alchemy/admin/elements/_add_picture.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_element_foot.html.erb +4 -4
- data/app/views/alchemy/admin/elements/_element_head.html.erb +1 -7
- data/app/views/alchemy/admin/elements/_elements_select.html.erb +2 -2
- data/app/views/alchemy/admin/elements/_new_element_form.html.erb +4 -4
- data/app/views/alchemy/admin/elements/_picture_gallery_editor.html.erb +1 -1
- data/app/views/alchemy/admin/elements/create.js.erb +2 -2
- data/app/views/alchemy/admin/elements/fold.js.erb +3 -6
- data/app/views/alchemy/admin/elements/new.html.erb +1 -1
- data/app/views/alchemy/admin/elements/order.js.erb +1 -1
- data/app/views/alchemy/admin/elements/trash.js.erb +1 -1
- data/app/views/alchemy/admin/elements/update.js.erb +2 -2
- data/app/views/alchemy/admin/essence_files/edit.html.erb +4 -4
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +17 -18
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +2 -2
- data/app/views/alchemy/admin/essence_pictures/update.js.erb +1 -0
- data/app/views/alchemy/admin/languages/_form.html.erb +12 -10
- data/app/views/alchemy/admin/languages/_language.html.erb +2 -1
- data/app/views/alchemy/admin/languages/_table.html.erb +3 -3
- data/app/views/alchemy/admin/languages/index.html.erb +15 -15
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +6 -6
- data/app/views/alchemy/admin/layoutpages/index.html.erb +41 -40
- data/app/views/alchemy/admin/pages/_contactform_links.html.erb +4 -4
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +6 -6
- data/app/views/alchemy/admin/pages/_external_link.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_file_link.html.erb +3 -3
- data/app/views/alchemy/admin/pages/_internal_link.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page.html.erb +13 -13
- data/app/views/alchemy/admin/pages/_page_for_links.html.erb +2 -4
- data/app/views/alchemy/admin/pages/_sitemap.html.erb +5 -0
- data/app/views/alchemy/admin/pages/configure.html.erb +7 -7
- data/app/views/alchemy/admin/pages/configure_external.html.erb +4 -4
- data/app/views/alchemy/admin/pages/edit.html.erb +23 -30
- data/app/views/alchemy/admin/pages/index.html.erb +34 -23
- data/app/views/alchemy/admin/pages/new.html.erb +1 -1
- data/app/views/alchemy/admin/pages/sort.js.erb +1 -1
- data/app/views/alchemy/admin/partials/_flash_upload.html.erb +2 -3
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +2 -2
- data/app/views/alchemy/admin/partials/_search_form.html.erb +3 -3
- data/app/views/alchemy/admin/partials/_upload_form.html.erb +2 -2
- data/app/views/alchemy/admin/pictures/_archive.html.erb +7 -7
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +6 -6
- data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +4 -4
- data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_picture.html.erb +3 -8
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +9 -14
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +27 -25
- data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +3 -1
- data/app/views/alchemy/admin/pictures/index.html.erb +49 -42
- data/app/views/alchemy/admin/pictures/new.html.erb +2 -2
- data/app/views/alchemy/admin/pictures/show.html.erb +11 -0
- data/app/views/alchemy/admin/resources/_boolean.html.erb +2 -2
- data/app/views/alchemy/admin/resources/_datetime.html.erb +2 -2
- data/app/views/alchemy/admin/resources/_form.html.erb +9 -8
- data/app/views/alchemy/admin/resources/_resource.html.erb +15 -21
- data/app/views/alchemy/admin/resources/_string.html.erb +2 -2
- data/app/views/alchemy/admin/resources/_table.html.erb +11 -13
- data/app/views/alchemy/admin/resources/_text.html.erb +2 -2
- data/app/views/alchemy/admin/resources/index.csv.erb +13 -0
- data/app/views/alchemy/admin/resources/index.html.erb +24 -15
- data/app/views/alchemy/admin/sites/index.html.erb +23 -0
- data/app/views/alchemy/admin/tags/_radio_tag.html.erb +1 -1
- data/app/views/alchemy/admin/tags/_tag.html.erb +2 -1
- data/app/views/alchemy/admin/tags/edit.html.erb +1 -1
- data/app/views/alchemy/admin/tags/index.html.erb +16 -11
- data/app/views/alchemy/admin/tags/new.html.erb +3 -3
- data/app/views/alchemy/admin/trash/clear.js.coffee +1 -1
- data/app/views/alchemy/admin/users/_table.html.erb +12 -5
- data/app/views/alchemy/admin/users/_user.html.erb +16 -16
- data/app/views/alchemy/admin/users/index.html.erb +28 -16
- data/app/views/alchemy/breadcrumb/_page.html.erb +15 -0
- data/app/views/alchemy/breadcrumb/_spacer.html.erb +1 -0
- data/app/views/alchemy/elements/_editor_not_found.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +16 -16
- data/app/views/alchemy/essences/_essence_file_view.html.erb +8 -9
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +3 -6
- data/app/views/alchemy/essences/_essence_picture_tools.html.erb +9 -8
- data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +0 -5
- data/app/views/alchemy/essences/_linkable_essence_tools.html.erb +2 -2
- data/app/views/alchemy/navigation/_link.html.erb +7 -7
- data/app/views/alchemy/navigation/_renderer.html.erb +29 -36
- data/app/views/alchemy/notifications/admin_user_created.de.text.erb +5 -1
- data/app/views/alchemy/notifications/admin_user_created.en.text.erb +5 -1
- data/app/views/alchemy/notifications/registered_user_created.de.text.erb +13 -0
- data/app/views/alchemy/notifications/registered_user_created.en.text.erb +13 -0
- data/app/views/alchemy/search/_result.html.erb +4 -6
- data/app/views/alchemy/search/_results.html.erb +4 -5
- data/app/views/alchemy/user_sessions/leave.html.erb +1 -1
- data/app/views/alchemy/user_sessions/new.html.erb +2 -2
- data/app/views/kaminari/_first_page.html.erb +11 -0
- data/app/views/kaminari/_gap.html.erb +1 -1
- data/app/views/kaminari/_last_page.html.erb +11 -0
- data/app/views/kaminari/_next_page.html.erb +2 -2
- data/app/views/kaminari/_page.html.erb +1 -1
- data/app/views/kaminari/_paginator.html.erb +2 -0
- data/app/views/kaminari/_prev_page.html.erb +2 -2
- data/app/views/layouts/alchemy/admin.html.erb +4 -5
- data/config/alchemy/config.yml +8 -12
- data/config/authorization_rules.rb +4 -3
- data/config/initializers/dragonfly.rb +20 -12
- data/config/locales/alchemy.de.yml +20 -15
- data/config/locales/alchemy.en.yml +15 -10
- data/config/locales/devise.de.yml +1 -0
- data/config/routes.rb +3 -3
- data/{spec/dummy/db/migrate/20121118000000_alchemy_two_point_four.rb → db/migrate/20130214233001_alchemy_two_point_five.rb} +50 -36
- data/db/migrate/20130221200514_migrate_attachments_to_dragonfly.rb +21 -0
- data/db/migrate/20130312205327_change_alchemy_users_role_to_roles.rb +11 -0
- data/lib/alchemy/capistrano.rb +10 -8
- data/lib/alchemy/errors.rb +7 -0
- data/lib/alchemy/filetypes.rb +33 -0
- data/lib/alchemy/i18n.rb +9 -1
- data/lib/alchemy/name_conversions.rb +28 -0
- data/lib/alchemy/page_layout.rb +5 -3
- data/lib/alchemy/resource.rb +132 -29
- data/lib/alchemy/resources_helper.rb +81 -12
- data/lib/alchemy/upgrader.rb +14 -276
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +17 -2
- data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +1 -1
- data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +1 -1
- data/lib/tasks/alchemy/convert.rake +39 -0
- data/lib/tasks/alchemy/install.rake +4 -6
- data/lib/tasks/alchemy/upgrade.rake +18 -1
- data/spec/controllers/admin/clipboard_controller_spec.rb +4 -4
- data/spec/controllers/admin/elements_controller_spec.rb +23 -23
- data/spec/controllers/admin/pages_controller_spec.rb +15 -0
- data/spec/controllers/admin/resources_controller_spec.rb +1 -11
- data/spec/controllers/admin/trash_controller_spec.rb +9 -9
- data/spec/controllers/attachments_controller_spec.rb +3 -3
- data/spec/controllers/elements_controller_spec.rb +2 -2
- data/spec/controllers/pages_controller_spec.rb +160 -129
- data/spec/controllers/pictures_controller_spec.rb +2 -2
- data/spec/controllers/user_sessions_controller_spec.rb +3 -3
- data/spec/controllers/users_controller_spec.rb +2 -2
- data/spec/dummy/app/models/event.rb +2 -2
- data/spec/dummy/app/models/location.rb +4 -0
- data/spec/dummy/app/views/layouts/application.html.erb +6 -42
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/db/migrate/20121026104128_create_events.rb +0 -1
- data/{db/migrate/20121118000000_alchemy_two_point_four.rb → spec/dummy/db/migrate/20130214233001_alchemy_two_point_five.rb} +50 -36
- data/spec/dummy/db/migrate/20130221200514_migrate_attachments_to_dragonfly.rb +21 -0
- data/spec/dummy/db/migrate/20130312205327_change_alchemy_users_role_to_roles.rb +11 -0
- data/spec/dummy/db/migrate/20130328101418_create_locations.rb +9 -0
- data/spec/dummy/db/schema.rb +15 -6
- data/spec/factories.rb +4 -4
- data/spec/{integration → features}/admin/link_overlay_spec.rb +0 -0
- data/spec/{integration → features}/admin/modules_integration_spec.rb +1 -1
- data/spec/{integration → features}/admin/pages_controller_spec.rb +9 -4
- data/spec/{integration → features}/admin/picture_library_integration_spec.rb +5 -5
- data/spec/{integration → features}/admin/resources_integration_spec.rb +1 -1
- data/spec/{integration → features}/navigation_spec.rb +0 -0
- data/spec/{integration → features}/pages_controller_spec.rb +42 -112
- data/spec/{integration → features}/picture_security_spec.rb +2 -2
- data/spec/{integration → features}/security_spec.rb +7 -7
- data/spec/{integration → features}/translation_integration_spec.rb +0 -0
- data/spec/helpers/admin/base_helper_spec.rb +0 -50
- data/spec/helpers/admin/tags_helper_spec.rb +53 -0
- data/spec/helpers/base_helper_spec.rb +19 -3
- data/spec/helpers/pages_helper_spec.rb +92 -44
- data/spec/{url_helpers_spec.rb → helpers/picture_url_helpers_spec.rb} +7 -7
- data/spec/helpers/url_helper_spec.rb +92 -72
- data/spec/{config_spec.rb → libraries/config_spec.rb} +0 -0
- data/spec/libraries/resource_spec.rb +215 -76
- data/spec/libraries/resources_helper_spec.rb +70 -28
- data/spec/models/attachment_spec.rb +75 -9
- data/spec/models/clipboard_spec.rb +1 -1
- data/spec/models/element_spec.rb +7 -0
- data/spec/models/page_spec.rb +144 -25
- data/spec/models/picture_spec.rb +5 -5
- data/spec/models/resource_spec.rb +47 -10
- data/spec/models/user_spec.rb +115 -3
- data/spec/{routing_spec.rb → routing/routing_spec.rb} +8 -20
- data/spec/spec_helper.rb +5 -6
- data/spec/support/alchemy/specs_helpers.rb +1 -1
- data/spec/support/ci/install_phantomjs +1 -1
- data/spec/support/image with spaces.png +0 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js +18 -18
- data/vendor/assets/javascripts/jquery_plugins/{jquery.dialogextend.1_0_1.js → jquery.dialogextend.js} +25 -17
- data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo.min.js +7 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +7 -7
- data/vendor/assets/javascripts/keymage.min.js +6 -0
- data/vendor/assets/javascripts/spin.min.js +1 -0
- metadata +122 -124
- data/app/assets/images/alchemy/ajax_loader.gif +0 -0
- data/app/assets/images/alchemy/gui/toggle.png +0 -0
- data/app/assets/images/alchemy/image_loader.gif +0 -0
- data/app/assets/images/alchemy/shading.png +0 -0
- data/app/assets/images/alchemy/tabs.gif +0 -0
- data/app/assets/javascripts/alchemy/alchemy.base.js +0 -172
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js +0 -47
- data/app/assets/javascripts/alchemy/alchemy.element_editor_selector.js +0 -91
- data/app/assets/javascripts/alchemy/alchemy.growler.js +0 -46
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +0 -60
- data/app/assets/javascripts/alchemy/alchemy.js_extensions.js +0 -15
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js +0 -97
- data/app/assets/javascripts/alchemy/alchemy.windows.js +0 -321
- data/app/models/alchemy/clipboard_spec.rb +0 -0
- data/app/views/alchemy/admin/pictures/show_in_window.html.erb +0 -8
- data/app/views/alchemy/notifications/registered_user_created.text.erb +0 -11
- data/db/migrate/20121121162313_switch_from_fleximage_to_dragonfly.rb +0 -21
- data/db/migrate/20121205155004_create_alchemy_sites.rb +0 -14
- data/db/migrate/20121211163003_add_public_to_alchemy_sites.rb +0 -6
- data/db/migrate/20121220102223_add_aliases_to_site.rb +0 -6
- data/db/migrate/20130110212411_create_alchemy_legacy_page_urls.rb +0 -11
- data/db/migrate/20130121092645_migrate_to_devise.rb +0 -24
- data/spec/alchemy_spec.rb +0 -7
- data/spec/dummy/db/migrate/20121121162313_switch_from_fleximage_to_dragonfly.rb +0 -21
- data/spec/dummy/db/migrate/20121205155004_create_alchemy_sites.rb +0 -14
- data/spec/dummy/db/migrate/20121211163003_add_public_to_alchemy_sites.rb +0 -6
- data/spec/dummy/db/migrate/20121220102223_add_aliases_to_site.rb +0 -6
- data/spec/dummy/db/migrate/20130110212411_create_alchemy_legacy_page_urls.rb +0 -11
- data/spec/dummy/db/migrate/20130121092645_migrate_to_devise.rb +0 -24
- data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo-1.4.2-min.js +0 -11
@@ -14,14 +14,14 @@ describe "Picture Library", :js => true do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it "it should be possible to filter tags by clicking on its name in the tag list" do
|
17
|
-
visit '/
|
17
|
+
visit '/admin/pictures'
|
18
18
|
click_on 'tag1 (1)'
|
19
19
|
page.should have_content 'TaggedWith1'
|
20
20
|
page.should_not have_content 'TaggedWith2'
|
21
21
|
end
|
22
22
|
|
23
23
|
it "it should be possible to undo tag filtering by clicking on an active tag name" do
|
24
|
-
visit '/
|
24
|
+
visit '/admin/pictures'
|
25
25
|
click_on 'tag1 (1)'
|
26
26
|
page.should_not have_content 'TaggedWith2'
|
27
27
|
click_on 'tag1 (1)'
|
@@ -29,7 +29,7 @@ describe "Picture Library", :js => true do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
it "it should be possible to tighten the tag scope by clicking on another tag name" do
|
32
|
-
visit '/
|
32
|
+
visit '/admin/pictures'
|
33
33
|
click_on 'tag1 (1)'
|
34
34
|
click_on 'tag2 (1)'
|
35
35
|
page.should have_content "You don't have any images in your archive"
|
@@ -44,12 +44,12 @@ describe "Picture Library", :js => true do
|
|
44
44
|
end
|
45
45
|
|
46
46
|
it "should list all applied tags" do
|
47
|
-
visit '/
|
47
|
+
visit '/admin/pictures'
|
48
48
|
page.should have_content 'bla'
|
49
49
|
end
|
50
50
|
|
51
51
|
it "should be possible to filter pictures by tag" do
|
52
|
-
visit '/
|
52
|
+
visit '/admin/pictures'
|
53
53
|
click_on 'bla (1)'
|
54
54
|
page.should have_content 'bla'
|
55
55
|
end
|
File without changes
|
@@ -19,7 +19,7 @@ module Alchemy
|
|
19
19
|
p = FactoryGirl.create(:public_page, :do_not_autogenerate => false)
|
20
20
|
article = p.elements.find_by_name('article')
|
21
21
|
article.content_by_name('intro').essence.update_attributes(:body => 'Welcome to Peters Petshop', :public => true)
|
22
|
-
visit "
|
22
|
+
visit "/#{p.urlname}"
|
23
23
|
within('div#content div.article div.intro') { page.should have_content('Welcome to Peters Petshop') }
|
24
24
|
end
|
25
25
|
|
@@ -28,8 +28,8 @@ module Alchemy
|
|
28
28
|
FactoryGirl.create(:public_page, :visible => true, :name => 'Page 1'),
|
29
29
|
FactoryGirl.create(:public_page, :visible => true, :name => 'Page 2')
|
30
30
|
]
|
31
|
-
visit '/
|
32
|
-
within('div#navigation ul') { page.should have_selector('li a[href="/
|
31
|
+
visit '/'
|
32
|
+
within('div#navigation ul') { page.should have_selector('li a[href="/page-1"], li a[href="/page-2"]') }
|
33
33
|
end
|
34
34
|
|
35
35
|
end
|
@@ -39,42 +39,42 @@ module Alchemy
|
|
39
39
|
before { search_page }
|
40
40
|
|
41
41
|
it "should have a correct path in the form tag" do
|
42
|
-
visit('/
|
43
|
-
page.should have_selector('div#content form[action="/
|
42
|
+
visit('/suche')
|
43
|
+
page.should have_selector('div#content form[action="/suche"]')
|
44
44
|
end
|
45
45
|
|
46
46
|
context "performing the search" do
|
47
47
|
|
48
48
|
it "should display search results for richtext essences" do
|
49
49
|
element.content_by_name('text').essence.update_attributes(:body => '<p>Welcome to Peters Petshop</p>')
|
50
|
-
visit('/
|
50
|
+
visit('/suche?query=Petshop')
|
51
51
|
within('div#content .search_result') { page.should have_content('Petshop') }
|
52
52
|
end
|
53
53
|
|
54
54
|
it "should display search results for text essences" do
|
55
55
|
element.content_by_name('intro').essence.update_attributes(:body => 'Welcome to Peters Petshop')
|
56
|
-
visit('/
|
56
|
+
visit('/suche?query=Petshop')
|
57
57
|
within('div#content .search_result') { page.should have_content('Petshop') }
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should not find contents placed on global-pages (layoutpage => true)" do
|
61
61
|
public_page_1.update_attributes(:layoutpage => true)
|
62
62
|
element.content_by_name('intro').essence.update_attributes(:body => 'Welcome to Peters Petshop')
|
63
|
-
visit('/
|
63
|
+
visit('/suche?query=Petshop')
|
64
64
|
within('div#content') { page.should have_css('h2.no_search_results') }
|
65
65
|
end
|
66
66
|
|
67
67
|
it "should not find contents placed on unpublished pages (public => false)" do
|
68
68
|
public_page_1.update_attributes(:public => false)
|
69
69
|
element.content_by_name('intro').essence.update_attributes(:body => 'Welcome to Peters Petshop')
|
70
|
-
visit('/
|
70
|
+
visit('/suche?query=Petshop')
|
71
71
|
within('div#content') { page.should have_css('h2.no_search_results') }
|
72
72
|
end
|
73
73
|
|
74
74
|
it "should not find contents placed on restricted pages (restricted => true)" do
|
75
75
|
public_page_1.update_attributes(:restricted => true)
|
76
76
|
element.content_by_name('intro').essence.update_attributes(:body => 'Welcome to Peters Petshop')
|
77
|
-
visit('/
|
77
|
+
visit('/suche?query=Petshop')
|
78
78
|
within('div#content') { page.should have_css('h2.no_search_results') }
|
79
79
|
end
|
80
80
|
|
@@ -93,7 +93,7 @@ module Alchemy
|
|
93
93
|
|
94
94
|
it "should not display search results from other languages then current" do
|
95
95
|
english_element.content_by_name('headline').essence.update_attributes(:body => 'Joes Hardware')
|
96
|
-
visit('/
|
96
|
+
visit('/de/suche?query=Hardware')
|
97
97
|
within('div#content') { page.should have_css('h2.no_search_results') }
|
98
98
|
page.should_not have_css('div#content .search_result')
|
99
99
|
end
|
@@ -115,28 +115,28 @@ module Alchemy
|
|
115
115
|
|
116
116
|
context "if no language params are given" do
|
117
117
|
it "should redirect to url with nested language code" do
|
118
|
-
visit "
|
119
|
-
page.current_path.should == "
|
118
|
+
visit "/#{public_page_1.urlname}"
|
119
|
+
page.current_path.should == "/#{public_page_1.language_code}/#{public_page_1.urlname}"
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
123
|
context "if requested page is unpublished" do
|
124
124
|
|
125
125
|
before do
|
126
|
+
Config.stub!(:get) { |arg| arg == :url_nesting ? false : Config.parameter(arg) }
|
126
127
|
public_page_1.update_attributes(:public => false, :name => 'Not Public', :urlname => '')
|
127
128
|
public_child
|
128
|
-
Config.stub!(:get) { |arg| arg == :url_nesting ? false : Config.parameter(arg) }
|
129
129
|
end
|
130
130
|
|
131
131
|
it "should redirect to public child" do
|
132
|
-
visit "
|
133
|
-
page.current_path.should == "
|
132
|
+
visit "/#{default_language.code}/not-public"
|
133
|
+
page.current_path.should == "/#{default_language.code}/public-child"
|
134
134
|
end
|
135
135
|
|
136
136
|
context "and url has no language code" do
|
137
137
|
it "should redirect to url of public child with language code of default language" do
|
138
|
-
visit '/
|
139
|
-
page.current_path.should == "
|
138
|
+
visit '/not-public'
|
139
|
+
page.current_path.should == "/#{default_language.code}/public-child"
|
140
140
|
end
|
141
141
|
end
|
142
142
|
|
@@ -144,27 +144,27 @@ module Alchemy
|
|
144
144
|
|
145
145
|
context "if requested url is index url" do
|
146
146
|
it "should redirect to pages url with default language" do
|
147
|
-
visit '/
|
148
|
-
page.current_path.should == "
|
147
|
+
visit '/'
|
148
|
+
page.current_path.should == "/#{default_language.code}/home"
|
149
149
|
end
|
150
150
|
end
|
151
151
|
|
152
152
|
context "if requested url is only the language code" do
|
153
153
|
it "should redirect to pages url with default language" do
|
154
|
-
visit "
|
155
|
-
page.current_path.should == "
|
154
|
+
visit "/#{default_language.code}"
|
155
|
+
page.current_path.should == "/#{default_language.code}/home"
|
156
156
|
end
|
157
157
|
end
|
158
158
|
|
159
159
|
context "requested url is only the urlname" do
|
160
160
|
it "then it should redirect to pages url with nested language." do
|
161
|
-
visit '/
|
162
|
-
page.current_path.should == '/
|
161
|
+
visit '/home'
|
162
|
+
page.current_path.should == '/de/home'
|
163
163
|
end
|
164
164
|
end
|
165
165
|
|
166
166
|
it "should keep additional params" do
|
167
|
-
visit "
|
167
|
+
visit "/#{public_page_1.urlname}?query=Peter"
|
168
168
|
page.current_url.should match(/\?query=Peter/)
|
169
169
|
end
|
170
170
|
|
@@ -174,67 +174,19 @@ module Alchemy
|
|
174
174
|
|
175
175
|
it "should render 404 if urlname and lang parameter do not belong to same page" do
|
176
176
|
FactoryGirl.create(:english)
|
177
|
-
visit "/
|
177
|
+
visit "/en/#{public_page_1.urlname}"
|
178
178
|
page.status_code.should == 404
|
179
179
|
end
|
180
180
|
|
181
181
|
it "should render 404 if requested language does not exist" do
|
182
|
-
|
182
|
+
public_page_1
|
183
|
+
LegacyPageUrl.delete_all
|
184
|
+
visit "/fo/#{public_page_1.urlname}"
|
183
185
|
page.status_code.should == 404
|
184
186
|
end
|
185
187
|
|
186
188
|
end
|
187
189
|
|
188
|
-
context "with url nesting" do
|
189
|
-
|
190
|
-
before do
|
191
|
-
level1 = FactoryGirl.create(:public_page, :name => 'catalog')
|
192
|
-
level2 = FactoryGirl.create(:public_page, :parent_id => level1.id, :name => 'products')
|
193
|
-
level3 = FactoryGirl.create(:public_page, :parent_id => level2.id, :name => 'screwdriver')
|
194
|
-
end
|
195
|
-
|
196
|
-
context "enabled" do
|
197
|
-
|
198
|
-
before(:each) do
|
199
|
-
Config.stub!(:get) { |arg| arg == :url_nesting ? true : Config.parameter(arg) }
|
200
|
-
end
|
201
|
-
|
202
|
-
context "requesting a non nested url" do
|
203
|
-
|
204
|
-
it "should redirect to nested url" do
|
205
|
-
visit "/alchemy/de/screwdriver"
|
206
|
-
page.current_path.should == '/alchemy/de/catalog/products/screwdriver'
|
207
|
-
end
|
208
|
-
|
209
|
-
it "should only redirect to nested url if page is nested" do
|
210
|
-
visit "/alchemy/de/catalog"
|
211
|
-
page.status_code.should == 200
|
212
|
-
page.current_path.should == "/alchemy/de/catalog"
|
213
|
-
end
|
214
|
-
|
215
|
-
end
|
216
|
-
|
217
|
-
end
|
218
|
-
|
219
|
-
context "disabled" do
|
220
|
-
|
221
|
-
before(:each) do
|
222
|
-
Config.stub!(:get) { |arg| arg == :url_nesting ? false : Config.parameter(arg) }
|
223
|
-
end
|
224
|
-
|
225
|
-
context "requesting a nested url" do
|
226
|
-
|
227
|
-
it "should redirect to not nested url" do
|
228
|
-
visit "/alchemy/de/catalog/products/screwdriver"
|
229
|
-
page.current_path.should == "/alchemy/de/screwdriver"
|
230
|
-
end
|
231
|
-
|
232
|
-
end
|
233
|
-
|
234
|
-
end
|
235
|
-
|
236
|
-
end
|
237
|
-
|
238
190
|
end
|
239
191
|
|
240
192
|
context "not in multi language mode" do
|
@@ -245,22 +197,8 @@ module Alchemy
|
|
245
197
|
end
|
246
198
|
|
247
199
|
it "should redirect from nested language code url to normal url" do
|
248
|
-
visit "/
|
249
|
-
page.current_path.should == "
|
250
|
-
end
|
251
|
-
|
252
|
-
context "with no lang parameter" do
|
253
|
-
|
254
|
-
it "should have defaults language language_id in the session" do
|
255
|
-
get show_page_path(:urlname => 'a-public-page')
|
256
|
-
controller.session[:language_id].should == Language.get_default.id
|
257
|
-
end
|
258
|
-
|
259
|
-
it "should have defaults language language_code in the session" do
|
260
|
-
get show_page_path(:urlname => 'a-public-page')
|
261
|
-
controller.session[:language_code].should == Language.get_default.code
|
262
|
-
end
|
263
|
-
|
200
|
+
visit "/de/#{public_page_1.urlname}"
|
201
|
+
page.current_path.should == "/#{public_page_1.urlname}"
|
264
202
|
end
|
265
203
|
|
266
204
|
context "should redirect to public child" do
|
@@ -271,24 +209,24 @@ module Alchemy
|
|
271
209
|
end
|
272
210
|
|
273
211
|
it "if requested page is unpublished" do
|
274
|
-
visit '/
|
275
|
-
page.current_path.should == '/
|
212
|
+
visit '/not-public'
|
213
|
+
page.current_path.should == '/public-child'
|
276
214
|
end
|
277
215
|
|
278
216
|
it "with normal url, if requested url has nested language code and is not public" do
|
279
|
-
visit '/
|
280
|
-
page.current_path.should == '/
|
217
|
+
visit '/de/not-public'
|
218
|
+
page.current_path.should == '/public-child'
|
281
219
|
end
|
282
220
|
|
283
221
|
end
|
284
222
|
|
285
223
|
it "should redirect to pages url, if requested url is index url" do
|
286
|
-
visit '/
|
287
|
-
page.current_path.should == '/
|
224
|
+
visit '/'
|
225
|
+
page.current_path.should == '/home'
|
288
226
|
end
|
289
227
|
|
290
228
|
it "should keep additional params" do
|
291
|
-
visit "/
|
229
|
+
visit "/de/#{public_page_1.urlname}?query=Peter"
|
292
230
|
page.current_url.should match(/\?query=Peter/)
|
293
231
|
end
|
294
232
|
|
@@ -300,26 +238,18 @@ module Alchemy
|
|
300
238
|
|
301
239
|
before do
|
302
240
|
User.stub!(:admins).and_return([1, 2]) # We need a admin user or the signup page will show up
|
303
|
-
visit "/
|
304
|
-
end
|
305
|
-
|
306
|
-
context "if a language root page exists" do
|
307
|
-
|
308
|
-
it "should render the status code in the title tag" do
|
309
|
-
within("title") { page.should have_content("404") }
|
310
|
-
end
|
311
|
-
|
241
|
+
visit "/non-existing-page"
|
312
242
|
end
|
313
243
|
|
314
|
-
it "should render public/404.html
|
315
|
-
|
244
|
+
it "should render public/404.html" do
|
245
|
+
page.status_code.should == 404
|
316
246
|
end
|
317
247
|
|
318
248
|
end
|
319
249
|
|
320
250
|
context "with invalid byte code char in urlname parameter" do
|
321
251
|
it "should render page not found" do
|
322
|
-
visit '
|
252
|
+
visit '/%ed'
|
323
253
|
page.status_code.should == 404
|
324
254
|
end
|
325
255
|
end
|
@@ -10,7 +10,7 @@ describe 'Picture renderung security', :js => true do
|
|
10
10
|
context "passing no security token" do
|
11
11
|
|
12
12
|
it 'should return a bad request (400)' do
|
13
|
-
visit "/
|
13
|
+
visit "/pictures/#{picture.id}/show/image.png"
|
14
14
|
page.status_code.should == 400
|
15
15
|
end
|
16
16
|
|
@@ -19,7 +19,7 @@ describe 'Picture renderung security', :js => true do
|
|
19
19
|
context "passing correct security token" do
|
20
20
|
|
21
21
|
before do
|
22
|
-
visit "/
|
22
|
+
visit "/pictures/#{picture.id}/show/image.png?sh=#{picture.security_token}"
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'should return image' do
|
@@ -10,8 +10,8 @@ describe "Security: " do
|
|
10
10
|
context "If no user is present" do
|
11
11
|
|
12
12
|
it "render the signup view" do
|
13
|
-
visit '/
|
14
|
-
current_path.should == '/
|
13
|
+
visit '/'
|
14
|
+
current_path.should == '/admin/signup'
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -22,14 +22,14 @@ describe "Security: " do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it "a visitor should not be able to signup" do
|
25
|
-
visit '/
|
25
|
+
visit '/admin/signup'
|
26
26
|
within('#alchemy_greeting') { page.should_not have_content('have to signup') }
|
27
27
|
end
|
28
28
|
|
29
29
|
context "that is not logged in" do
|
30
30
|
it "should see login-form" do
|
31
|
-
visit '/
|
32
|
-
current_path.should == '/
|
31
|
+
visit '/admin/dashboard'
|
32
|
+
current_path.should == '/admin/login'
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
@@ -40,8 +40,8 @@ describe "Security: " do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
it "should be redirected to dashboard" do
|
43
|
-
visit '/
|
44
|
-
current_path.should == '/
|
43
|
+
visit '/admin/login'
|
44
|
+
current_path.should == '/admin/dashboard'
|
45
45
|
end
|
46
46
|
|
47
47
|
end
|
File without changes
|
@@ -96,56 +96,6 @@ module Alchemy
|
|
96
96
|
|
97
97
|
end
|
98
98
|
|
99
|
-
context "Filtering pictures depending on tags from params" do
|
100
|
-
|
101
|
-
let(:tag) do
|
102
|
-
mock_model(ActsAsTaggableOn::Tag, :name => "foo")
|
103
|
-
end
|
104
|
-
|
105
|
-
describe "#pictures_filtered_by_tag?" do
|
106
|
-
it "should return true if the filterlist contains the given tag" do
|
107
|
-
controller.params[:tagged_with] = "foo,bar,baz"
|
108
|
-
helper.pictures_filtered_by_tag?(tag).should == true
|
109
|
-
end
|
110
|
-
|
111
|
-
it "should return false if the filterlist does not contain the given tag" do
|
112
|
-
controller.params[:tagged_with] = "bar,baz"
|
113
|
-
helper.pictures_filtered_by_tag?(tag).should == false
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
describe "#add_to_picture_tag_filter" do
|
118
|
-
context "if params[:tagged_with] is not present" do
|
119
|
-
it "should return an Array with the given tag name" do
|
120
|
-
helper.add_to_picture_tag_filter(tag).should == ["foo"]
|
121
|
-
end
|
122
|
-
end
|
123
|
-
|
124
|
-
context "if params[:tagged_with] contains some tag names" do
|
125
|
-
it "should return an Array of tag names including the given one" do
|
126
|
-
controller.params[:tagged_with] = "bar,baz"
|
127
|
-
helper.add_to_picture_tag_filter(tag).should == ["bar", "baz", "foo"]
|
128
|
-
end
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
describe "#remove_from_picture_tag_filter" do
|
133
|
-
context "if params[:tagged_with] is not present" do
|
134
|
-
it "should return an empty Array" do
|
135
|
-
helper.remove_from_picture_tag_filter(tag).should be_empty
|
136
|
-
end
|
137
|
-
end
|
138
|
-
|
139
|
-
context "if params[:tagged_with] contains some tag names" do
|
140
|
-
it "should return an Array of tag names without the given one" do
|
141
|
-
controller.params[:tagged_with] = "bar,baz,foo"
|
142
|
-
helper.remove_from_picture_tag_filter(tag).should == ["bar", "baz"]
|
143
|
-
end
|
144
|
-
end
|
145
|
-
end
|
146
|
-
|
147
|
-
end
|
148
|
-
|
149
99
|
describe '#pages_for_select' do
|
150
100
|
|
151
101
|
let(:contact_form) { FactoryGirl.create(:element, :name => 'contactform', :create_contents_after_create => true) }
|