alchemy_cms 4.0.5 → 4.1.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -0
- data/.gitignore +1 -0
- data/.localeapp/config.rb +8 -0
- data/.rubocop.yml +26 -13
- data/.travis.yml +8 -11
- data/CHANGELOG.md +5 -20
- data/Gemfile +10 -7
- data/README.md +16 -14
- data/Rakefile +1 -1
- data/alchemy_cms.gemspec +6 -7
- data/app/assets/images/alchemy/alchemy-logo.png +0 -0
- data/app/assets/images/alchemy/alchemy-logo.svg +1 -70
- data/app/assets/images/alchemy/favicon.ico +0 -0
- data/app/assets/images/alchemy/icon.svg +1 -14
- data/app/assets/javascripts/alchemy/admin.js +0 -7
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +2 -2
- data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js.coffee +1 -0
- data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +19 -6
- data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +2 -7
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +36 -26
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +6 -15
- data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +8 -11
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +4 -1
- data/app/assets/javascripts/alchemy/alchemy.image_overlay.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +5 -14
- data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +54 -75
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +4 -13
- data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +1 -0
- data/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee +12 -6
- data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +0 -158
- data/app/assets/stylesheets/alchemy/_defaults.scss +0 -2
- data/app/assets/stylesheets/alchemy/_extends.scss +13 -18
- data/app/assets/stylesheets/alchemy/_mixins.scss +72 -46
- data/app/assets/stylesheets/alchemy/_variables.scss +128 -59
- data/app/assets/stylesheets/alchemy/admin.scss +7 -1
- data/app/assets/stylesheets/alchemy/archive.scss +23 -27
- data/app/assets/stylesheets/alchemy/base.scss +5 -355
- data/app/assets/stylesheets/alchemy/buttons.scss +23 -60
- data/app/assets/stylesheets/alchemy/clipboard.scss +26 -0
- data/app/assets/stylesheets/alchemy/dashboard.scss +7 -40
- data/app/assets/stylesheets/alchemy/dialogs.scss +23 -36
- data/app/assets/stylesheets/alchemy/elements.scss +80 -156
- data/app/assets/stylesheets/alchemy/errors.scss +2 -2
- data/app/assets/stylesheets/alchemy/flash.scss +19 -10
- data/app/assets/stylesheets/alchemy/fonts.scss +13 -0
- data/app/assets/stylesheets/alchemy/forms.scss +6 -1
- data/app/assets/stylesheets/alchemy/frame.scss +24 -65
- data/app/assets/stylesheets/alchemy/hints.scss +2 -2
- data/app/assets/stylesheets/alchemy/icons.scss +3 -337
- data/app/assets/stylesheets/alchemy/image_library.scss +9 -10
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +21 -839
- data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +32 -57
- data/app/assets/stylesheets/alchemy/lists.scss +4 -8
- data/app/assets/stylesheets/alchemy/menubar.scss +26 -29
- data/app/assets/stylesheets/alchemy/navigation.scss +23 -25
- data/app/assets/stylesheets/alchemy/notices.scss +25 -25
- data/app/assets/stylesheets/alchemy/pagination.scss +12 -7
- data/app/assets/stylesheets/alchemy/preview_window.scss +20 -0
- data/app/assets/stylesheets/alchemy/resource_info.scss +1 -1
- data/app/assets/stylesheets/alchemy/search.scss +19 -15
- data/app/assets/stylesheets/alchemy/selects.scss +63 -32
- data/app/assets/stylesheets/alchemy/sitemap.scss +70 -148
- data/app/assets/stylesheets/alchemy/tables.scss +16 -59
- data/app/assets/stylesheets/alchemy/toolbar.scss +9 -36
- data/app/assets/stylesheets/alchemy/trash.scss +8 -0
- data/app/assets/stylesheets/alchemy/upload.scss +5 -6
- data/app/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss +1 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +78 -43
- data/app/controllers/alchemy/admin/attachments_controller.rb +6 -6
- data/app/controllers/alchemy/admin/base_controller.rb +9 -9
- data/app/controllers/alchemy/admin/contents_controller.rb +0 -17
- data/app/controllers/alchemy/admin/elements_controller.rb +1 -4
- data/app/controllers/alchemy/admin/essence_files_controller.rb +1 -3
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +1 -3
- data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pictures_controller.rb +5 -5
- data/app/controllers/alchemy/admin/resources_controller.rb +10 -10
- data/app/controllers/alchemy/admin/tags_controller.rb +7 -7
- data/app/controllers/alchemy/api/contents_controller.rb +6 -1
- data/app/controllers/alchemy/api/elements_controller.rb +5 -1
- data/app/controllers/alchemy/api/pages_controller.rb +6 -1
- data/app/controllers/alchemy/base_controller.rb +5 -3
- data/app/controllers/alchemy/pages_controller.rb +1 -1
- data/app/helpers/alchemy/admin/base_helper.rb +14 -15
- data/app/helpers/alchemy/admin/contents_helper.rb +1 -2
- data/app/helpers/alchemy/admin/elements_helper.rb +7 -6
- data/app/helpers/alchemy/admin/tags_helper.rb +3 -4
- data/app/helpers/alchemy/base_helper.rb +35 -5
- data/app/helpers/alchemy/elements_helper.rb +2 -2
- data/app/helpers/alchemy/pages_helper.rb +4 -2
- data/app/models/alchemy/attachment.rb +14 -23
- data/app/models/alchemy/base_record.rb +13 -0
- data/app/models/alchemy/cell.rb +1 -1
- data/app/models/alchemy/content.rb +1 -2
- data/app/models/alchemy/content/factory.rb +1 -1
- data/app/models/alchemy/element.rb +10 -12
- data/app/models/alchemy/essence_boolean.rb +1 -1
- data/app/models/alchemy/essence_date.rb +2 -2
- data/app/models/alchemy/essence_file.rb +1 -1
- data/app/models/alchemy/essence_html.rb +1 -1
- data/app/models/alchemy/essence_link.rb +1 -1
- data/app/models/alchemy/essence_picture.rb +1 -1
- data/app/models/alchemy/essence_richtext.rb +1 -1
- data/app/models/alchemy/essence_select.rb +1 -1
- data/app/models/alchemy/essence_text.rb +1 -1
- data/app/models/alchemy/folded_page.rb +1 -1
- data/app/models/alchemy/language.rb +21 -5
- data/app/models/alchemy/page.rb +17 -5
- data/app/models/alchemy/page/page_elements.rb +14 -2
- data/app/models/alchemy/page/page_naming.rb +17 -4
- data/app/models/alchemy/picture.rb +4 -7
- data/app/models/alchemy/site.rb +3 -3
- data/app/models/alchemy/tag.rb +3 -3
- data/app/models/concerns/alchemy/content_touching.rb +23 -0
- data/app/serializers/alchemy/element_serializer.rb +2 -0
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_attachment.html.erb +11 -21
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +26 -29
- data/app/views/alchemy/admin/attachments/_filter_bar.html.erb +2 -3
- data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +3 -4
- data/app/views/alchemy/admin/attachments/_replace_button.html.erb +2 -3
- data/app/views/alchemy/admin/attachments/_tag_list.html.erb +3 -3
- data/app/views/alchemy/admin/attachments/destroy.js.erb +1 -1
- data/app/views/alchemy/admin/attachments/edit.html.erb +2 -2
- data/app/views/alchemy/admin/attachments/index.html.erb +3 -2
- data/app/views/alchemy/admin/attachments/show.html.erb +7 -8
- data/app/views/alchemy/admin/clipboard/clear.js.erb +1 -1
- data/app/views/alchemy/admin/clipboard/index.html.erb +23 -7
- data/app/views/alchemy/admin/clipboard/insert.js.erb +1 -1
- data/app/views/alchemy/admin/clipboard/remove.js.erb +2 -2
- data/app/views/alchemy/admin/contents/create.js.erb +1 -1
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +9 -6
- data/app/views/alchemy/admin/dashboard/_recent_pages.html.erb +6 -4
- data/app/views/alchemy/admin/dashboard/_sites.html.erb +4 -2
- data/app/views/alchemy/admin/dashboard/_users.html.erb +6 -4
- data/app/views/alchemy/admin/dashboard/index.html.erb +3 -3
- data/app/views/alchemy/admin/dashboard/info.html.erb +6 -7
- data/app/views/alchemy/admin/elements/_add_picture.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_element.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_element_header.html.erb +14 -14
- data/app/views/alchemy/admin/elements/_element_toolbar.html.erb +3 -3
- data/app/views/alchemy/admin/elements/_new_element_form.html.erb +2 -3
- data/app/views/alchemy/admin/elements/index.html.erb +2 -4
- data/app/views/alchemy/admin/elements/new.html.erb +1 -2
- data/app/views/alchemy/admin/elements/publish.js.erb +5 -5
- data/app/views/alchemy/admin/languages/_language.html.erb +4 -9
- data/app/views/alchemy/admin/languages/_table.html.erb +1 -1
- data/app/views/alchemy/admin/languages/index.html.erb +1 -1
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +5 -5
- data/app/views/alchemy/admin/layoutpages/index.html.erb +5 -4
- data/app/views/alchemy/admin/leave.html.erb +1 -1
- data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +1 -1
- data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_form.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_locked_page.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page.html.erb +31 -23
- data/app/views/alchemy/admin/pages/_page_for_links.html.erb +5 -5
- data/app/views/alchemy/admin/pages/_page_infos.html.erb +3 -3
- data/app/views/alchemy/admin/pages/_publication_fields.html.erb +1 -1
- data/app/views/alchemy/admin/pages/edit.html.erb +22 -21
- data/app/views/alchemy/admin/pages/index.html.erb +5 -21
- data/app/views/alchemy/admin/pages/info.html.erb +5 -5
- data/app/views/alchemy/admin/pages/sort.html.erb +1 -1
- data/app/views/alchemy/admin/pages/unlock.js.erb +2 -4
- data/app/views/alchemy/admin/partials/_flash.html.erb +1 -1
- data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +6 -2
- 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/pictures/_archive.html.erb +19 -17
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +13 -13
- data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +2 -3
- data/app/views/alchemy/admin/pictures/_form.html.erb +3 -3
- data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +2 -3
- data/app/views/alchemy/admin/pictures/_picture.html.erb +7 -7
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +3 -3
- data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +6 -7
- data/app/views/alchemy/admin/pictures/index.html.erb +12 -12
- data/app/views/alchemy/admin/pictures/index.js.erb +0 -1
- data/app/views/alchemy/admin/pictures/show.html.erb +9 -9
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +2 -3
- data/app/views/alchemy/admin/resources/_form.html.erb +10 -2
- data/app/views/alchemy/admin/resources/_resource.html.erb +9 -14
- data/app/views/alchemy/admin/resources/_table.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_tag_list.html.erb +4 -4
- data/app/views/alchemy/admin/resources/index.html.erb +2 -3
- data/app/views/alchemy/admin/sites/index.html.erb +1 -1
- data/app/views/alchemy/admin/tags/_tag.html.erb +7 -11
- data/app/views/alchemy/admin/tags/index.html.erb +4 -4
- data/app/views/alchemy/admin/trash/index.html.erb +2 -3
- data/app/views/alchemy/admin/uploader/_button.html.erb +1 -2
- data/app/views/alchemy/base/500.html.erb +1 -1
- data/app/views/alchemy/base/permission_denied.js.erb +1 -1
- data/app/views/alchemy/base/redirect.js.erb +1 -2
- data/app/views/alchemy/elements/_editor_not_found.html.erb +2 -3
- data/app/views/alchemy/essences/_essence_date_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +7 -11
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +9 -7
- data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +1 -1
- data/app/views/alchemy/pages/_meta_data.html.erb +1 -1
- data/app/views/kaminari/alchemy/_first_page.html.erb +7 -3
- data/app/views/kaminari/alchemy/_gap.html.erb +1 -1
- data/app/views/kaminari/alchemy/_last_page.html.erb +7 -3
- data/app/views/kaminari/alchemy/_next_page.html.erb +4 -2
- data/app/views/kaminari/alchemy/_page.html.erb +1 -1
- data/app/views/kaminari/alchemy/_prev_page.html.erb +4 -2
- data/app/views/layouts/alchemy/admin.html.erb +8 -6
- data/bin/rails +2 -2
- data/bin/rspec +1 -1
- data/config/alchemy/config.yml +0 -2
- data/config/alchemy/modules.yml +5 -5
- data/config/initializers/simple_form.rb +45 -8
- data/config/locales/alchemy.en.yml +66 -179
- data/config/routes.rb +1 -1
- data/db/migrate/20180226123013_alchemy_four_point_zero.rb +392 -0
- data/db/migrate/20180227224537_migrate_tags_to_gutentag.rb +41 -0
- data/lib/alchemy/config.rb +0 -2
- data/lib/alchemy/engine.rb +5 -9
- data/lib/alchemy/essence.rb +6 -6
- data/lib/alchemy/filetypes.rb +13 -1
- data/lib/alchemy/forms/builder.rb +5 -3
- data/lib/alchemy/i18n.rb +8 -6
- data/lib/alchemy/modules.rb +1 -1
- data/lib/alchemy/name_conversions.rb +0 -2
- data/lib/alchemy/page_layout.rb +3 -2
- data/lib/alchemy/paths.rb +5 -5
- data/lib/alchemy/resource.rb +9 -9
- data/lib/alchemy/resources_helper.rb +11 -15
- data/lib/alchemy/routing_constraints.rb +2 -2
- data/lib/alchemy/shell.rb +0 -1
- data/lib/alchemy/taggable.rb +40 -0
- data/lib/alchemy/tasks/tidy.rb +1 -9
- data/lib/alchemy/test_support/factories/content_factory.rb +10 -0
- data/lib/alchemy/test_support/factories/element_factory.rb +5 -0
- data/lib/alchemy/test_support/shared_contexts.rb +1 -1
- data/lib/alchemy/tinymce.rb +2 -2
- data/lib/alchemy/upgrader/four_point_one.rb +42 -0
- data/lib/alchemy/upgrader/tasks/harden_acts_as_taggable_on_migrations.rb +27 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +2 -3
- data/lib/rails/generators/alchemy/elements/elements_generator.rb +2 -2
- data/lib/rails/generators/alchemy/essence/essence_generator.rb +1 -1
- data/lib/rails/generators/alchemy/install/install_generator.rb +4 -8
- data/lib/rails/generators/alchemy/module/module_generator.rb +1 -1
- data/lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb +2 -2
- data/lib/rails/generators/alchemy/site_layouts/site_layouts_generator.rb +2 -2
- data/lib/rails/generators/alchemy/views/views_generator.rb +1 -1
- data/lib/tasks/alchemy/db.rake +2 -1
- data/lib/tasks/alchemy/tidy.rake +0 -6
- data/lib/tasks/alchemy/upgrade.rake +11 -144
- data/vendor/assets/fonts/fa-regular-400.eot +0 -0
- data/vendor/assets/fonts/fa-regular-400.svg +363 -0
- data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
- data/vendor/assets/fonts/fa-solid-900.eot +0 -0
- data/vendor/assets/fonts/fa-solid-900.svg +1413 -0
- data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
- data/vendor/assets/javascripts/tinymce/license.txt +6 -6
- data/vendor/assets/javascripts/tinymce/tinymce.min.js +2 -15
- data/vendor/assets/stylesheets/fontawesome/_animated.scss +20 -0
- data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +20 -0
- data/vendor/assets/stylesheets/fontawesome/_core.scss +16 -0
- data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +6 -0
- data/vendor/assets/stylesheets/fontawesome/_icons.scss +792 -0
- data/vendor/assets/stylesheets/fontawesome/_larger.scss +23 -0
- data/vendor/assets/stylesheets/fontawesome/_list.scss +18 -0
- data/vendor/assets/stylesheets/fontawesome/_mixins.scss +57 -0
- data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +23 -0
- data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +5 -0
- data/vendor/assets/stylesheets/fontawesome/_stacked.scss +31 -0
- data/vendor/assets/stylesheets/fontawesome/_variables.scss +805 -0
- data/vendor/assets/stylesheets/fontawesome/fa-regular.scss +22 -0
- data/vendor/assets/stylesheets/fontawesome/fa-solid.scss +23 -0
- data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +16 -0
- metadata +77 -112
- data/app/assets/fonts/alchemy/icons.eot +0 -0
- data/app/assets/fonts/alchemy/icons.svg +0 -33
- 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/images/alchemy/ui-icons_666666_256x240.png +0 -0
- data/app/assets/images/sassy-ie-overlay.png +0 -0
- data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +0 -42
- data/app/assets/stylesheets/alchemy/icon-font.scss +0 -75
- data/app/assets/stylesheets/alchemy/modules.scss +0 -27
- data/app/models/alchemy.rb +0 -7
- data/app/views/alchemy/admin/contents/destroy.js.erb +0 -4
- data/app/views/alchemy/admin/pictures/flush.js.erb +0 -2
- data/config/locales/alchemy.de.yml +0 -932
- data/config/locales/alchemy.es.yml +0 -960
- data/config/locales/alchemy.fr.yml +0 -938
- data/config/locales/alchemy.it.yml +0 -938
- data/config/locales/alchemy.nl.yml +0 -918
- data/config/locales/alchemy.ru.yml +0 -830
- data/config/locales/simple_form.de.yml +0 -26
- data/config/locales/simple_form.en.yml +0 -25
- data/config/locales/simple_form.es.yml +0 -6
- data/config/locales/simple_form.fr.yml +0 -26
- data/config/locales/simple_form.it.yml +0 -25
- data/config/locales/simple_form.nl.yml +0 -25
- data/config/locales/simple_form.ru.yml +0 -25
- data/db/migrate/20130827094554_alchemy_two_point_six.rb +0 -378
- data/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +0 -5
- data/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +0 -5
- data/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +0 -5
- data/db/migrate/20150608204610_add_parent_element_id_to_alchemy_elements.rb +0 -6
- data/db/migrate/20150729151825_add_link_text_to_alchemy_essence_files.rb +0 -5
- data/db/migrate/20150906195818_add_locale_to_alchemy_languages.rb +0 -7
- data/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb +0 -32
- data/db/migrate/20160422195310_add_image_file_format_to_alchemy_pictures.rb +0 -9
- data/db/migrate/20160617224938_change_alchemy_pages_locked_to_locked_at.rb +0 -22
- data/db/migrate/20160912223112_add_index_to_alchemy_pages_rgt.rb +0 -9
- data/db/migrate/20160927205604_add_foreign_key_indices_and_null_constraints.rb +0 -20
- data/db/migrate/20160928080104_add_foreign_keys.rb +0 -27
- data/lib/alchemy/touching.rb +0 -42
- data/lib/alchemy/upgrader/tasks/available_contents_upgrader.rb +0 -161
- data/lib/alchemy/upgrader/tasks/install_asset_manifests.rb +0 -15
- data/lib/alchemy/upgrader/tasks/install_dragonfly_config.rb +0 -14
- data/lib/alchemy/upgrader/tasks/nestable_elements_migration.rb +0 -71
- data/lib/alchemy/upgrader/tasks/three_point_two_task.rb +0 -31
- data/lib/alchemy/upgrader/three_point_five.rb +0 -32
- data/lib/alchemy/upgrader/three_point_four.rb +0 -52
- data/lib/alchemy/upgrader/three_point_one.rb +0 -54
- data/lib/alchemy/upgrader/three_point_three.rb +0 -50
- data/lib/alchemy/upgrader/three_point_two.rb +0 -40
- data/lib/alchemy/upgrader/three_point_zero.rb +0 -92
- data/vendor/assets/javascripts/jquery_plugins/jquery.floatThead.min.js +0 -3
- data/vendor/assets/javascripts/tinymce/langs/de.js +0 -219
- data/vendor/assets/javascripts/tinymce/langs/es.js +0 -219
- data/vendor/assets/javascripts/tinymce/langs/fr.js +0 -219
- data/vendor/assets/javascripts/tinymce/langs/it.js +0 -219
- data/vendor/assets/javascripts/tinymce/langs/nl.js +0 -219
- data/vendor/assets/javascripts/tinymce/langs/ru.js +0 -219
@@ -21,7 +21,7 @@
|
|
21
21
|
#
|
22
22
|
|
23
23
|
module Alchemy
|
24
|
-
class Language <
|
24
|
+
class Language < BaseRecord
|
25
25
|
belongs_to :site, required: true
|
26
26
|
has_many :pages
|
27
27
|
|
@@ -47,10 +47,10 @@ module Alchemy
|
|
47
47
|
if: -> { default_changed? && self != Language.default }
|
48
48
|
|
49
49
|
after_update :set_pages_language,
|
50
|
-
if:
|
50
|
+
if: :should_set_pages_language?
|
51
51
|
|
52
52
|
after_update :unpublish_pages,
|
53
|
-
if:
|
53
|
+
if: :should_unpublish_pages?
|
54
54
|
|
55
55
|
before_destroy :check_for_default
|
56
56
|
after_destroy :delete_language_root_page
|
@@ -62,8 +62,8 @@ module Alchemy
|
|
62
62
|
|
63
63
|
class << self
|
64
64
|
# Store the current language in the current thread.
|
65
|
-
def current=(
|
66
|
-
RequestStore.store[:alchemy_current_language] =
|
65
|
+
def current=(language)
|
66
|
+
RequestStore.store[:alchemy_current_language] = language
|
67
67
|
end
|
68
68
|
|
69
69
|
# Current language from current thread or default.
|
@@ -153,6 +153,14 @@ module Alchemy
|
|
153
153
|
lang.save(validate: false)
|
154
154
|
end
|
155
155
|
|
156
|
+
def should_set_pages_language?
|
157
|
+
if active_record_5_1?
|
158
|
+
saved_change_to_language_code? || saved_change_to_country_code?
|
159
|
+
else
|
160
|
+
language_code_changed? || country_code_changed?
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
156
164
|
def set_pages_language
|
157
165
|
pages.update_all language_code: code
|
158
166
|
end
|
@@ -165,6 +173,14 @@ module Alchemy
|
|
165
173
|
root_page.try(:destroy) && layout_root_page.try(:destroy)
|
166
174
|
end
|
167
175
|
|
176
|
+
def should_unpublish_pages?
|
177
|
+
if active_record_5_1?
|
178
|
+
saved_changes[:public] == [true, false]
|
179
|
+
else
|
180
|
+
changes[:public] == [true, false]
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
168
184
|
def unpublish_pages
|
169
185
|
pages.update_all(public_on: nil, public_until: nil)
|
170
186
|
end
|
data/app/models/alchemy/page.rb
CHANGED
@@ -37,10 +37,10 @@
|
|
37
37
|
#
|
38
38
|
|
39
39
|
module Alchemy
|
40
|
-
class Page <
|
40
|
+
class Page < BaseRecord
|
41
41
|
include Alchemy::Hints
|
42
42
|
include Alchemy::Logger
|
43
|
-
include Alchemy::
|
43
|
+
include Alchemy::Taggable
|
44
44
|
|
45
45
|
DEFAULT_ATTRIBUTES_FOR_COPY = {
|
46
46
|
do_not_autogenerate: true,
|
@@ -82,7 +82,6 @@ module Alchemy
|
|
82
82
|
:layoutpage
|
83
83
|
]
|
84
84
|
|
85
|
-
acts_as_taggable
|
86
85
|
acts_as_nested_set(dependent: :destroy)
|
87
86
|
|
88
87
|
stampable stamper_class_name: Alchemy.user_class_name
|
@@ -123,7 +122,7 @@ module Alchemy
|
|
123
122
|
unless: :systempage?
|
124
123
|
|
125
124
|
after_update :create_legacy_url,
|
126
|
-
if: :
|
125
|
+
if: :should_create_legacy_url?,
|
127
126
|
unless: :redirects_to_external?
|
128
127
|
|
129
128
|
# Concerns
|
@@ -483,9 +482,22 @@ module Alchemy
|
|
483
482
|
self.language_code = language.code
|
484
483
|
end
|
485
484
|
|
485
|
+
def should_create_legacy_url?
|
486
|
+
if active_record_5_1?
|
487
|
+
saved_change_to_urlname?
|
488
|
+
else
|
489
|
+
urlname_changed?
|
490
|
+
end
|
491
|
+
end
|
492
|
+
|
486
493
|
# Stores the old urlname in a LegacyPageUrl
|
487
494
|
def create_legacy_url
|
488
|
-
|
495
|
+
if active_record_5_1?
|
496
|
+
former_urlname = urlname_before_last_save
|
497
|
+
else
|
498
|
+
former_urlname = urlname_was
|
499
|
+
end
|
500
|
+
legacy_urls.find_or_create_by(urlname: former_urlname)
|
489
501
|
end
|
490
502
|
|
491
503
|
def set_published_at
|
@@ -24,8 +24,12 @@ module Alchemy
|
|
24
24
|
join_table: ElementToPage.table_name
|
25
25
|
|
26
26
|
after_create :autogenerate_elements, unless: -> { systempage? || do_not_autogenerate }
|
27
|
-
|
28
|
-
after_update :
|
27
|
+
|
28
|
+
after_update :trash_not_allowed_elements!,
|
29
|
+
if: :has_page_layout_changed?
|
30
|
+
|
31
|
+
after_update :autogenerate_elements,
|
32
|
+
if: :has_page_layout_changed?
|
29
33
|
end
|
30
34
|
|
31
35
|
module ClassMethods
|
@@ -276,6 +280,14 @@ module Alchemy
|
|
276
280
|
not_allowed_elements.to_a.map(&:trash!)
|
277
281
|
end
|
278
282
|
|
283
|
+
def has_page_layout_changed?
|
284
|
+
if active_record_5_1?
|
285
|
+
saved_change_to_page_layout?
|
286
|
+
else
|
287
|
+
page_layout_changed?
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
279
291
|
# Deletes unique and already present definitions from @_element_definitions.
|
280
292
|
#
|
281
293
|
def delete_unique_element_definitions!
|
@@ -14,17 +14,21 @@ module Alchemy
|
|
14
14
|
validates :name,
|
15
15
|
presence: true
|
16
16
|
validates :urlname,
|
17
|
-
uniqueness: {scope: [:language_id, :layoutpage], if:
|
17
|
+
uniqueness: {scope: [:language_id, :layoutpage], if: -> { urlname.present? }},
|
18
18
|
exclusion: {in: RESERVED_URLNAMES},
|
19
|
-
length: {minimum: 3, if:
|
19
|
+
length: {minimum: 3, if: -> { urlname.present? }},
|
20
20
|
format: {with: /\A[:\.\w\-+_\/\?&%;=]*\z/, if: :redirects_to_external?}
|
21
21
|
validates :urlname,
|
22
22
|
on: :update,
|
23
23
|
presence: {if: :redirects_to_external?}
|
24
24
|
|
25
|
-
before_save :set_title,
|
25
|
+
before_save :set_title,
|
26
|
+
unless: -> { systempage? || redirects_to_external? },
|
27
|
+
if: -> { title.blank? }
|
28
|
+
|
26
29
|
after_update :update_descendants_urlnames,
|
27
|
-
if:
|
30
|
+
if: :should_update_descendants_urlnames?
|
31
|
+
|
28
32
|
after_move :update_urlname!,
|
29
33
|
if: -> { Config.get(:url_nesting) },
|
30
34
|
unless: :redirects_to_external?
|
@@ -70,6 +74,15 @@ module Alchemy
|
|
70
74
|
|
71
75
|
private
|
72
76
|
|
77
|
+
def should_update_descendants_urlnames?
|
78
|
+
return false if !Config.get(:url_nesting)
|
79
|
+
if active_record_5_1?
|
80
|
+
saved_change_to_urlname? || saved_change_to_visible?
|
81
|
+
else
|
82
|
+
urlname_changed? || visible_changed?
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
73
86
|
def update_descendants_urlnames
|
74
87
|
reload
|
75
88
|
descendants.each do |descendant|
|
@@ -21,11 +21,12 @@
|
|
21
21
|
#
|
22
22
|
|
23
23
|
module Alchemy
|
24
|
-
class Picture <
|
24
|
+
class Picture < BaseRecord
|
25
25
|
CONVERTIBLE_FILE_FORMATS = %w(gif jpg jpeg png).freeze
|
26
26
|
|
27
27
|
include Alchemy::NameConversions
|
28
|
-
include Alchemy::
|
28
|
+
include Alchemy::Taggable
|
29
|
+
include Alchemy::ContentTouching
|
29
30
|
include Alchemy::Picture::Transformations
|
30
31
|
include Alchemy::Picture::Url
|
31
32
|
|
@@ -69,8 +70,6 @@ module Alchemy
|
|
69
70
|
case_sensitive: false,
|
70
71
|
message: Alchemy.t("not a valid image")
|
71
72
|
|
72
|
-
acts_as_taggable
|
73
|
-
|
74
73
|
stampable stamper_class_name: Alchemy.user_class_name
|
75
74
|
|
76
75
|
scope :named, ->(name) {
|
@@ -86,11 +85,9 @@ module Alchemy
|
|
86
85
|
}
|
87
86
|
|
88
87
|
scope :without_tag, -> {
|
89
|
-
where(
|
88
|
+
left_outer_joins(:taggings).where(gutentag_taggings: {id: nil})
|
90
89
|
}
|
91
90
|
|
92
|
-
after_update :touch_contents
|
93
|
-
|
94
91
|
# Class methods
|
95
92
|
|
96
93
|
class << self
|
data/app/models/alchemy/site.rb
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
#
|
16
16
|
|
17
17
|
module Alchemy
|
18
|
-
class Site <
|
18
|
+
class Site < BaseRecord
|
19
19
|
# validations
|
20
20
|
validates_presence_of :host
|
21
21
|
validates_uniqueness_of :host
|
@@ -55,8 +55,8 @@ module Alchemy
|
|
55
55
|
end
|
56
56
|
|
57
57
|
class << self
|
58
|
-
def current=(
|
59
|
-
RequestStore.store[:alchemy_current_site] =
|
58
|
+
def current=(site)
|
59
|
+
RequestStore.store[:alchemy_current_site] = site
|
60
60
|
end
|
61
61
|
|
62
62
|
def current
|
data/app/models/alchemy/tag.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# == Schema Information
|
4
4
|
#
|
5
|
-
# Table name:
|
5
|
+
# Table name: gutentag_tags
|
6
6
|
#
|
7
7
|
# id :integer not null, primary key
|
8
8
|
# name :string
|
@@ -10,9 +10,9 @@
|
|
10
10
|
#
|
11
11
|
|
12
12
|
# Just holds some useful tag methods.
|
13
|
-
# The original Tag model is
|
13
|
+
# The original Tag model is Gutentag::Tag
|
14
14
|
module Alchemy
|
15
|
-
class Tag <
|
15
|
+
class Tag < Gutentag::Tag
|
16
16
|
# Replaces tag with new tag on all models tagged with tag.
|
17
17
|
def self.replace(tag, new_tag)
|
18
18
|
tag.taggings.collect(&:taggable).each do |taggable|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
module ContentTouching
|
5
|
+
def self.included(base)
|
6
|
+
base.after_update(:touch_contents)
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
# If the model has a +contents+ association,
|
12
|
+
# it updates all their timestamps.
|
13
|
+
#
|
14
|
+
# CAUTION: Only use on bottom to top releations,
|
15
|
+
# e.g. +Alchemy::Picture+ or +Alchemy::Attachment+
|
16
|
+
# not on top to bottom ones like +Alchemy::Element+.
|
17
|
+
#
|
18
|
+
def touch_contents
|
19
|
+
return unless respond_to?(:contents)
|
20
|
+
contents.each(&:touch)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= render 'alchemy/admin/partials/remote_search_form' %>
|
15
15
|
</div>
|
16
16
|
|
17
|
-
<div id="assign_file_list" class="with_padding<%=
|
17
|
+
<div id="assign_file_list" class="with_padding<%= search_filter_params[:tagged_with].present? ? ' filtered' : '' %>">
|
18
18
|
<div id="library_sidebar">
|
19
19
|
<%= render 'filter_bar' %>
|
20
20
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<tr class="<%= cycle('even', 'odd') %>">
|
2
2
|
<td class="icon">
|
3
|
-
<%= render_icon attachment.icon_css_class %>
|
3
|
+
<%= render_icon attachment.icon_css_class, style: 'regular', size: 'lg' %>
|
4
4
|
</td>
|
5
5
|
<td class="name">
|
6
6
|
<% if can?(:show, attachment) %>
|
@@ -22,11 +22,11 @@
|
|
22
22
|
<td class="file_name"><%= attachment.file_name %></td>
|
23
23
|
<td class="file_type"><%= mime_to_human(attachment.file_mime_type) %></td>
|
24
24
|
<td class="file_size"><%= number_to_human_size(attachment.file_size) %></td>
|
25
|
-
<td class="date"><%= l(attachment.created_at, format: :default) %></td>
|
25
|
+
<td class="date"><%= l(attachment.created_at, format: :'alchemy.default') %></td>
|
26
26
|
<td class="tools long">
|
27
27
|
<% if can?(:show, attachment) %>
|
28
28
|
<%= link_to_dialog(
|
29
|
-
render_icon(
|
29
|
+
render_icon('info-circle'),
|
30
30
|
alchemy.admin_attachment_path(attachment),
|
31
31
|
{
|
32
32
|
title: attachment.name,
|
@@ -38,13 +38,10 @@
|
|
38
38
|
) %>
|
39
39
|
<% end %>
|
40
40
|
<% if can?(:download, attachment) %>
|
41
|
-
<%= link_to(
|
42
|
-
"",
|
41
|
+
<%= link_to render_icon(:download),
|
43
42
|
alchemy.download_admin_attachment_path(attachment),
|
44
43
|
title: Alchemy.t("download_file", filename: attachment.file_name),
|
45
|
-
|
46
|
-
target: "_blank"
|
47
|
-
) %>
|
44
|
+
target: "_blank" %>
|
48
45
|
<% end %>
|
49
46
|
<% if can?(:edit, attachment) %>
|
50
47
|
<%= render 'alchemy/admin/attachments/replace_button',
|
@@ -53,31 +50,24 @@
|
|
53
50
|
file_attribute: 'file' %>
|
54
51
|
<% end %>
|
55
52
|
<% if can?(:destroy, attachment) %>
|
56
|
-
<%= link_to_confirm_dialog(
|
57
|
-
"",
|
53
|
+
<%= link_to_confirm_dialog render_icon(:minus),
|
58
54
|
Alchemy.t(:confirm_to_delete_file),
|
59
55
|
alchemy.admin_attachment_path(
|
60
56
|
id: attachment,
|
61
|
-
q:
|
57
|
+
q: search_filter_params[:q],
|
62
58
|
page: params[:page],
|
63
59
|
per_page: params[:per_page]
|
64
60
|
),
|
65
|
-
|
66
|
-
class: 'icon file_delete',
|
67
|
-
title: Alchemy.t(:delete_file)
|
68
|
-
}
|
69
|
-
) %>
|
61
|
+
title: Alchemy.t(:delete_file) %>
|
70
62
|
<% end %>
|
71
63
|
<% if can?(:edit, attachment) %>
|
72
|
-
<%= link_to_dialog(
|
73
|
-
alchemy.edit_admin_attachment_path(attachment, q:
|
64
|
+
<%= link_to_dialog render_icon(:edit),
|
65
|
+
alchemy.edit_admin_attachment_path(attachment, q: search_filter_params[:q], page: params[:page]),
|
74
66
|
{
|
75
67
|
title: Alchemy.t(:rename_file),
|
76
68
|
size: '500x250'
|
77
69
|
},
|
78
|
-
|
79
|
-
title: Alchemy.t(:rename_file)
|
80
|
-
) %>
|
70
|
+
title: Alchemy.t(:rename_file) %>
|
81
71
|
<% end %>
|
82
72
|
</td>
|
83
73
|
</tr>
|
@@ -1,31 +1,28 @@
|
|
1
|
-
<% if @attachments.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<%= render_icon('info') %>
|
9
|
-
<%= Alchemy.t(:no_search_results) %>
|
10
|
-
</div>
|
11
|
-
<% end %>
|
12
|
-
<table id="all_files" class="list">
|
13
|
-
<% unless @attachments.blank? %>
|
14
|
-
<thead>
|
15
|
-
<tr>
|
16
|
-
<th class="icon"></th>
|
17
|
-
<th class="name"><%= sort_link(@query, :name, hide_indicator: true) %></th>
|
18
|
-
<th class="file_name"><%= sort_link(@query, :file_name, hide_indicator: true) %></th>
|
19
|
-
<th class="file_type"><%= Alchemy::Attachment.human_attribute_name('file_mime_type') %></th>
|
20
|
-
<th class="file_size"><%= sort_link(@query, :file_size, hide_indicator: true) %></th>
|
21
|
-
<th class="date"><%= sort_link(@query, :created_at, hide_indicator: true) %></th>
|
22
|
-
<th class="tools"></th>
|
23
|
-
</tr>
|
24
|
-
</thead>
|
1
|
+
<% if @attachments.empty? %>
|
2
|
+
<%= render_message do %>
|
3
|
+
<% if search_filter_params[:q].present? %>
|
4
|
+
<%= Alchemy.t(:no_search_results) %>
|
5
|
+
<% else %>
|
6
|
+
<%= Alchemy.t(:no_files_in_archive) %>
|
7
|
+
<% end %>
|
25
8
|
<% end %>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
9
|
+
<% else %>
|
10
|
+
<table id="all_files" class="list">
|
11
|
+
<thead>
|
12
|
+
<tr>
|
13
|
+
<th class="icon"></th>
|
14
|
+
<th class="name"><%= sort_link(@query, :name, hide_indicator: true) %></th>
|
15
|
+
<th class="file_name"><%= sort_link(@query, :file_name, hide_indicator: true) %></th>
|
16
|
+
<th class="file_type"><%= Alchemy::Attachment.human_attribute_name('file_mime_type') %></th>
|
17
|
+
<th class="file_size"><%= sort_link(@query, :file_size, hide_indicator: true) %></th>
|
18
|
+
<th class="date"><%= sort_link(@query, :created_at, hide_indicator: true) %></th>
|
19
|
+
<th class="tools"></th>
|
20
|
+
</tr>
|
21
|
+
</thead>
|
22
|
+
<tbody>
|
23
|
+
<%= render partial: 'alchemy/admin/attachments/attachment', collection: @attachments %>
|
24
|
+
</tbody>
|
25
|
+
</table>
|
30
26
|
|
31
|
-
<%= paginate @attachments, theme: 'alchemy' %>
|
27
|
+
<%= paginate @attachments, theme: 'alchemy' %>
|
28
|
+
<% end %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
'file_type_filter',
|
5
5
|
options_for_select(
|
6
6
|
Alchemy::Attachment.file_types_for_select,
|
7
|
-
|
7
|
+
search_filter_params[:file_type]
|
8
8
|
),
|
9
9
|
include_blank: Alchemy.t('Show all files'),
|
10
10
|
data: { remote: !!request.xhr? },
|
@@ -20,9 +20,8 @@
|
|
20
20
|
if ($this.data('remote') === true) {
|
21
21
|
$.get(url, {file_type: $this.val()}, null, 'script');
|
22
22
|
} else {
|
23
|
-
Alchemy.pleaseWaitOverlay();
|
24
23
|
delimiter = url.match(/\?/) ? '&' : '?';
|
25
|
-
|
24
|
+
Turbolinks.visit(url + delimiter + 'file_type=' + encodeURIComponent($this.val()));
|
26
25
|
}
|
27
26
|
return false;
|
28
27
|
});
|