locomotive_cms 2.0.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile +3 -3
- data/README.textile +7 -7
- data/app/assets/images/locomotive/icons/flags/ja.png +0 -0
- data/app/assets/javascripts/locomotive/aloha.js.coffee +3 -0
- data/app/assets/javascripts/locomotive/models/page.js.coffee +1 -1
- data/app/assets/javascripts/locomotive/models/site.js.coffee +16 -6
- data/app/assets/javascripts/locomotive/utils/aloha_settings.js.coffee +1 -1
- data/app/assets/javascripts/locomotive/views/content_entries/_form_view.js.coffee +5 -0
- data/app/assets/javascripts/locomotive/views/my_account/edit_view.js.coffee +14 -0
- data/app/assets/javascripts/locomotive/views/pages/_form_view.js.coffee +1 -1
- data/app/assets/javascripts/locomotive/views/pages/edit_view.js.coffee +2 -1
- data/app/assets/javascripts/tinymce/plugins/locomotive_media/langs/de.js +1 -0
- data/app/assets/stylesheets/locomotive.css +1 -0
- data/app/assets/stylesheets/locomotive/backoffice/formtastic_changes.css.scss +18 -3
- data/app/assets/stylesheets/locomotive/backoffice/layout.css.scss +1 -1
- data/app/assets/stylesheets/locomotive/backoffice/menu/main.css.scss +7 -3
- data/app/assets/stylesheets/locomotive/backoffice/pagination.css.scss +37 -0
- data/app/assets/stylesheets/locomotive/backoffice/tagit_changes.css.scss +49 -0
- data/app/cells/locomotive/content_locale_picker/show.html.haml +1 -1
- data/app/cells/locomotive/global_actions_cell.rb +8 -8
- data/app/cells/locomotive/main_menu/show.html.haml +2 -2
- data/app/cells/locomotive/main_menu_cell.rb +2 -2
- data/app/cells/locomotive/menu_cell.rb +6 -6
- data/app/cells/locomotive/partials_cell.rb +21 -0
- data/app/cells/locomotive/settings_menu_cell.rb +4 -4
- data/app/cells/locomotive/sub_menu/show.html.haml +2 -2
- data/app/cells/locomotive/sub_menu_cell.rb +1 -1
- data/app/controllers/locomotive/accounts_controller.rb +4 -4
- data/app/controllers/locomotive/api/accounts_controller.rb +1 -0
- data/app/controllers/locomotive/api/content_assets_controller.rb +1 -1
- data/app/controllers/locomotive/api/content_entries_controller.rb +1 -1
- data/app/controllers/locomotive/api/content_types_controller.rb +2 -2
- data/app/controllers/locomotive/api/pages_controller.rb +1 -1
- data/app/controllers/locomotive/api/snippets_controller.rb +1 -1
- data/app/controllers/locomotive/api/theme_assets_controller.rb +47 -0
- data/app/controllers/locomotive/api/tokens_controller.rb +2 -2
- data/app/controllers/locomotive/base_controller.rb +5 -2
- data/app/controllers/locomotive/content_assets_controller.rb +1 -1
- data/app/controllers/locomotive/content_entries_controller.rb +22 -9
- data/app/controllers/locomotive/content_types_controller.rb +6 -6
- data/app/controllers/locomotive/current_site_controller.rb +6 -6
- data/app/controllers/locomotive/installation_controller.rb +11 -3
- data/app/controllers/locomotive/memberships_controller.rb +6 -6
- data/app/controllers/locomotive/my_account_controller.rb +9 -3
- data/app/controllers/locomotive/pages_controller.rb +10 -6
- data/app/controllers/locomotive/passwords_controller.rb +1 -1
- data/app/controllers/locomotive/public/content_entries_controller.rb +1 -1
- data/app/controllers/locomotive/public/pages_controller.rb +5 -5
- data/app/controllers/locomotive/public/robots_controller.rb +1 -1
- data/app/controllers/locomotive/public/sitemaps_controller.rb +1 -1
- data/app/controllers/locomotive/sessions_controller.rb +1 -1
- data/app/controllers/locomotive/sites_controller.rb +5 -5
- data/app/controllers/locomotive/snippets_controller.rb +6 -6
- data/app/controllers/locomotive/theme_assets_controller.rb +6 -6
- data/app/controllers/locomotive/translations_controller.rb +1 -1
- data/app/helpers/locomotive/accounts_helper.rb +1 -1
- data/app/helpers/locomotive/base_helper.rb +13 -21
- data/app/helpers/locomotive/content_types_helper.rb +3 -3
- data/app/helpers/locomotive/custom_fields_helper.rb +5 -5
- data/app/helpers/locomotive/installation_helper.rb +1 -1
- data/app/helpers/locomotive/pages_helper.rb +5 -5
- data/app/helpers/locomotive/snippets_helper.rb +1 -1
- data/app/helpers/locomotive/theme_assets_helper.rb +1 -1
- data/app/helpers/locomotive/translations_helper.rb +2 -2
- data/app/inputs/locomotive/api_key_input.rb +40 -0
- data/app/inputs/locomotive/code_input.rb +5 -5
- data/app/inputs/locomotive/file_input.rb +6 -6
- data/app/inputs/locomotive/locale_input.rb +5 -5
- data/app/inputs/locomotive/locales_input.rb +4 -4
- data/app/inputs/locomotive/rte_input.rb +1 -1
- data/app/inputs/locomotive/small_code_input.rb +1 -1
- data/app/inputs/locomotive/subdomain_input.rb +1 -1
- data/app/mailers/locomotive/devise_mailer.rb +1 -1
- data/app/mailers/locomotive/notifications.rb +3 -3
- data/app/models/locomotive/ability.rb +10 -11
- data/app/models/locomotive/account.rb +61 -26
- data/app/models/locomotive/content_asset.rb +8 -8
- data/app/models/locomotive/content_entry.rb +8 -7
- data/app/models/locomotive/content_type.rb +12 -7
- data/app/models/locomotive/editable_control.rb +2 -2
- data/app/models/locomotive/editable_element.rb +13 -8
- data/app/models/locomotive/editable_file.rb +5 -3
- data/app/models/locomotive/editable_short_text.rb +3 -3
- data/app/models/locomotive/extensions/asset/types.rb +2 -2
- data/app/models/locomotive/extensions/content_entry/csv.rb +78 -0
- data/app/models/locomotive/extensions/content_type/item_template.rb +3 -3
- data/app/models/locomotive/extensions/content_type/sync.rb +4 -4
- data/app/models/locomotive/extensions/page/editable_elements.rb +1 -1
- data/app/models/locomotive/extensions/page/parse.rb +2 -2
- data/app/models/locomotive/extensions/page/render.rb +7 -1
- data/app/models/locomotive/extensions/page/templatized.rb +20 -15
- data/app/models/locomotive/extensions/page/tree.rb +4 -4
- data/app/models/locomotive/extensions/shared/seo.rb +3 -3
- data/app/models/locomotive/extensions/site/first_installation.rb +5 -2
- data/app/models/locomotive/extensions/site/locales.rb +9 -6
- data/app/models/locomotive/extensions/site/subdomain_domains.rb +8 -8
- data/app/models/locomotive/membership.rb +6 -6
- data/app/models/locomotive/page.rb +30 -23
- data/app/models/locomotive/site.rb +19 -15
- data/app/models/locomotive/snippet.rb +5 -5
- data/app/models/locomotive/theme_asset.rb +17 -6
- data/app/models/locomotive/translation.rb +21 -16
- data/app/presenters/locomotive/account_presenter.rb +1 -1
- data/app/presenters/locomotive/content_entry_presenter.rb +2 -2
- data/app/presenters/locomotive/content_field_presenter.rb +2 -2
- data/app/presenters/locomotive/content_type_presenter.rb +6 -1
- data/app/presenters/locomotive/theme_asset_presenter.rb +2 -2
- data/app/uploaders/locomotive/editable_file_uploader.rb +1 -1
- data/app/uploaders/locomotive/theme_asset_uploader.rb +1 -1
- data/app/views/locomotive/accounts/new.html.haml +6 -6
- data/app/views/locomotive/content_assets/_asset.html.haml +3 -3
- data/app/views/locomotive/content_assets/_picker.html.haml +12 -12
- data/app/views/locomotive/content_entries/_form.html.haml +9 -8
- data/app/views/locomotive/content_entries/_list.html.haml +8 -5
- data/app/views/locomotive/content_entries/edit.html.haml +6 -6
- data/app/views/locomotive/content_entries/index.html.haml +8 -6
- data/app/views/locomotive/content_entries/new.html.haml +5 -5
- data/app/views/locomotive/content_types/_form.html.haml +16 -16
- data/app/views/locomotive/content_types/edit.html.haml +5 -5
- data/app/views/locomotive/content_types/new.html.haml +3 -3
- data/app/views/locomotive/current_site/_form.html.haml +12 -12
- data/app/views/locomotive/current_site/edit.html.haml +5 -5
- data/app/views/locomotive/custom_fields/_form.html.haml +23 -19
- data/app/views/locomotive/custom_fields/_select_templates.html.haml +5 -5
- data/app/views/locomotive/custom_fields/types/_belongs_to.html.haml +4 -4
- data/app/views/locomotive/custom_fields/types/_boolean.html.haml +3 -3
- data/app/views/locomotive/custom_fields/types/_date.html.haml +4 -4
- data/app/views/locomotive/custom_fields/types/_email.html.haml +4 -0
- data/app/views/locomotive/custom_fields/types/_file.html.haml +3 -3
- data/app/views/locomotive/custom_fields/types/_float.html.haml +6 -0
- data/app/views/locomotive/custom_fields/types/_has_many.html.haml +10 -10
- data/app/views/locomotive/custom_fields/types/_integer.html.haml +5 -0
- data/app/views/locomotive/custom_fields/types/_many_to_many.html.haml +10 -10
- data/app/views/locomotive/custom_fields/types/_select.html.haml +10 -10
- data/app/views/locomotive/custom_fields/types/_string.html.haml +3 -3
- data/app/views/locomotive/custom_fields/types/_tags.html.haml +4 -0
- data/app/views/locomotive/custom_fields/types/_text.html.haml +4 -4
- data/app/views/locomotive/devise_mailer/reset_password_instructions.html.haml +1 -1
- data/app/views/locomotive/installation/step_1.html.haml +5 -5
- data/app/views/locomotive/installation/step_2.html.haml +6 -6
- data/app/views/locomotive/kaminari/_first_page.html.haml +2 -0
- data/app/views/locomotive/kaminari/_gap.html.haml +2 -0
- data/app/views/locomotive/kaminari/_last_page.html.haml +2 -0
- data/app/views/locomotive/kaminari/_next_page.html.haml +2 -0
- data/app/views/locomotive/kaminari/_page.html.haml +2 -0
- data/app/views/locomotive/kaminari/_paginator.html.haml +11 -0
- data/app/views/locomotive/kaminari/_prev_page.html.haml +2 -0
- data/app/views/locomotive/layouts/application.html.haml +2 -2
- data/app/views/locomotive/layouts/not_logged_in.html.haml +3 -3
- data/app/views/locomotive/memberships/new.html.haml +4 -4
- data/app/views/locomotive/my_account/edit.html.haml +14 -13
- data/app/views/locomotive/notifications/new_content_entry.html.haml +2 -2
- data/app/views/locomotive/pages/_editable_elements.html.haml +20 -20
- data/app/views/locomotive/pages/_form.html.haml +23 -27
- data/app/views/locomotive/pages/_page.html.haml +6 -6
- data/app/views/locomotive/pages/edit.html.haml +5 -5
- data/app/views/locomotive/pages/index.html.haml +2 -2
- data/app/views/locomotive/pages/new.html.haml +4 -4
- data/app/views/locomotive/passwords/edit.html.haml +3 -3
- data/app/views/locomotive/passwords/new.html.haml +2 -2
- data/app/views/locomotive/public/pages/show_toolbar.html.haml +15 -15
- data/app/views/locomotive/sessions/new.html.haml +4 -4
- data/app/views/locomotive/shared/_footer.html.haml +1 -1
- data/app/views/locomotive/shared/_head.html.haml +7 -7
- data/app/views/locomotive/shared/_header.html.haml +2 -2
- data/app/views/locomotive/shared/_locale_picker_link.html.haml +1 -1
- data/app/views/locomotive/shared/_site_picker.html.haml +2 -2
- data/app/views/locomotive/shared/actions/_contents.html.haml +1 -1
- data/app/views/locomotive/shared/menu/_contents.html.haml +5 -5
- data/app/views/locomotive/sites/_domains.html.haml +7 -7
- data/app/views/locomotive/sites/_form.html.haml +6 -1
- data/app/views/locomotive/sites/_memberships.html.haml +3 -3
- data/app/views/locomotive/sites/new.html.haml +3 -3
- data/app/views/locomotive/snippets/_form.html.haml +6 -6
- data/app/views/locomotive/snippets/_snippet.html.haml +2 -2
- data/app/views/locomotive/snippets/edit.html.haml +5 -5
- data/app/views/locomotive/snippets/new.html.haml +3 -3
- data/app/views/locomotive/theme_assets/_asset.html.haml +2 -2
- data/app/views/locomotive/theme_assets/_form.html.haml +10 -10
- data/app/views/locomotive/theme_assets/_list.html.haml +3 -3
- data/app/views/locomotive/theme_assets/_picker.html.haml +8 -8
- data/app/views/locomotive/theme_assets/edit.html.haml +7 -7
- data/app/views/locomotive/theme_assets/index.html.haml +6 -6
- data/app/views/locomotive/theme_assets/new.html.haml +3 -3
- data/app/views/locomotive/translations/_form.html.haml +3 -3
- data/app/views/locomotive/translations/edit.html.haml +6 -6
- data/app/views/locomotive/translations/index.html.haml +2 -0
- data/app/views/locomotive/translations/new.html.haml +2 -2
- data/config/initializers/csv_renderer.rb +10 -0
- data/config/locales/admin_ui.de.yml +1 -0
- data/config/locales/admin_ui.en.yml +12 -0
- data/config/locales/admin_ui.es.yml +1 -0
- data/config/locales/admin_ui.et.yml +1 -0
- data/config/locales/admin_ui.fr.yml +12 -0
- data/config/locales/admin_ui.it.yml +1 -0
- data/config/locales/admin_ui.ja.yml +335 -0
- data/config/locales/admin_ui.nb.yml +1 -0
- data/config/locales/admin_ui.nl.yml +1 -0
- data/config/locales/admin_ui.pl.yml +1 -0
- data/config/locales/admin_ui.pt-BR.yml +8 -0
- data/config/locales/admin_ui.ru.yml +1 -0
- data/config/locales/carrierwave.ja.yml +4 -0
- data/config/locales/default.de.yml +1 -1
- data/config/locales/default.en.yml +1 -1
- data/config/locales/default.es.yml +3 -0
- data/config/locales/default.et.yml +2 -2
- data/config/locales/default.fr.yml +1 -1
- data/config/locales/default.it.yml +3 -0
- data/config/locales/default.ja.yml +94 -0
- data/config/locales/default.nb.yml +1 -1
- data/config/locales/default.nl.yml +5 -0
- data/config/locales/default.pl.yml +2 -2
- data/config/locales/default.pt-BR.yml +3 -2
- data/config/locales/default.ru.yml +19 -16
- data/config/locales/devise.ja.yml +63 -0
- data/config/locales/flash.ja.yml +115 -0
- data/config/locales/formtastic.en.yml +7 -0
- data/config/locales/formtastic.fr.yml +9 -0
- data/config/locales/formtastic.ja.yml +103 -0
- data/config/locales/formtastic.pt-BR.yml +1 -1
- data/config/routes.rb +5 -2
- data/features/api/authentication.feature +24 -2
- data/features/api/authorization/pages.feature +3 -1
- data/features/api/entries_custom_fields.feature +2 -2
- data/features/backoffice/authorization/pages.feature +7 -7
- data/features/backoffice/content_types/email.feature +26 -0
- data/features/backoffice/content_types/has_many.feature +20 -0
- data/features/backoffice/content_types/integer.feature +26 -0
- data/features/backoffice/content_types/many_to_many.feature +29 -1
- data/features/backoffice/content_types/tags.feature +22 -0
- data/features/backoffice/content_types/uniqueness.feature +29 -0
- data/features/backoffice/contents.feature +16 -0
- data/features/backoffice/installation.feature +33 -0
- data/features/backoffice/my_account.feature +21 -0
- data/features/backoffice/pages.feature +21 -1
- data/features/backoffice/site.feature +59 -40
- data/features/backoffice/snippets.feature +1 -1
- data/features/backoffice/translations.feature +7 -1
- data/features/public/basic.feature +1 -1
- data/features/public/pages.feature +92 -0
- data/features/public/session.feature +40 -0
- data/features/public/tags.feature +45 -0
- data/features/step_definitions/backoffice_steps.rb +4 -0
- data/features/step_definitions/content_types_steps.rb +16 -3
- data/features/step_definitions/more_web_steps.rb +35 -4
- data/features/step_definitions/page_steps.rb +52 -35
- data/features/step_definitions/pagination_steps.rb +4 -4
- data/features/step_definitions/site_steps.rb +22 -10
- data/features/step_definitions/snippet_steps.rb +1 -1
- data/features/step_definitions/theme_asset_steps.rb +2 -2
- data/features/step_definitions/translation_steps.rb +1 -1
- data/features/step_definitions/web_steps.rb +1 -1
- data/features/support/http.rb +1 -1
- data/features/support/locales.rb +5 -0
- data/lib/generators/locomotive/install/install_generator.rb +1 -6
- data/lib/generators/locomotive/install/templates/carrierwave.rb +4 -4
- data/lib/generators/locomotive/install/templates/locomotive.rb +12 -7
- data/lib/locomotive.rb +4 -4
- data/lib/locomotive/action_controller.rb +1 -0
- data/lib/locomotive/action_controller/responder.rb +9 -10
- data/lib/locomotive/action_controller/section_helpers.rb +1 -1
- data/lib/locomotive/action_controller/ssl.rb +11 -0
- data/lib/locomotive/action_controller/url_helpers.rb +9 -5
- data/lib/locomotive/carrierwave/asset.rb +6 -6
- data/lib/locomotive/configuration.rb +28 -26
- data/lib/locomotive/core_ext.rb +1 -2
- data/lib/locomotive/custom_fields.rb +12 -6
- data/lib/locomotive/dependencies.rb +1 -0
- data/lib/locomotive/dragonfly.rb +1 -1
- data/lib/locomotive/engine.rb +3 -3
- data/lib/locomotive/formtastic.rb +1 -1
- data/lib/locomotive/httparty/webservice.rb +1 -1
- data/lib/locomotive/kaminari.rb +28 -13
- data/lib/locomotive/liquid.rb +1 -0
- data/lib/locomotive/liquid/drops/content_entry.rb +1 -1
- data/lib/locomotive/liquid/drops/content_types.rb +27 -2
- data/lib/locomotive/liquid/drops/page.rb +14 -2
- data/lib/locomotive/liquid/drops/proxy_collection.rb +4 -0
- data/lib/locomotive/liquid/drops/session_proxy.rb +16 -0
- data/lib/locomotive/liquid/drops/site.rb +11 -3
- data/lib/locomotive/liquid/drops/uploader.rb +1 -1
- data/lib/locomotive/liquid/filters/base.rb +1 -1
- data/lib/locomotive/liquid/filters/date.rb +2 -2
- data/lib/locomotive/liquid/filters/html.rb +12 -12
- data/lib/locomotive/liquid/filters/translate.rb +21 -3
- data/lib/locomotive/liquid/tags/consume.rb +50 -19
- data/lib/locomotive/liquid/tags/editable/base.rb +9 -9
- data/lib/locomotive/liquid/tags/editable/control.rb +1 -1
- data/lib/locomotive/liquid/tags/editable/file.rb +1 -1
- data/lib/locomotive/liquid/tags/editable/short_text.rb +1 -1
- data/lib/locomotive/liquid/tags/fetch_page.rb +28 -0
- data/lib/locomotive/liquid/tags/hybrid.rb +25 -0
- data/lib/locomotive/liquid/tags/inherited_block.rb +2 -2
- data/lib/locomotive/liquid/tags/inline_editor.rb +4 -4
- data/lib/locomotive/liquid/tags/javascript.rb +16 -0
- data/lib/locomotive/liquid/tags/link_to.rb +42 -0
- data/lib/locomotive/liquid/tags/locale_switcher.rb +1 -1
- data/lib/locomotive/liquid/tags/nav.rb +2 -2
- data/lib/locomotive/liquid/tags/paginate.rb +2 -2
- data/lib/locomotive/liquid/tags/session_assign.rb +39 -0
- data/lib/locomotive/liquid/tags/snippet.rb +1 -1
- data/lib/locomotive/liquid/tags/with_scope.rb +6 -2
- data/lib/locomotive/logger.rb +1 -1
- data/lib/locomotive/middlewares/cache.rb +1 -1
- data/lib/locomotive/middlewares/fonts.rb +1 -1
- data/lib/locomotive/middlewares/inline_editor.rb +1 -1
- data/lib/locomotive/middlewares/permalink.rb +1 -1
- data/lib/locomotive/middlewares/seo_trailing_slash.rb +1 -1
- data/lib/locomotive/mongoid/patches.rb +21 -21
- data/lib/locomotive/rails/action_view.rb +20 -4
- data/lib/locomotive/regexps.rb +1 -1
- data/lib/locomotive/render.rb +4 -2
- data/lib/locomotive/routing/default_constraint.rb +1 -1
- data/lib/locomotive/routing/site_dispatcher.rb +1 -1
- data/lib/locomotive/session_store.rb +7 -7
- data/lib/locomotive/version.rb +1 -1
- data/lib/tasks/development.rake +11 -9
- data/lib/tasks/locomotive.rake +11 -11
- data/mongodb/migrate/20130204072721_make_editable_elements_consistent.rb +3 -1
- data/mongodb/migrate/20130326201349_rename_entry_to_content_entry.rb +6 -6
- data/mongodb/migrate/20130511121956_generate_checksum_for_theme_assets.rb +14 -0
- data/mongodb/migrate/20130530162559_api_key_for_all_accounts.rb +10 -0
- data/spec/cells/locomotive/global_actions_spec.rb +11 -11
- data/spec/cells/locomotive/main_menu_cell_spec.rb +9 -9
- data/spec/cells/locomotive/settings_menu_cell_spec.rb +11 -11
- data/spec/dummy/config/environments/development.rb +1 -1
- data/spec/dummy/config/initializers/locomotive.rb +16 -11
- data/spec/dummy/config/mongoid.yml +99 -18
- data/spec/lib/action_view_spec.rb +19 -0
- data/spec/lib/core_ext_spec.rb +2 -2
- data/spec/lib/locomotive/configuration_spec.rb +1 -1
- data/spec/lib/locomotive/httparty/webservice_spec.rb +6 -6
- data/spec/lib/locomotive/liquid/drops/content_entry_spec.rb +1 -1
- data/spec/lib/locomotive/liquid/drops/current_user.rb +3 -3
- data/spec/lib/locomotive/liquid/drops/page_spec.rb +63 -14
- data/spec/lib/locomotive/liquid/drops/site_spec.rb +3 -3
- data/spec/lib/locomotive/liquid/filters/html_spec.rb +22 -7
- data/spec/lib/locomotive/liquid/filters/resize_spec.rb +3 -3
- data/spec/lib/locomotive/liquid/filters/translate_spec.rb +26 -12
- data/spec/lib/locomotive/liquid/tags/consume_spec.rb +26 -2
- data/spec/lib/locomotive/liquid/tags/csrf_spec.rb +3 -3
- data/spec/lib/locomotive/liquid/tags/editable/short_text_spec.rb +1 -1
- data/spec/lib/locomotive/liquid/tags/extends_spec.rb +5 -5
- data/spec/lib/locomotive/liquid/tags/javascript_spec.rb +18 -0
- data/spec/lib/locomotive/liquid/tags/locale_switcher_spec.rb +23 -13
- data/spec/lib/locomotive/liquid/tags/nav_spec.rb +11 -11
- data/spec/lib/locomotive/liquid/tags/paginate_spec.rb +13 -13
- data/spec/lib/locomotive/liquid/tags/seo_spec.rb +8 -8
- data/spec/lib/locomotive/liquid/tags/with_scope_spec.rb +8 -2
- data/spec/lib/locomotive/presentable_spec.rb +10 -10
- data/spec/lib/locomotive/render_spec.rb +14 -14
- data/spec/mailers/locomotive/notifications_spec.rb +3 -3
- data/spec/models/locomotive/ability_spec.rb +23 -9
- data/spec/models/locomotive/account_spec.rb +30 -8
- data/spec/models/locomotive/content_asset_spec.rb +1 -1
- data/spec/models/locomotive/content_entry_spec.rb +57 -2
- data/spec/models/locomotive/content_type_spec.rb +42 -41
- data/spec/models/locomotive/editable_control_spec.rb +5 -5
- data/spec/models/locomotive/editable_file_spec.rb +21 -5
- data/spec/models/locomotive/editable_long_text_spec.rb +3 -3
- data/spec/models/locomotive/editable_short_text_spec.rb +8 -8
- data/spec/models/locomotive/extensions/page/editable_elements_spec.rb +9 -9
- data/spec/models/locomotive/extensions/page/redirect_spec.rb +1 -1
- data/spec/models/locomotive/extensions/page/render_spec.rb +4 -8
- data/spec/models/locomotive/extensions/site/locales_spec.rb +2 -2
- data/spec/models/locomotive/membership_spec.rb +5 -5
- data/spec/models/locomotive/page_spec.rb +10 -1
- data/spec/models/locomotive/site_spec.rb +19 -19
- data/spec/models/locomotive/snippet_spec.rb +9 -9
- data/spec/models/locomotive/theme_asset_spec.rb +91 -57
- data/spec/requests/admin_ssl_spec.rb +25 -0
- data/spec/support/factories.rb +32 -27
- data/spec/support/locomotive.rb +2 -0
- data/vendor/assets/javascripts/locomotive/backbone.sync.js +1 -1
- data/vendor/assets/javascripts/locomotive/tag-it.min.js +16 -0
- data/vendor/assets/stylesheets/locomotive/jquery.tagit.css +67 -0
- metadata +108 -138
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NzBmOTE4ZGVmMDU2MjQ0OWExNjRiYTE5YmNjM2U1MDA2ODcyZGI2NQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MDU5YTVkZDExMzdiYjEwYmJiYzhiNWIyNjMzYTRlMWRlOTViMjQ0ZA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZDNhZDI1Nzk0ZmMwZmI3ZDIwOTc4NzI0NDlhZTljMjQ4MGZjYWM3N2JmNTAx
|
10
|
+
MDhlZDA2MGU4ODU0OWU2MzRjMDYxMmFiZWM4YWEwMjdiYmZjZTdjMTMxYTU4
|
11
|
+
NDA0MWUxMmNmZGYxMDI2MGVlMWE4MTg4YTExNDg2N2VlMTU1MDQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YzkyMWQ3NmQ3NjY3NTEzYTYyYzk4MzNiNTI3YmUyZGNkNTY2MDA4MDdkNTA4
|
14
|
+
NDhmZDc2NTY3ZDIxYTk1M2M2ZDFkNGZiZmY2OTIyNGZmZDczYjRkMTM5MWQw
|
15
|
+
YjEyODUyZmI2MmZiODdiODk4NDQ3MTFiNzZkMmYxZWVmMzJkNjg=
|
data/Gemfile
CHANGED
@@ -3,9 +3,6 @@
|
|
3
3
|
|
4
4
|
source "https://rubygems.org"
|
5
5
|
|
6
|
-
# net-scp 1.0.6 was yanked
|
7
|
-
gem 'net-scp', '1.0.4'
|
8
|
-
|
9
6
|
gemspec # Include gemspec dependencies
|
10
7
|
|
11
8
|
group :assets do
|
@@ -24,12 +21,15 @@ end
|
|
24
21
|
|
25
22
|
group :development do
|
26
23
|
# gem 'custom_fields', path: '../gems/custom_fields' # for Developers
|
24
|
+
# gem 'custom_fields', github: 'locomotivecms/custom_fields'
|
27
25
|
# gem 'custom_fields', git: 'git://github.com/locomotivecms/custom_fields.git', branch: '2.0.0.rc' # Branch on Github
|
28
26
|
|
29
27
|
# gem 'locomotive-aloha-rails', path: '../gems/aloha-rails' # for Developers
|
30
28
|
# gem 'locomotive-tinymce-rails', path: '../gems/tinymce-rails' # for Developers
|
31
29
|
# gem 'locomotive_liquid', path: '../gems/liquid' # for Developers
|
32
30
|
|
31
|
+
# gem 'carrierwave-mongoid', git: 'git://github.com/locomotivecms/carrierwave-mongoid.git'
|
32
|
+
|
33
33
|
gem 'unicorn' # Using unicorn_rails instead of webrick (default server)
|
34
34
|
|
35
35
|
end
|
data/README.textile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
h1.
|
1
|
+
h1. LocomotiveCMS
|
2
2
|
|
3
3
|
"!https://secure.travis-ci.org/locomotivecms/engine.png!":http://travis-ci.org/locomotivecms/engine
|
4
4
|
|
@@ -6,7 +6,7 @@ h1. Locomotive CMS
|
|
6
6
|
|
7
7
|
"!https://gemnasium.com/locomotivecms/engine.png(Dependency Status)!":https://gemnasium.com/locomotivecms/engine
|
8
8
|
|
9
|
-
|
9
|
+
LocomotiveCMS is a simple but powerful CMS based on liquid templates and mongodb database. At my company ("NoCoffee":http://www.nocoffee.fr), we use it for our clients when they request a simple website.
|
10
10
|
|
11
11
|
If we have to give a couple of features to describe our application, there will be:
|
12
12
|
|
@@ -28,7 +28,7 @@ h2. Gems
|
|
28
28
|
Here is a short list of main gems / technologies used in the application.
|
29
29
|
|
30
30
|
* Rails 3.2.13
|
31
|
-
* Mongoid
|
31
|
+
* Mongoid 3.1.3 (with MongoDB 2.x)
|
32
32
|
* Liquid
|
33
33
|
* Devise
|
34
34
|
* Carrierwave
|
@@ -39,7 +39,7 @@ Here is a short list of main gems / technologies used in the application.
|
|
39
39
|
|
40
40
|
h2. Installation
|
41
41
|
|
42
|
-
See the "installation documentation on the official website":http://doc.locomotivecms.com
|
42
|
+
See the "installation documentation on the official website":http://doc.locomotivecms.com
|
43
43
|
|
44
44
|
h2. Upgrading
|
45
45
|
|
@@ -51,9 +51,9 @@ h2. Community
|
|
51
51
|
* Join us on IRC "#locomotivecms at irc.freenode.net!":http://webchat.freenode.net/
|
52
52
|
* "Follow us on twitter":http://twitter.com/locomotivecms
|
53
53
|
|
54
|
-
h2. Contributing to
|
54
|
+
h2. Contributing to LocomotiveCMS
|
55
55
|
|
56
|
-
|
56
|
+
LocomotiveCMS is an open source project, we encourage contributions. If you have found a bug and want to contribute a fix, or have a new feature you would like to add, follow the steps below to get your patch into the project:
|
57
57
|
|
58
58
|
* Install ruby and mongoDB
|
59
59
|
* Clone the project <code>git clone git@github.com:locomotivecms/engine.git</code>
|
@@ -81,7 +81,7 @@ h2. Credits
|
|
81
81
|
|
82
82
|
"Rodrigo Alvarez":http://blog.codecaster.es/ for his plugin named Congo which gave us a good starting point and for his availability for (very late) tech discussions.
|
83
83
|
|
84
|
-
"Emmanuel Grard":http://www.grardesign.com designed the awesome locomotive illustration in the locomotivecms.com landing page.
|
84
|
+
"Emmanuel Grard":http://www.grardesign.com designed the awesome locomotive illustration in the old locomotivecms.com landing page.
|
85
85
|
|
86
86
|
"Font Awesome":http://fortawesome.github.com/Font-Awesome for providing the best icons. Make the whole back-office Retina-ready.
|
87
87
|
|
Binary file
|
@@ -16,7 +16,7 @@ class Locomotive.Models.Page extends Backbone.Model
|
|
16
16
|
|
17
17
|
toJSON: ->
|
18
18
|
_.tap super, (hash) =>
|
19
|
-
_.each ['fullpath', 'localized_fullpaths', 'templatized_from_parent', 'target_klass_name_text', 'content_type_id_text', 'edit_url', 'parent_id_text', 'response_type_text'], (key) => delete hash[key]
|
19
|
+
_.each ['fullpath', 'localized_fullpaths', 'templatized_from_parent', 'target_klass_name_text', 'content_type_id_text', 'edit_url', 'parent_id_text', 'response_type_text', 'translated_in'], (key) => delete hash[key]
|
20
20
|
|
21
21
|
delete hash['editable_elements']
|
22
22
|
hash.editable_elements = @get('editable_elements').toJSONForSave() if @get('editable_elements')? && @get('editable_elements').length > 0
|
@@ -5,13 +5,11 @@ class Locomotive.Models.Site extends Backbone.Model
|
|
5
5
|
urlRoot: "#{Locomotive.mounted_on}/sites"
|
6
6
|
|
7
7
|
initialize: ->
|
8
|
-
|
9
|
-
domains = _.map @get('domains_without_subdomain'), (name) =>
|
10
|
-
new Locomotive.Models.Domain(name: name)
|
11
|
-
|
12
|
-
memberships = new Locomotive.Models.MembershipsCollection(@get('memberships'))
|
8
|
+
@_fix_attributes()
|
13
9
|
|
14
|
-
|
10
|
+
# After save, need to fix the attributes again
|
11
|
+
this.on 'sync', ->
|
12
|
+
@_fix_attributes()
|
15
13
|
|
16
14
|
includes_domain: (name_with_port) ->
|
17
15
|
name = name_with_port.replace(/:[0-9]*/, '')
|
@@ -22,10 +20,22 @@ class Locomotive.Models.Site extends Backbone.Model
|
|
22
20
|
|
23
21
|
toJSON: ->
|
24
22
|
_.tap super, (hash) =>
|
23
|
+
_.each ['locales_text'], (key) => delete hash[key]
|
25
24
|
delete hash.memberships
|
26
25
|
hash.memberships_attributes = @get('memberships').toJSONForSave() if @get('memberships')? && @get('memberships').length > 0
|
27
26
|
delete hash.domains
|
28
27
|
hash.domains = _.map(@get('domains'), (domain) -> domain.get('name'))
|
28
|
+
hash.locales = _.flatten([@get('locales')])
|
29
|
+
|
30
|
+
_fix_attributes: ->
|
31
|
+
# Be careful, domains_without_subdomain becomes domains
|
32
|
+
domains = _.map @get('domains_without_subdomain'), (name) =>
|
33
|
+
new Locomotive.Models.Domain(name: name)
|
34
|
+
|
35
|
+
memberships = new Locomotive.Models.MembershipsCollection(@get('memberships'))
|
36
|
+
|
37
|
+
@set domains: domains, memberships: memberships
|
38
|
+
|
29
39
|
|
30
40
|
class Locomotive.Models.CurrentSite extends Locomotive.Models.Site
|
31
41
|
|
@@ -31,6 +31,8 @@ class Locomotive.Views.ContentEntries.FormView extends Locomotive.Views.Shared.F
|
|
31
31
|
|
32
32
|
@enable_checkboxes()
|
33
33
|
|
34
|
+
@enable_tags()
|
35
|
+
|
34
36
|
@enable_datepickers()
|
35
37
|
|
36
38
|
@enable_richtexteditor()
|
@@ -50,6 +52,9 @@ class Locomotive.Views.ContentEntries.FormView extends Locomotive.Views.Shared.F
|
|
50
52
|
enable_checkboxes: ->
|
51
53
|
@$('li.input.toggle input[type=checkbox]').checkToggle()
|
52
54
|
|
55
|
+
enable_tags: ->
|
56
|
+
@$('li.input.tags input[type=text]').tagit(allowSpaces: true)
|
57
|
+
|
53
58
|
enable_datepickers: ->
|
54
59
|
@$('li.input.date input[type=text]').datepicker()
|
55
60
|
|
@@ -7,6 +7,7 @@ class Locomotive.Views.MyAccount.EditView extends Locomotive.Views.Shared.FormVi
|
|
7
7
|
el: '#content'
|
8
8
|
|
9
9
|
events:
|
10
|
+
'click .api_key.input button': 'regenerate_api_key'
|
10
11
|
'submit': 'save'
|
11
12
|
|
12
13
|
initialize: ->
|
@@ -21,4 +22,17 @@ class Locomotive.Views.MyAccount.EditView extends Locomotive.Views.Shared.FormVi
|
|
21
22
|
if @model.get('locale') == window.locale
|
22
23
|
@save_in_ajax(event)
|
23
24
|
|
25
|
+
regenerate_api_key: (event) ->
|
26
|
+
event.stopPropagation() & event.preventDefault()
|
27
|
+
|
28
|
+
button = $(event.target)
|
29
|
+
|
30
|
+
if confirm(button.data('confirm'))
|
31
|
+
$.rails.ajax
|
32
|
+
url: button.data('url')
|
33
|
+
type: 'put'
|
34
|
+
dataType: 'json'
|
35
|
+
success: (data) =>
|
36
|
+
button.prev('code').html(data.api_key)
|
37
|
+
|
24
38
|
|
@@ -115,7 +115,7 @@ class Locomotive.Views.Pages.FormView extends Locomotive.Views.Shared.FormView
|
|
115
115
|
@$('#page_slug').bind 'change', ((event) => @touched_url = true)
|
116
116
|
|
117
117
|
listen_for_url_changes: ->
|
118
|
-
setInterval (=> (@change_page_url() & @touched_url = false) if @touched_url),
|
118
|
+
setInterval (=> (@change_page_url() & @touched_url = false) if @touched_url), 1200
|
119
119
|
|
120
120
|
change_page_url: ->
|
121
121
|
$.rails.ajax
|
@@ -21,7 +21,8 @@ class Locomotive.Views.Pages.EditView extends Locomotive.Views.Pages.FormView
|
|
21
21
|
@refresh_editable_elements()
|
22
22
|
|
23
23
|
# refresh the show link
|
24
|
-
|
24
|
+
fullpath = @model.get('localized_fullpaths')[window.content_locale]
|
25
|
+
@$('#local-actions-bar > a.show').attr('href', "/#{fullpath}")
|
25
26
|
|
26
27
|
error: (model, xhr) =>
|
27
28
|
form.trigger('ajax:complete')
|
@@ -0,0 +1 @@
|
|
1
|
+
tinyMCE.addI18n('de.locomotive_media',{"image_desc": "Medien einfügen"});
|
@@ -231,17 +231,20 @@ form.formtastic {
|
|
231
231
|
}
|
232
232
|
} // div.inline-errors
|
233
233
|
|
234
|
-
&.string, &.password {
|
234
|
+
&.string, &.password, &.numeric {
|
235
235
|
label {
|
236
236
|
padding-top: 2px;
|
237
237
|
}
|
238
238
|
|
239
|
-
input[type=text], input[type=password] {
|
239
|
+
input[type=text], input[type=password], input[type=number] {
|
240
240
|
@include default-input-style;
|
241
|
-
|
242
241
|
width: 700px;
|
243
242
|
}
|
244
243
|
|
244
|
+
input[type=number] {
|
245
|
+
width: 150px;
|
246
|
+
}
|
247
|
+
|
245
248
|
&.highlighted {
|
246
249
|
label {
|
247
250
|
padding-top: 7px;
|
@@ -440,6 +443,18 @@ form.formtastic {
|
|
440
443
|
}
|
441
444
|
} // li.file
|
442
445
|
|
446
|
+
&.api_key {
|
447
|
+
code {
|
448
|
+
color: #000;
|
449
|
+
font-weight: bold;
|
450
|
+
font-family: Monaco, monospace;
|
451
|
+
}
|
452
|
+
button.regenerate {
|
453
|
+
@include blue-button;
|
454
|
+
margin-left: 10px;
|
455
|
+
}
|
456
|
+
}
|
457
|
+
|
443
458
|
&.subdomain {
|
444
459
|
|
445
460
|
em {
|
@@ -12,7 +12,10 @@
|
|
12
12
|
li.entry {
|
13
13
|
float: left;
|
14
14
|
position: relative;
|
15
|
-
|
15
|
+
|
16
|
+
padding: 0px 0px 0 6px;
|
17
|
+
margin-left: -42px;
|
18
|
+
|
16
19
|
height: 29px;
|
17
20
|
line-height: 29px;
|
18
21
|
overflow: hidden;
|
@@ -108,6 +111,7 @@
|
|
108
111
|
|
109
112
|
&:first-child {
|
110
113
|
z-index: 990;
|
114
|
+
margin-left: 0;
|
111
115
|
a {
|
112
116
|
@include border-top-left-radius(4px);
|
113
117
|
padding-left: 10px;
|
@@ -120,8 +124,8 @@
|
|
120
124
|
}
|
121
125
|
}
|
122
126
|
|
123
|
-
@for $i from 1 through
|
124
|
-
&.entry-#{$i} {
|
127
|
+
@for $i from 1 through 10 {
|
128
|
+
&.entry-#{$i} { z-index: 990 - $i; }
|
125
129
|
}
|
126
130
|
}
|
127
131
|
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
@import "compass/css3/border-radius";
|
2
|
+
@import "compass/css3/text-shadow";
|
3
|
+
@import "locomotive/shared/helpers";
|
4
|
+
@import "buttons";
|
5
|
+
|
6
|
+
/* ___ pagination ___ */
|
7
|
+
|
8
|
+
nav.pagination {
|
9
|
+
text-align: center;
|
10
|
+
|
11
|
+
a {
|
12
|
+
@include gray-button;
|
13
|
+
margin: 0px 1px;
|
14
|
+
}
|
15
|
+
|
16
|
+
span.current {
|
17
|
+
@include gray-button;
|
18
|
+
margin: 0px 1px;
|
19
|
+
|
20
|
+
@include background-image(linear-gradient(#13496c, #175b88));
|
21
|
+
@include box-shadow(rgba(0, 0, 0, 0.9) 0px -1px 0px 0px, rgba(0, 0, 0, 0.7) 0px 1px 0px 0px);
|
22
|
+
@include single-text-shadow(#000, 0px, 1px, 0px);
|
23
|
+
|
24
|
+
color: #fff;
|
25
|
+
font-weight: bold;
|
26
|
+
padding-top: 0px;
|
27
|
+
|
28
|
+
&:hover {
|
29
|
+
color: #fff;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
a, span.current {
|
34
|
+
padding-left: 12px;
|
35
|
+
padding-right: 12px;
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
@import "locomotive/shared/helpers";
|
2
|
+
|
3
|
+
ul.tagit {
|
4
|
+
width: 650px;
|
5
|
+
padding: 5px;
|
6
|
+
@include default-input-style;
|
7
|
+
@include border-radius(0px);
|
8
|
+
|
9
|
+
li {
|
10
|
+
margin: 2px 5px 2px 0;
|
11
|
+
line-height: 18px;
|
12
|
+
font-size: 11px;
|
13
|
+
|
14
|
+
&.tagit-choice-read-only {
|
15
|
+
padding: 1px 5px 1px;
|
16
|
+
}
|
17
|
+
|
18
|
+
&.tagit-choice-editable {
|
19
|
+
padding: 1px 20px 1px 5px;
|
20
|
+
}
|
21
|
+
|
22
|
+
&.tagit-choice-read-only, &.tagit-choice-editable {
|
23
|
+
@include border-radius(2px);
|
24
|
+
background: #c2e0f0;
|
25
|
+
border-color: #719fb8;
|
26
|
+
span {
|
27
|
+
color: #29739b;
|
28
|
+
@include text-shadow(rgba(#fff, 0.7) 0px 1px 0px);
|
29
|
+
}
|
30
|
+
span.ui-icon-close {
|
31
|
+
background: none;
|
32
|
+
text-indent: 0px;
|
33
|
+
text-align: center;
|
34
|
+
&:before {
|
35
|
+
position: relative;
|
36
|
+
top: -1px;
|
37
|
+
text-indent: 0px;
|
38
|
+
font-family: FontAwesome;
|
39
|
+
font-size: 9px;
|
40
|
+
content: "\f00d";
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
&.tagit-new {
|
46
|
+
padding: 2px 0 0 0;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
@@ -12,20 +12,20 @@ module Locomotive
|
|
12
12
|
protected
|
13
13
|
|
14
14
|
def build_list
|
15
|
-
add :welcome, :
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
15
|
+
add :welcome, url: edit_my_account_url, i18n_options: {
|
16
|
+
key: 'locomotive.shared.header.welcome',
|
17
|
+
arg: :name,
|
18
|
+
value: @current_locomotive_account.name
|
19
19
|
}
|
20
20
|
|
21
|
-
add :see, :
|
21
|
+
add :see, url: current_site_url, id: 'viewsite', target: '_blank'
|
22
22
|
|
23
23
|
if Locomotive.config.multi_sites? && current_locomotive_account.sites.size > 1
|
24
|
-
add :switch, :
|
24
|
+
add :switch, url: '#', id: 'sites-picker-link'
|
25
25
|
end
|
26
26
|
|
27
|
-
add :help, :
|
28
|
-
add :logout, :
|
27
|
+
add :help, url: 'http://doc.locomotivecms.com', class: 'tutorial', id: 'help', target: '_blank'
|
28
|
+
add :logout, url: destroy_locomotive_session_url, data: { confirm: t('locomotive.messages.confirm') }, method: :delete
|
29
29
|
end
|
30
30
|
|
31
31
|
def localize_label(label, options = {})
|