locomotivecms 3.0.0.pre.alpha.3 → 3.0.0.pre.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +15 -8
- data/app/api/locomotive/api.rb +1 -0
- data/app/api/locomotive/api/entities/content_entry_entity.rb +1 -0
- data/app/api/locomotive/api/entities/content_type_entity.rb +2 -1
- data/app/api/locomotive/api/entities/site_entity.rb +4 -0
- data/app/api/locomotive/api/entities/theme_asset_entity.rb +3 -3
- data/app/api/locomotive/api/forms/base_form.rb +0 -6
- data/app/api/locomotive/api/forms/content_type_field_form.rb +6 -10
- data/app/api/locomotive/api/forms/content_type_form.rb +26 -4
- data/app/api/locomotive/api/middlewares/params_decoder_middleware.rb +91 -0
- data/app/api/locomotive/api/resources/content_type_resource.rb +7 -2
- data/app/api/locomotive/api/resources/current_site_resource.rb +10 -2
- data/app/assets/images/locomotive/favicon.png +0 -0
- data/app/assets/javascripts/locomotive/not_logged_in.js.coffee +11 -1
- data/app/assets/javascripts/locomotive/views/application_view.js.coffee +0 -76
- data/app/assets/javascripts/locomotive/views/content_assets/edit_image_view.js.coffee +3 -1
- data/app/assets/javascripts/locomotive/views/dashboard/show_view.js.coffee +33 -1
- data/app/assets/javascripts/locomotive/views/developers_documentation/show_view.js.coffee +9 -0
- data/app/assets/javascripts/locomotive/views/editable_elements/edit_view.js.coffee +3 -1
- data/app/assets/javascripts/locomotive/views/editable_elements/index_view.js.coffee +11 -11
- data/app/assets/javascripts/locomotive/views/inputs/text_view.js.coffee +16 -0
- data/app/assets/javascripts/locomotive/views/pages/_form_view.js.coffee +0 -158
- data/app/assets/javascripts/locomotive/views/pages/edit_view.js.coffee +0 -41
- data/app/assets/javascripts/locomotive/views/public_submission_accounts/edit_view.js.coffee +7 -0
- data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +11 -3
- data/app/assets/javascripts/locomotive/views/shared/list_view.js.coffee +4 -2
- data/app/assets/javascripts/locomotive/views/translations/index_view.js.coffee +5 -0
- data/app/assets/stylesheets/locomotive/application.scss +4 -0
- data/app/assets/stylesheets/locomotive/base/_fonts.scss +5 -5
- data/app/assets/stylesheets/locomotive/base/form/_base.scss +9 -1
- data/app/assets/stylesheets/locomotive/components/_activity_feed.scss +66 -0
- data/app/assets/stylesheets/locomotive/components/_content_assets.scss +27 -8
- data/app/assets/stylesheets/locomotive/components/_developers.scss +34 -0
- data/app/assets/stylesheets/locomotive/components/_error.scss +37 -0
- data/app/assets/stylesheets/locomotive/components/_list.scss +6 -0
- data/app/assets/stylesheets/locomotive/components/_main.scss +4 -0
- data/app/assets/stylesheets/locomotive/components/_misc.scss +1 -0
- data/app/assets/stylesheets/locomotive/components/_translations.scss +13 -0
- data/app/assets/stylesheets/locomotive/components/header/_base.scss +7 -2
- data/app/assets/stylesheets/locomotive/components/misc/_modal.scss +13 -0
- data/app/assets/stylesheets/locomotive/components/misc/_notify.scss +2 -2
- data/app/assets/stylesheets/locomotive/components/not_logged_in/_sign_in_and_up.scss +11 -1
- data/app/assets/stylesheets/locomotive/components/sidebar/_pages_tree.scss +2 -2
- data/app/assets/stylesheets/locomotive/error.scss +12 -0
- data/app/assets/stylesheets/locomotive/globals/_bootstrap.scss +1 -1
- data/app/assets/stylesheets/locomotive/globals/_mixins.scss +8 -4
- data/app/assets/stylesheets/locomotive/globals/_variables.scss +2 -0
- data/app/assets/stylesheets/locomotive/not_logged_in.scss +4 -0
- data/app/controllers/locomotive/accounts_controller.rb +6 -1
- data/app/controllers/locomotive/base_controller.rb +1 -1
- data/app/controllers/locomotive/concerns/exception_controller.rb +2 -1
- data/app/controllers/locomotive/concerns/site_dispatcher_controller.rb +2 -1
- data/app/controllers/locomotive/content_assets_controller.rb +2 -2
- data/app/controllers/locomotive/content_entries_controller.rb +2 -2
- data/app/controllers/locomotive/current_site_controller.rb +5 -1
- data/app/controllers/locomotive/custom_fields/select_options_controller.rb +1 -1
- data/app/controllers/locomotive/dashboard_controller.rb +2 -0
- data/app/controllers/locomotive/developers_documentation_controller.rb +11 -0
- data/app/controllers/locomotive/editable_elements_controller.rb +11 -10
- data/app/controllers/locomotive/errors_controller.rb +15 -0
- data/app/controllers/locomotive/pages_controller.rb +3 -3
- data/app/controllers/locomotive/public_submission_accounts_controller.rb +42 -0
- data/app/controllers/locomotive/translations_controller.rb +9 -23
- data/app/helpers/locomotive/base_helper.rb +25 -23
- data/app/helpers/locomotive/content_assets_helper.rb +8 -0
- data/app/helpers/locomotive/content_entries_helper.rb +13 -19
- data/app/helpers/locomotive/content_types_helper.rb +9 -12
- data/app/helpers/locomotive/custom_fields_helper.rb +1 -0
- data/app/helpers/locomotive/dashboard_helper.rb +91 -0
- data/app/helpers/locomotive/developers_documentation_helper.rb +32 -0
- data/app/helpers/locomotive/editable_elements_helper.rb +25 -14
- data/app/helpers/locomotive/errors_helper.rb +21 -0
- data/app/helpers/locomotive/my_account_helper.rb +10 -8
- data/app/helpers/locomotive/pages_helper.rb +1 -1
- data/app/helpers/locomotive/public_submission_accounts_helper.rb +11 -0
- data/app/helpers/locomotive/shared/accounts_helper.rb +2 -2
- data/app/helpers/locomotive/sites_helper.rb +15 -11
- data/app/helpers/locomotive/translations_helper.rb +21 -13
- data/app/inputs/locomotive/api_key_input.rb +2 -0
- data/app/inputs/locomotive/array_input.rb +8 -3
- data/app/inputs/locomotive/code_input.rb +1 -47
- data/app/inputs/locomotive/document_picker_input.rb +1 -0
- data/app/inputs/locomotive/rte_input.rb +2 -0
- data/app/inputs/locomotive/toggle_input.rb +2 -0
- data/app/models/locomotive/activity.rb +32 -0
- data/app/models/locomotive/concerns/content_entry/localized.rb +12 -1
- data/app/models/locomotive/concerns/content_type/entry_template.rb +52 -0
- data/app/models/locomotive/concerns/page/editable_elements.rb +0 -111
- data/app/models/locomotive/concerns/page/layout.rb +21 -6
- data/app/models/locomotive/concerns/site/access_points.rb +24 -3
- data/app/models/locomotive/concerns/site/locales.rb +7 -27
- data/app/models/locomotive/content_asset.rb +0 -4
- data/app/models/locomotive/content_entry.rb +10 -8
- data/app/models/locomotive/content_type.rb +12 -1
- data/app/models/locomotive/editable_element.rb +11 -106
- data/app/models/locomotive/editable_file.rb +6 -53
- data/app/models/locomotive/editable_model.rb +13 -0
- data/app/models/locomotive/editable_text.rb +0 -51
- data/app/models/locomotive/page.rb +31 -17
- data/app/models/locomotive/site.rb +12 -13
- data/app/models/locomotive/theme_asset.rb +0 -4
- data/app/models/locomotive/translation.rb +50 -35
- data/app/policies/locomotive/content_type_policy.rb +4 -0
- data/app/policies/locomotive/site_policy.rb +4 -0
- data/app/services/locomotive/concerns/activity_service.rb +27 -0
- data/app/services/locomotive/content_asset_service.rb +16 -2
- data/app/services/locomotive/content_entry_service.rb +77 -8
- data/app/services/locomotive/content_type_service.rb +6 -2
- data/app/services/locomotive/editable_element_service.rb +11 -4
- data/app/services/locomotive/membership_service.rb +20 -4
- data/app/services/locomotive/page_parsing_service.rb +94 -23
- data/app/services/locomotive/page_service.rb +61 -3
- data/app/services/locomotive/site_service.rb +43 -1
- data/app/services/locomotive/translation_service.rb +51 -0
- data/app/uploaders/locomotive/picture_uploader.rb +5 -1
- data/app/views/locomotive/accounts/{new.html.haml → new.html.slim} +0 -0
- data/app/views/locomotive/content_assets/{_dropzone.html.haml → _dropzone.html.slim} +4 -3
- data/app/views/locomotive/content_assets/{_list.html.haml → _list.html.slim} +11 -9
- data/app/views/locomotive/content_assets/{_nav.html.haml → _nav.html.slim} +5 -5
- data/app/views/locomotive/content_assets/{_search_form.html.haml → _search_form.html.slim} +1 -1
- data/app/views/locomotive/content_assets/edit_in_drawer.html.slim +27 -0
- data/app/views/locomotive/content_assets/{index.html.haml → index.html.slim} +4 -4
- data/app/views/locomotive/content_assets/{index_in_drawer.html.haml → index_in_drawer.html.slim} +1 -1
- data/app/views/locomotive/content_entries/{_entry.html.haml → _entry.html.slim} +3 -3
- data/app/views/locomotive/content_entries/{_list.html.haml → _list.html.slim} +9 -8
- data/app/views/locomotive/content_entries/{edit.html.haml → edit.html.slim} +5 -0
- data/app/views/locomotive/content_entries/form/{_actions.html.haml → _actions.html.slim} +0 -0
- data/app/views/locomotive/content_entries/form/{_advanced.html.haml → _advanced.html.slim} +0 -0
- data/app/views/locomotive/content_entries/form/{_main.html.haml → _main.html.slim} +0 -0
- data/app/views/locomotive/content_entries/form/{_panes.html.haml → _panes.html.slim} +0 -0
- data/app/views/locomotive/content_entries/form/{_seo.html.haml → _seo.html.slim} +0 -0
- data/app/views/locomotive/content_entries/form/_tabs.html.slim +13 -0
- data/app/views/locomotive/content_entries/{index.html.haml → index.html.slim} +22 -9
- data/app/views/locomotive/content_entries/{new.html.haml → new.html.slim} +0 -0
- data/app/views/locomotive/current_site/{_domain.html.haml → _domain.html.slim} +3 -3
- data/app/views/locomotive/current_site/{_locale.html.haml → _locale.html.slim} +4 -4
- data/app/views/locomotive/current_site/{_membership.html.haml → _membership.html.slim} +7 -6
- data/app/views/locomotive/current_site/{edit.html.haml → edit.html.slim} +1 -1
- data/app/views/locomotive/current_site/form/{_access_points.html.haml → _access_points.html.slim} +1 -0
- data/app/views/locomotive/current_site/form/{_advanced.html.haml → _advanced.html.slim} +0 -0
- data/app/views/locomotive/current_site/form/{_main.html.haml → _main.html.slim} +0 -0
- data/app/views/locomotive/current_site/form/{_panes.html.haml → _panes.html.slim} +0 -0
- data/app/views/locomotive/current_site/form/{_seo.html.haml → _seo.html.slim} +0 -0
- data/app/views/locomotive/current_site/form/_tabs.html.slim +14 -0
- data/app/views/locomotive/custom_fields/select_options/{_option.html.haml → _option.html.slim} +7 -7
- data/app/views/locomotive/custom_fields/select_options/{edit.html.haml → edit.html.slim} +0 -0
- data/app/views/locomotive/dashboard/show.html.slim +28 -0
- data/app/views/locomotive/developers_documentation/_api.html.slim +44 -0
- data/app/views/locomotive/developers_documentation/_wagon.html.slim +42 -0
- data/app/views/locomotive/developers_documentation/show.html.slim +11 -0
- data/app/views/locomotive/devise_mailer/reset_password_instructions.html.slim +12 -0
- data/app/views/locomotive/editable_elements/_edit.html.slim +52 -0
- data/app/views/locomotive/editable_elements/{_form.html.haml → _form.html.slim} +12 -3
- data/app/views/locomotive/editable_elements/index.html.slim +8 -0
- data/app/views/locomotive/editable_elements/{index_without_preview.html.haml → index_without_preview.html.slim} +5 -4
- data/app/views/locomotive/errors/404.html.slim +2 -0
- data/app/views/locomotive/errors/500.html.slim +2 -0
- data/app/views/locomotive/errors/no_site.html.slim +7 -0
- data/app/views/locomotive/layouts/application.html.slim +42 -0
- data/app/views/locomotive/layouts/error.html.slim +24 -0
- data/app/views/locomotive/layouts/{live_editing.html.haml → live_editing.html.slim} +10 -10
- data/app/views/locomotive/layouts/not_logged_in.html.slim +26 -0
- data/app/views/locomotive/layouts/{without_site.html.haml → without_site.html.slim} +9 -6
- data/app/views/locomotive/memberships/{edit.html.haml → edit.html.slim} +0 -0
- data/app/views/locomotive/memberships/{new.html.haml → new.html.slim} +0 -0
- data/app/views/locomotive/my_account/{edit.html.haml → edit.html.slim} +1 -1
- data/app/views/locomotive/my_account/form/{_actions.html.haml → _actions.html.slim} +0 -0
- data/app/views/locomotive/my_account/form/{_api.html.haml → _api.html.slim} +0 -1
- data/app/views/locomotive/my_account/form/{_credentials.html.haml → _credentials.html.slim} +0 -0
- data/app/views/locomotive/my_account/form/{_main.html.haml → _main.html.slim} +0 -0
- data/app/views/locomotive/my_account/form/{_panes.html.haml → _panes.html.slim} +1 -1
- data/app/views/locomotive/my_account/form/_tabs.html.slim +7 -0
- data/app/views/locomotive/notifications/{new_content_entry.html.haml → new_content_entry.html.slim} +11 -11
- data/app/views/locomotive/pages/{edit.html.haml → edit.html.slim} +0 -0
- data/app/views/locomotive/pages/form/{_actions.html.haml → _actions.html.slim} +0 -0
- data/app/views/locomotive/pages/form/{_main.html.haml → _main.html.slim} +0 -0
- data/app/views/locomotive/pages/form/{_panes.html.haml → _panes.html.slim} +0 -0
- data/app/views/locomotive/pages/form/{_seo.html.haml → _seo.html.slim} +0 -0
- data/app/views/locomotive/pages/form/{_tabs.html.haml → _tabs.html.slim} +1 -1
- data/app/views/locomotive/pages/{new.html.haml → new.html.slim} +0 -0
- data/app/views/locomotive/pages/show.html.slim +2 -0
- data/app/views/locomotive/passwords/{edit.html.haml → edit.html.slim} +6 -6
- data/app/views/locomotive/passwords/{new.html.haml → new.html.slim} +6 -6
- data/app/views/locomotive/public_submission_accounts/_account.html.slim +19 -0
- data/app/views/locomotive/public_submission_accounts/edit.html.slim +16 -0
- data/app/views/locomotive/registrations/{new.html.haml → new.html.slim} +2 -4
- data/app/views/locomotive/sessions/{new.html.haml → new.html.slim} +2 -4
- data/app/views/locomotive/shared/_footer.html.slim +2 -0
- data/app/views/locomotive/shared/{_form_actions.html.haml → _form_actions.html.slim} +4 -4
- data/app/views/locomotive/shared/_head.html.slim +39 -0
- data/app/views/locomotive/shared/{_header.html.haml → _header.html.slim} +10 -10
- data/app/views/locomotive/shared/_locale_picker_link.html.slim +11 -0
- data/app/views/locomotive/shared/{_main_app_head.html.haml → _main_app_head.html.slim} +0 -0
- data/app/views/locomotive/shared/{_main_app_head_before_backbone.html.haml → _main_app_head_before_backbone.html.slim} +0 -0
- data/app/views/locomotive/shared/{_main_app_header.html.haml → _main_app_header.html.slim} +0 -0
- data/app/views/locomotive/shared/{_sidebar.html.haml → _sidebar.html.slim} +6 -0
- data/app/views/locomotive/shared/{_sidebar_without_site.html.haml → _sidebar_without_site.html.slim} +0 -0
- data/app/views/locomotive/shared/actions/{_contents.html.haml → _contents.html.slim} +1 -1
- data/app/views/locomotive/shared/header/{_account.html.haml → _account.html.slim} +1 -1
- data/app/views/locomotive/shared/header/_account_menu.html.slim +5 -0
- data/app/views/locomotive/shared/header/_brand.html.slim +5 -0
- data/app/views/locomotive/shared/header/{_site.html.haml → _site.html.slim} +2 -2
- data/app/views/locomotive/shared/rte/{_image_popover.html.haml → _image_popover.html.slim} +5 -5
- data/app/views/locomotive/shared/rte/{_link_popover.html.haml → _link_popover.html.slim} +5 -5
- data/app/views/locomotive/shared/rte/_toolbar.html.slim +62 -0
- data/app/views/locomotive/shared/sidebar/_content_types.html.slim +16 -0
- data/app/views/locomotive/shared/sidebar/_link.html.slim +10 -0
- data/app/views/locomotive/shared/sidebar/{_my_account.html.haml → _my_account.html.slim} +2 -2
- data/app/views/locomotive/shared/sidebar/_page.html.slim +33 -0
- data/app/views/locomotive/shared/sidebar/_pages.html.slim +11 -0
- data/app/views/locomotive/sites/{_site.html.haml → _site.html.slim} +3 -3
- data/app/views/locomotive/sites/{index.html.haml → index.html.slim} +3 -3
- data/app/views/locomotive/sites/{new.html.haml → new.html.slim} +0 -0
- data/app/views/locomotive/translations/_form.html.slim +9 -0
- data/app/views/locomotive/translations/edit.html.slim +7 -0
- data/app/views/locomotive/translations/index.html.slim +41 -0
- data/config/initializers/slim.rb +1 -0
- data/config/initializers/time_format.rb +15 -0
- data/config/locales/admin_ui.en.yml +65 -49
- data/config/locales/default.en.yml +3 -0
- data/config/locales/default.fr.yml +4 -1
- data/config/locales/simple_form.en.yml +14 -8
- data/config/routes.rb +6 -0
- data/features/support/env.rb +1 -1
- data/lib/generators/locomotive/install/install_generator.rb +48 -0
- data/lib/generators/locomotive/install/templates/heroku.rb +29 -0
- data/lib/generators/locomotive/install/templates/locomotive.rb +5 -2
- data/lib/generators/locomotive/install/templates/mongoid.yml +1 -1
- data/lib/generators/locomotive/install/templates/mongoid_heroku.yml +78 -0
- data/lib/locomotive.rb +0 -1
- data/lib/locomotive/configuration.rb +2 -6
- data/lib/locomotive/dependencies.rb +1 -2
- data/lib/locomotive/dragonfly.rb +4 -5
- data/lib/locomotive/engine.rb +10 -13
- data/lib/locomotive/middlewares.rb +0 -1
- data/lib/locomotive/middlewares/custom_public_exceptions.rb +19 -0
- data/lib/locomotive/middlewares/site.rb +49 -16
- data/lib/locomotive/simple_form.rb +67 -26
- data/lib/locomotive/steam/middlewares/missing_translations.rb +48 -0
- data/lib/locomotive/steam/middlewares/page_editing.rb +48 -0
- data/lib/locomotive/steam/services/api_entry_submission_service.rb +38 -0
- data/lib/locomotive/steam_adaptor.rb +25 -6
- data/lib/locomotive/version.rb +1 -1
- data/lib/tasks/locomotive.rake +27 -47
- data/spec/dummy/app/views/foo/index.html.slim +1 -0
- data/spec/dummy/app/views/locomotive/shared/{_main_app_head.html.haml → _main_app_head.html.slim} +0 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +4 -0
- data/spec/dummy/config/environments/profile.rb +48 -0
- data/spec/dummy/config/mongoid.yml +6 -6
- data/spec/lib/locomotive/steam/services/api_entry_submission_service_spec.rb +39 -0
- data/spec/models/locomotive/concerns/content_type/entry_template_spec.rb +55 -0
- data/spec/models/locomotive/concerns/page/layout_spec.rb +2 -2
- data/spec/models/locomotive/concerns/site/access_points_spec.rb +87 -2
- data/spec/models/locomotive/concerns/site/locales_spec.rb +2 -3
- data/spec/models/locomotive/content_entry_spec.rb +22 -37
- data/spec/models/locomotive/page_spec.rb +11 -0
- data/spec/models/locomotive/site_spec.rb +0 -36
- data/spec/requests/site_spec.rb +28 -0
- data/spec/support/capybara.rb +27 -0
- data/spec/support/factories.rb +9 -0
- data/spec/support/features/session_helpers.rb +21 -0
- data/spec/support/locomotive.rb +0 -4
- data/spec/support/matchers.rb +0 -25
- data/vendor/assets/javascripts/locomotive/highlight.pack.js +1 -0
- data/vendor/assets/stylesheets/locomotive/highlightjs/default.css +155 -0
- data/vendor/assets/stylesheets/locomotive/highlightjs/github.css +123 -0
- metadata +179 -195
- data/app/assets/images/locomotive/background/body.png +0 -0
- data/app/assets/images/locomotive/form/error-arrow.png +0 -0
- data/app/assets/images/locomotive/form/input-sep.png +0 -0
- data/app/assets/images/locomotive/icons/start.png +0 -0
- data/app/assets/images/locomotive/list/empty.png +0 -0
- data/app/assets/images/locomotive/list/item-left.png +0 -0
- data/app/assets/images/locomotive/nocoffee.png +0 -0
- data/app/assets/images/locomotive/plugins/sites_picker_top_arrow.png +0 -0
- data/app/assets/images/locomotive/rails.png +0 -0
- data/app/assets/javascripts/locomotive/views/pages/index_view.js.coffee +0 -11
- data/app/cells/locomotive/content_locale_picker/show.html.haml +0 -7
- data/app/cells/locomotive/content_locale_picker_cell.rb +0 -21
- data/app/helpers/locomotive/installation_helper.rb +0 -9
- data/app/inputs/locomotive/locale_input.rb +0 -41
- data/app/inputs/locomotive/small_code_input.rb +0 -23
- data/app/models/locomotive/concerns/content_entry/notifications.rb +0 -33
- data/app/models/locomotive/concerns/content_type/item_template.rb +0 -49
- data/app/models/locomotive/concerns/page/parse.rb +0 -133
- data/app/presenters/locomotive/account_presenter.rb +0 -20
- data/app/presenters/locomotive/base_presenter.rb +0 -144
- data/app/presenters/locomotive/content_asset_presenter.rb +0 -51
- data/app/presenters/locomotive/content_entry_presenter.rb +0 -177
- data/app/presenters/locomotive/content_field_presenter.rb +0 -76
- data/app/presenters/locomotive/content_type_presenter.rb +0 -82
- data/app/presenters/locomotive/editable_control_presenter.rb +0 -19
- data/app/presenters/locomotive/editable_element_presenter.rb +0 -46
- data/app/presenters/locomotive/editable_file_presenter.rb +0 -36
- data/app/presenters/locomotive/editable_text_presenter.rb +0 -40
- data/app/presenters/locomotive/membership_presenter.rb +0 -35
- data/app/presenters/locomotive/page_presenter.rb +0 -81
- data/app/presenters/locomotive/site_presenter.rb +0 -40
- data/app/presenters/locomotive/snippet_presenter.rb +0 -22
- data/app/presenters/locomotive/theme_asset_presenter.rb +0 -61
- data/app/presenters/locomotive/translation_presenter.rb +0 -9
- data/app/views/locomotive/content_assets/edit_in_drawer.html.haml +0 -26
- data/app/views/locomotive/content_entries/form/_tabs.html.haml +0 -9
- data/app/views/locomotive/current_site/form/_tabs.html.haml +0 -14
- data/app/views/locomotive/dashboard/show.html.haml +0 -0
- data/app/views/locomotive/devise_mailer/reset_password_instructions.html.haml +0 -12
- data/app/views/locomotive/editable_elements/_edit.html.haml +0 -49
- data/app/views/locomotive/editable_elements/_edit_with_content_entry.html.haml +0 -21
- data/app/views/locomotive/editable_elements/index.html.haml +0 -8
- data/app/views/locomotive/errors/404.html.haml +0 -7
- data/app/views/locomotive/errors/500.html.haml +0 -7
- data/app/views/locomotive/errors/no_page.html.haml +0 -1
- data/app/views/locomotive/errors/no_site.html.haml +0 -1
- data/app/views/locomotive/layouts/application.html.haml +0 -42
- data/app/views/locomotive/layouts/error.html.haml +0 -1
- data/app/views/locomotive/layouts/not_logged_in.html.haml +0 -18
- data/app/views/locomotive/my_account/form/_tabs.html.haml +0 -7
- data/app/views/locomotive/pages/_editable_elements.html.haml +0 -64
- data/app/views/locomotive/pages/index.html.haml +0 -22
- data/app/views/locomotive/pages/show.html.haml +0 -2
- data/app/views/locomotive/shared/_footer.html.haml +0 -2
- data/app/views/locomotive/shared/_head.html.haml +0 -40
- data/app/views/locomotive/shared/_locale_picker_link.html.haml +0 -6
- data/app/views/locomotive/shared/header/_account_menu.html.haml +0 -5
- data/app/views/locomotive/shared/header/_brand.html.haml +0 -4
- data/app/views/locomotive/shared/rte/_toolbar.html.haml +0 -62
- data/app/views/locomotive/shared/sidebar/_content_types.html.haml +0 -15
- data/app/views/locomotive/shared/sidebar/_link.html.haml +0 -10
- data/app/views/locomotive/shared/sidebar/_page.html.haml +0 -33
- data/app/views/locomotive/shared/sidebar/_pages.html.haml +0 -11
- data/app/views/locomotive/translations/_form.html.haml +0 -12
- data/app/views/locomotive/translations/edit.html.haml +0 -15
- data/app/views/locomotive/translations/index.html.haml +0 -30
- data/app/views/locomotive/translations/new.html.haml +0 -12
- data/config/initializers/haml.rb +0 -2
- data/config/initializers/locomotive_loaded_first.rb +0 -19
- data/config/locales/formtastic.bg.yml +0 -113
- data/config/locales/formtastic.cs.yml +0 -125
- data/config/locales/formtastic.de.yml +0 -106
- data/config/locales/formtastic.es.yml +0 -84
- data/config/locales/formtastic.et.yml +0 -103
- data/config/locales/formtastic.fr.yml +0 -109
- data/config/locales/formtastic.it.yml +0 -99
- data/config/locales/formtastic.ja.yml +0 -103
- data/config/locales/formtastic.nb.yml +0 -103
- data/config/locales/formtastic.nl.yml +0 -85
- data/config/locales/formtastic.pl.yml +0 -105
- data/config/locales/formtastic.pt-BR.yml +0 -70
- data/config/locales/formtastic.pt.yml +0 -70
- data/config/locales/formtastic.ru.yml +0 -106
- data/config/locales/formtastic.sk.yml +0 -125
- data/config/locales/formtastic.sr.yml +0 -112
- data/config/locales/formtastic.zh-CN.yml +0 -112
- data/lib/locomotive/haml.rb +0 -1
- data/lib/locomotive/middlewares/page_editing.rb +0 -41
- data/spec/dummy/app/views/foo/index.html.haml +0 -1
- data/spec/dummy/config/initializers/haml.rb +0 -2
- data/spec/support/asset_host_stubs.rb +0 -17
- data/spec/support/controller.rb +0 -32
@@ -0,0 +1,16 @@
|
|
1
|
+
- list = Locomotive::ContentTypeService.new(current_site).list
|
2
|
+
|
3
|
+
- unless list.empty?
|
4
|
+
section.content-types
|
5
|
+
h1= t('.title')
|
6
|
+
|
7
|
+
ul
|
8
|
+
- list.each do |content_type|
|
9
|
+
- if policy(content_type).show?
|
10
|
+
li
|
11
|
+
= link_to content_entries_path(current_site, content_type.slug) do
|
12
|
+
span.text= content_type.name
|
13
|
+
|
14
|
+
span.badge= content_type.number_of_entries || '?'
|
15
|
+
|
16
|
+
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
section.link.my-account.visible-xs-block
|
2
2
|
|
3
3
|
= link_to edit_my_account_url(_location: request.fullpath) do
|
4
4
|
|
5
5
|
= image_tag account_avatar_url(current_locomotive_account, '60x60#'), class: 'img-circle', alt: @current_locomotive_account.name_was
|
6
6
|
|
7
|
-
|
7
|
+
span.text
|
8
8
|
= current_locomotive_account.name_was
|
@@ -0,0 +1,33 @@
|
|
1
|
+
li id="node-#{page._id}" class=page.class_names
|
2
|
+
|
3
|
+
i class="fa #{page.icon} icon #{page.draggable}"
|
4
|
+
|
5
|
+
- url = page.redirect? ? edit_page_path(current_site, page) : editable_elements_path(current_site, page)
|
6
|
+
|
7
|
+
= link_to url do
|
8
|
+
span.text= page.title
|
9
|
+
|
10
|
+
- unless page.translated?
|
11
|
+
i.fa.fa-globe.untranslated
|
12
|
+
|
13
|
+
- if page.children?
|
14
|
+
|
15
|
+
span.fold-unfold class=page.fold_state
|
16
|
+
i.fa.fa-sort-desc.unfolded
|
17
|
+
i.fa.fa-sort-asc.folded
|
18
|
+
|
19
|
+
ul.leaves data-url=sort_page_path(current_site, page)
|
20
|
+
|
21
|
+
- unless page.content_type && page.nodes.count == 1
|
22
|
+
= render partial: 'locomotive/shared/sidebar/page', collection: page.nodes
|
23
|
+
|
24
|
+
- if page.content_type
|
25
|
+
li.list-entries
|
26
|
+
i.fa.fa-list-ul.icon
|
27
|
+
= link_to content_entries_path(current_site, page.templatized_page.content_type.slug) do
|
28
|
+
span.text= t(:list_content_entries, name: page.content_type.name.pluralize, scope: 'locomotive.pages.index')
|
29
|
+
|
30
|
+
li.new-entry
|
31
|
+
i.fa.fa-plus.icon
|
32
|
+
= link_to new_content_entry_path(current_site, page.templatized_page.content_type.slug) do
|
33
|
+
span.text= t(:new_content_entry, name: page.content_type.name.singularize, scope: 'locomotive.pages.index')
|
@@ -0,0 +1,11 @@
|
|
1
|
+
section.pages-tree
|
2
|
+
h1= t(:title, scope: 'locomotive.pages.index')
|
3
|
+
|
4
|
+
ul.root data-url=sort_page_path(current_site, root)
|
5
|
+
|
6
|
+
= render partial: 'locomotive/shared/sidebar/page', collection: nodes
|
7
|
+
|
8
|
+
li.new-page
|
9
|
+
i.fa.fa-plus.icon
|
10
|
+
= link_to new_page_path(current_site) do
|
11
|
+
span.text= t(:new, scope: 'locomotive.pages.index')
|
@@ -2,14 +2,14 @@
|
|
2
2
|
= link_to dashboard_url(site), class: 'media' do
|
3
3
|
|
4
4
|
.pull-right.arrow
|
5
|
-
|
6
|
-
|
5
|
+
span
|
6
|
+
i.fa.fa-angle-right
|
7
7
|
|
8
8
|
.pull-left
|
9
9
|
= image_tag site_picture_url(site), class: 'img-circle', alt: site.name
|
10
10
|
|
11
11
|
.media-body
|
12
|
-
|
12
|
+
h2= site.name.truncate(22)
|
13
13
|
|
14
14
|
.domain
|
15
15
|
= site.main_domain.try(:truncate, 28) || t('.no_domain')
|
File without changes
|
@@ -0,0 +1,9 @@
|
|
1
|
+
- (params[:_location] || {}).each do |name, value|
|
2
|
+
= hidden_field_tag "_location[#{name}]", value
|
3
|
+
|
4
|
+
= f.inputs do
|
5
|
+
|
6
|
+
= f.simple_fields_for :values, OpenStruct.new(@translation.values) do |g|
|
7
|
+
|
8
|
+
- current_site.locales.each do |l|
|
9
|
+
= g.input l, label: flag_tag(l) + t(l, scope: 'locomotive.locales'), required: false, placeholder: t('.not_translated')
|
@@ -0,0 +1,7 @@
|
|
1
|
+
- title t('.title', key: @translation.key )
|
2
|
+
|
3
|
+
= locomotive_form_for @translation, url: translation_path(current_site, @translation) do |f|
|
4
|
+
|
5
|
+
= render 'form', f: f
|
6
|
+
|
7
|
+
= f.actions back_url: translations_path(current_site, params[:_location] || {}), use_stored_location: false
|
@@ -0,0 +1,41 @@
|
|
1
|
+
- title t('.title')
|
2
|
+
|
3
|
+
.row
|
4
|
+
.col-md-7
|
5
|
+
= help t('.help')
|
6
|
+
.col-md-5
|
7
|
+
.search-bar
|
8
|
+
= form_tag translations_path(current_site), method: :get do
|
9
|
+
.form-group
|
10
|
+
= hidden_field_tag :filter_by, params[:filter_by]
|
11
|
+
= text_field_tag :q, params[:q], placeholder: t('.search_placeholder'), class: 'form-control'
|
12
|
+
i.fa.fa-search.icon
|
13
|
+
|
14
|
+
.nav-container
|
15
|
+
ul.nav.nav-tabs role='tablist'
|
16
|
+
- %w(all done partially none).each_with_index do |name, index|
|
17
|
+
|
18
|
+
li class="#{'active' if params[:filter_by] == name || (index == 0 && params[:filter_by].blank?)}"
|
19
|
+
= link_to t(".filter_by.#{name}"), translations_path(current_site, q: params[:q], filter_by: index == 0 ? '' : name)
|
20
|
+
|
21
|
+
- if @translations.empty?
|
22
|
+
br
|
23
|
+
|
24
|
+
.alert.alert-warning
|
25
|
+
== t('.no_items')
|
26
|
+
|
27
|
+
- else
|
28
|
+
|
29
|
+
#translations-list.row.big-list
|
30
|
+
- @translations.each do |translation|
|
31
|
+
.item.col-md-12 class=translation_completion_to_class(current_site, translation)
|
32
|
+
.text
|
33
|
+
strong= link_to translation.key, edit_translation_path(current_site, translation, _location: params.slice(:filter_by, :q))
|
34
|
+
.stamp
|
35
|
+
== document_stamp(translation)
|
36
|
+
|
37
|
+
.actions
|
38
|
+
span.completion
|
39
|
+
i.fa.fa-circle
|
40
|
+
|
41
|
+
= paginate @translations, theme: 'twitter-bootstrap-3', pagination_class: 'pagination-sm'
|
@@ -0,0 +1 @@
|
|
1
|
+
Slim::Engine.set_options pretty: false
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Note: http://stackoverflow.com/questions/13950005/rails-formatting-a-date-hhmm-for-today-yesterday-for-yesterday-weekday
|
2
|
+
Time::DATE_FORMATS[:humanized_ago] = ->(time) do
|
3
|
+
start_time = Time.now.beginning_of_day
|
4
|
+
end_time = Time.now.end_of_day
|
5
|
+
|
6
|
+
if time.between?(start_time, end_time)
|
7
|
+
I18n.t('date.today_at') + ' ' + I18n.l(time, format: :time)
|
8
|
+
elsif time.between?(start_time - 1.day, end_time - 1.day)
|
9
|
+
I18n.t('date.yesterday_at') + ' ' + I18n.l(time, format: :time)
|
10
|
+
elsif time.between?(start_time - 6.day, end_time - 2.day)
|
11
|
+
I18n.l(time, format: :short)
|
12
|
+
else
|
13
|
+
I18n.l(time, format: :default)
|
14
|
+
end
|
15
|
+
end
|
@@ -3,8 +3,8 @@ en:
|
|
3
3
|
buttons:
|
4
4
|
sign_in: Sign in
|
5
5
|
sign_up: Sign up
|
6
|
-
send_password:
|
7
|
-
change_password: Update
|
6
|
+
send_password: Forgot password
|
7
|
+
change_password: Update my password
|
8
8
|
new_item: "+ add"
|
9
9
|
switch_to_site: Go
|
10
10
|
delete: "Delete"
|
@@ -46,16 +46,9 @@ en:
|
|
46
46
|
dashboard: Dashboard
|
47
47
|
assets: Assets
|
48
48
|
settings: General Settings
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
settings: Settings
|
53
|
-
pages: Pages
|
54
|
-
snippets: Snippets
|
55
|
-
account: My account
|
56
|
-
site: Site
|
57
|
-
theme_assets: Theme files
|
58
|
-
translations: Translations
|
49
|
+
developers: Developers
|
50
|
+
content_types:
|
51
|
+
title: Models
|
59
52
|
form_actions:
|
60
53
|
back: Back without saving
|
61
54
|
create: Create
|
@@ -64,16 +57,25 @@ en:
|
|
64
57
|
disable_with: Pending...
|
65
58
|
list:
|
66
59
|
untranslated: untranslated
|
60
|
+
created_at: "Created %{distance} ago"
|
61
|
+
created_by: "Created %{distance} ago by %{who}"
|
62
|
+
updated_at: "Last modified %{distance} ago"
|
63
|
+
updated_by: "Last modified %{distance} ago by %{who}"
|
67
64
|
|
68
65
|
errors:
|
69
66
|
"500":
|
70
67
|
title: Application Error
|
71
|
-
|
72
|
-
link: "→ Back to the application"
|
68
|
+
message: "We're sorry, but something went wrong"
|
73
69
|
"404":
|
74
70
|
title: Page not found
|
75
|
-
|
76
|
-
|
71
|
+
message: "The page you requested does not exist."
|
72
|
+
no_site:
|
73
|
+
title: Site not found
|
74
|
+
next: "Next →"
|
75
|
+
message:
|
76
|
+
create_account: "Please create first an account and then create a site."
|
77
|
+
add_domain: "Add the <strong>%{host}</strong> domain to the list of domains of one of your sites."
|
78
|
+
sign_in: "Please sign in first. Then, add the <strong>%{host}</strong> domain to the list of domains of one of your sites."
|
77
79
|
|
78
80
|
notifications:
|
79
81
|
new_content_entry:
|
@@ -81,6 +83,28 @@ en:
|
|
81
83
|
title: "Hi %{name}, just to let you know that a new instance has been created on %{date} for the site <b>%{domain}</b>"
|
82
84
|
type: "Model: %{type}"
|
83
85
|
|
86
|
+
activity:
|
87
|
+
site:
|
88
|
+
created: 'created the site'
|
89
|
+
page:
|
90
|
+
created: 'created the %{page} page'
|
91
|
+
updated: 'updated the %{page} page'
|
92
|
+
destroyed: 'deleted the %{page} page'
|
93
|
+
sorted: 'sorted pages'
|
94
|
+
editable_element:
|
95
|
+
updated_bulk: 'modified the content of %{pages}'
|
96
|
+
content_entry:
|
97
|
+
created: 'added %{entry} to %{content_type}'
|
98
|
+
created_public: 'added %{entry} to %{content_type} from a public form'
|
99
|
+
updated: 'updated %{entry} from %{content_type}'
|
100
|
+
destroyed: 'deleted %{entry} from %{content_type}'
|
101
|
+
sorted: 'sorted %{content_type}'
|
102
|
+
content_asset:
|
103
|
+
created_bulk: 'uploaded %{count} asset(s)'
|
104
|
+
destroyed: 'deleted the %{name} asset'
|
105
|
+
membership:
|
106
|
+
created: 'added %{name} to the site'
|
107
|
+
|
84
108
|
pagination:
|
85
109
|
first: "«"
|
86
110
|
last: "»"
|
@@ -138,6 +162,13 @@ en:
|
|
138
162
|
select_options:
|
139
163
|
ask_name: "Type the label of the option"
|
140
164
|
|
165
|
+
dashboard:
|
166
|
+
show:
|
167
|
+
title: 'Activity'
|
168
|
+
unknown_account: Someone
|
169
|
+
load_more: Loading more
|
170
|
+
loading_activity_feed: Loading...
|
171
|
+
|
141
172
|
sessions:
|
142
173
|
new:
|
143
174
|
title: "Log in"
|
@@ -152,11 +183,9 @@ en:
|
|
152
183
|
|
153
184
|
passwords:
|
154
185
|
new:
|
155
|
-
title: Forgot password
|
156
186
|
link: "→ Back to login page"
|
157
187
|
email: "Your email"
|
158
188
|
edit:
|
159
|
-
title: Update my password
|
160
189
|
link: "→ Back to login page"
|
161
190
|
password: "Your new password"
|
162
191
|
password_confirmation: "Confirmation of your new password"
|
@@ -190,6 +219,11 @@ en:
|
|
190
219
|
title: "%{title} — <small>%{fullpath}</small>"
|
191
220
|
edit:
|
192
221
|
settings_link: 'Settings'
|
222
|
+
form:
|
223
|
+
model:
|
224
|
+
buttons:
|
225
|
+
list: Manage
|
226
|
+
edit: Edit
|
193
227
|
|
194
228
|
sites:
|
195
229
|
index:
|
@@ -237,15 +271,13 @@ en:
|
|
237
271
|
untranslated: "Untranslated locales: %{list}"
|
238
272
|
index:
|
239
273
|
title: Translations
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
new:
|
244
|
-
title: "New translation"
|
245
|
-
help: "Pages/snippets can share the same template for all the locales except for some labels which can be handled by the <b>translate</b> liquid tag."
|
274
|
+
no_items: "We have not found any translations."
|
275
|
+
search_placeholder: "Enter a key or a translation"
|
276
|
+
help: "Translate all the entries with a orange (partially localized) or red (not localized) dots."
|
246
277
|
edit:
|
247
|
-
title: "
|
248
|
-
|
278
|
+
title: "Translations — editing %{key}"
|
279
|
+
form:
|
280
|
+
not_translated: "Not translated"
|
249
281
|
|
250
282
|
content_assets:
|
251
283
|
index:
|
@@ -278,38 +310,22 @@ en:
|
|
278
310
|
search_form:
|
279
311
|
placeholder: Search by filename
|
280
312
|
|
281
|
-
|
282
|
-
index:
|
283
|
-
title: Models
|
284
|
-
new: new model
|
285
|
-
edit: edit model
|
286
|
-
new:
|
287
|
-
title: New model
|
288
|
-
help: "Create your own data model (Projects, People, ...etc). Your model should have one field at least. The items created from this content type would have their first field mandatory."
|
313
|
+
public_submission_accounts:
|
289
314
|
edit:
|
290
|
-
title:
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
order_by:
|
296
|
-
created_at: 'By creation date'
|
297
|
-
updated_at: 'By updating date'
|
298
|
-
position_in_list: Manually
|
299
|
-
order_direction:
|
300
|
-
asc: Ascending
|
301
|
-
desc: Descending
|
315
|
+
title: "%{name} — Notification settings"
|
316
|
+
|
317
|
+
developers_documentation:
|
318
|
+
show:
|
319
|
+
title: Developers
|
302
320
|
|
303
321
|
content_entries:
|
304
322
|
index:
|
305
323
|
title: '%{type}'
|
306
324
|
download: download entries
|
307
325
|
new: new entry
|
326
|
+
edit_notification_settings: Edit notification settings
|
308
327
|
category_noname: "No name"
|
309
328
|
latest_entries: "Latest entries"
|
310
|
-
created_by: "Created %{distance} by %{who}"
|
311
|
-
updated_at: "Last modified %{distance}"
|
312
|
-
updated_by: "Last modified %{distance} by %{who}"
|
313
329
|
search_placeholder: "Enter your search keywords here"
|
314
330
|
group_by:
|
315
331
|
all: All
|
@@ -137,6 +137,9 @@ fr:
|
|
137
137
|
abbr_month_names: [~, jan., fév., mar., avr., mai, juin, juil., août, sept., oct., nov., déc.]
|
138
138
|
order: [ day, month, year ]
|
139
139
|
|
140
|
+
today_at: "aujourd'hui à"
|
141
|
+
yesterday_at: "hier à"
|
142
|
+
|
140
143
|
pagination:
|
141
144
|
previous: "« Précédent"
|
142
145
|
next: "Suivant »"
|
@@ -226,4 +229,4 @@ fr:
|
|
226
229
|
skip_last_comma: true
|
227
230
|
words_connector: ", "
|
228
231
|
two_words_connector: " et "
|
229
|
-
last_word_connector: " et "
|
232
|
+
last_word_connector: " et "
|
@@ -1,6 +1,16 @@
|
|
1
1
|
en:
|
2
2
|
simple_form:
|
3
3
|
titles:
|
4
|
+
locomotive:
|
5
|
+
account:
|
6
|
+
information: Main
|
7
|
+
api: API
|
8
|
+
site:
|
9
|
+
information: Main
|
10
|
+
access_points: Access points
|
11
|
+
seo: SEO
|
12
|
+
advanced: Advanced
|
13
|
+
|
4
14
|
defaults:
|
5
15
|
locomotive:
|
6
16
|
information: General information
|
@@ -24,7 +34,7 @@ en:
|
|
24
34
|
presentation: Presentation
|
25
35
|
attributes: Attributes
|
26
36
|
upload: Upload
|
27
|
-
api:
|
37
|
+
api: API3
|
28
38
|
labels:
|
29
39
|
locomotive:
|
30
40
|
theme_asset:
|
@@ -38,7 +48,7 @@ en:
|
|
38
48
|
field:
|
39
49
|
name: Alias
|
40
50
|
content_type:
|
41
|
-
|
51
|
+
entry_template: Entry template
|
42
52
|
public_submission_enabled: Public submission
|
43
53
|
public_submission_accounts: Notified Accounts
|
44
54
|
"custom_fields/field":
|
@@ -56,7 +66,7 @@ en:
|
|
56
66
|
seo_title: Title
|
57
67
|
target_klass_name: Model
|
58
68
|
editable_element:
|
59
|
-
region:
|
69
|
+
region: Sections
|
60
70
|
site:
|
61
71
|
locales: Languages
|
62
72
|
timezone_name: Timezone
|
@@ -133,12 +143,8 @@ en:
|
|
133
143
|
name: "We suggest you to type the plural form of the model. Ex: Projects, Recipes, Posts, Articles, ...etc"
|
134
144
|
slug: "It will be used as the name of the collection in the liquid templates. Ex: <span class='code'>{{ contents.my_projects }}</span>"
|
135
145
|
raw_item_template: "You can customize the text displayed for each item in the list. Simply use Liquid. Ex: <span class='code'>{{ entry.name }})</span>"
|
136
|
-
filter_fields: "If not empty, a filter bar will be displayed on the page listing the entries. The entries will be then filtered by the field(s) selected in the select box above."
|
137
146
|
public_submission_enabled: "It is used to let people from outside to create new entries (example: messages in a contact form)"
|
138
|
-
public_submission_accounts: "
|
139
|
-
"custom_fields/field":
|
140
|
-
name: "Name of the property for liquid templates. Ex: <span class='code'>{{ your_object.<name_of_your_field> }}</span>"
|
141
|
-
hint: "Text displayed in the model form just below the field"
|
147
|
+
public_submission_accounts: "When an entry is created, send a notification email to the accounts listed below."
|
142
148
|
content_type_entry_field:
|
143
149
|
select_options: "Add/edit/re-arrange the options."
|
144
150
|
|