locomotivecms 3.0.0.pre.beta.1 → 3.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -3
- data/app/api/locomotive/api.rb +1 -0
- data/app/api/locomotive/api/entities/page_entity.rb +1 -1
- data/app/api/locomotive/api/entities/site_entity.rb +9 -1
- data/app/api/locomotive/api/exception_rescuers.rb +3 -5
- data/app/api/locomotive/api/forms/page_form.rb +1 -1
- data/app/api/locomotive/api/forms/site_form.rb +1 -2
- data/app/api/locomotive/api/helpers/authentication_helper.rb +6 -1
- data/app/api/locomotive/api/helpers/locales_helper.rb +15 -0
- data/app/api/locomotive/api/helpers/params_helper.rb +13 -0
- data/app/api/locomotive/api/middlewares/locale_middleware.rb +6 -1
- data/app/api/locomotive/api/resources/content_entry_resource.rb +2 -0
- data/app/api/locomotive/api/resources/content_type_resource.rb +2 -2
- data/app/api/locomotive/api/resources/current_site_resource.rb +2 -1
- data/app/api/locomotive/api/resources/membership_resource.rb +0 -4
- data/app/api/locomotive/api/resources/page_resource.rb +6 -1
- data/app/api/locomotive/api/resources/site_resource.rb +4 -2
- data/app/assets/javascripts/locomotive.js +1 -0
- data/app/assets/javascripts/locomotive/utils/nprogress.js.coffee +3 -1
- data/app/assets/javascripts/locomotive/views/editable_elements/index_view.js.coffee +10 -3
- data/app/assets/javascripts/locomotive/views/inputs/markdown_view.js.coffee +82 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte/file_view.js.coffee +1 -1
- data/app/assets/javascripts/locomotive/views/inputs/rte/link_view.js.coffee +1 -1
- data/app/assets/javascripts/locomotive/views/inputs/rte_view.js.coffee.erb +1 -1
- data/app/assets/javascripts/locomotive/views/inputs/text_view.js.coffee +4 -1
- data/app/assets/javascripts/locomotive/views/pages/list_view.js.coffee +3 -0
- data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +22 -1
- data/app/assets/javascripts/locomotive/views/shared/header_view.js.coffee +2 -2
- data/app/assets/stylesheets/locomotive/application.scss +2 -0
- data/app/assets/stylesheets/locomotive/base/_form.scss +2 -0
- data/app/assets/stylesheets/locomotive/base/form/_api_key.scss +0 -1
- data/app/assets/stylesheets/locomotive/base/form/_array_input.scss +2 -0
- data/app/assets/stylesheets/locomotive/base/form/_base.scss +13 -2
- data/app/assets/stylesheets/locomotive/base/form/_color_input.scss +12 -0
- data/app/assets/stylesheets/locomotive/base/form/_markdown.scss +292 -0
- data/app/assets/stylesheets/locomotive/base/form/_popover.scss +22 -0
- data/app/assets/stylesheets/locomotive/base/form/_rte.scss +2 -1
- data/app/assets/stylesheets/locomotive/components/_activity_feed.scss +1 -0
- data/app/assets/stylesheets/locomotive/components/_dashboard.scss +29 -0
- data/app/assets/stylesheets/locomotive/components/_live_editing.scss +13 -1
- data/app/assets/stylesheets/locomotive/components/_main.scss +1 -1
- data/app/assets/stylesheets/locomotive/components/_transitions.scss +24 -3
- data/app/assets/stylesheets/locomotive/components/sidebar/_base.scss +1 -0
- data/app/assets/stylesheets/locomotive/globals/_bootstrap.scss +2 -2
- data/app/assets/stylesheets/locomotive/globals/_variables.scss +4 -3
- data/app/assets/stylesheets/locomotive/layouts/_live_editing.scss +4 -0
- data/app/controllers/locomotive/concerns/locale_helpers_controller.rb +1 -0
- data/app/controllers/locomotive/content_entries_controller.rb +10 -2
- data/app/controllers/locomotive/pages_controller.rb +2 -1
- data/app/controllers/locomotive/passwords_controller.rb +17 -1
- data/app/helpers/locomotive/base_helper.rb +19 -0
- data/app/helpers/locomotive/content_types_helper.rb +2 -1
- data/app/helpers/locomotive/custom_fields_helper.rb +14 -1
- data/app/helpers/locomotive/dashboard_helper.rb +12 -0
- data/app/helpers/locomotive/editable_elements_helper.rb +9 -4
- data/app/helpers/locomotive/pages_helper.rb +1 -14
- data/app/helpers/locomotive/shared/pages_helper.rb +17 -0
- data/app/helpers/locomotive/translations_helper.rb +0 -14
- data/app/inputs/locomotive/color_input.rb +18 -0
- data/app/inputs/locomotive/markdown_input.rb +19 -0
- data/app/models/locomotive/account.rb +2 -1
- data/app/models/locomotive/concerns/content_entry/file_size.rb +27 -0
- data/app/models/locomotive/concerns/content_type/group_by.rb +3 -1
- data/app/models/locomotive/concerns/page/layout.rb +63 -19
- data/app/models/locomotive/concerns/shared/site_scope.rb +37 -0
- data/app/models/locomotive/concerns/site/cache.rb +32 -0
- data/app/models/locomotive/concerns/theme_asset/plain_text.rb +85 -0
- data/app/models/locomotive/content_entry.rb +7 -7
- data/app/models/locomotive/content_type.rb +12 -6
- data/app/models/locomotive/page.rb +12 -14
- data/app/models/locomotive/site.rb +9 -3
- data/app/models/locomotive/snippet.rb +6 -4
- data/app/models/locomotive/theme_asset.rb +8 -73
- data/app/models/locomotive/translation.rb +6 -5
- data/app/policies/locomotive/site_policy.rb +2 -2
- data/app/services/locomotive/content_entry_service.rb +7 -6
- data/app/services/locomotive/site_service.rb +1 -0
- data/app/views/locomotive/content_entries/_entry.html.slim +1 -0
- data/app/views/locomotive/content_entries/edit.html.slim +1 -1
- data/app/views/locomotive/content_entries/new.html.slim +1 -1
- data/app/views/locomotive/current_site/_membership.html.slim +1 -0
- data/app/views/locomotive/current_site/edit.html.slim +1 -1
- data/app/views/locomotive/current_site/form/_access_points.html.slim +1 -1
- data/app/views/locomotive/current_site/form/_advanced.html.slim +2 -0
- data/app/views/locomotive/dashboard/_activity.html.slim +26 -0
- data/app/views/locomotive/dashboard/_url.html.slim +9 -0
- data/app/views/locomotive/dashboard/show.html.slim +3 -21
- data/app/views/locomotive/devise_mailer/reset_password_instructions.html.slim +1 -1
- data/app/views/locomotive/editable_elements/_edit.html.slim +8 -1
- data/app/views/locomotive/editable_elements/_form.html.slim +1 -1
- data/app/views/locomotive/editable_elements/index_without_preview.html.slim +24 -17
- data/app/views/locomotive/layouts/application.html.slim +6 -4
- data/app/views/locomotive/layouts/live_editing.html.slim +9 -0
- data/app/views/locomotive/layouts/not_logged_in.html.slim +1 -1
- data/app/views/locomotive/layouts/without_site.html.slim +2 -0
- data/app/views/locomotive/memberships/edit.html.slim +1 -1
- data/app/views/locomotive/memberships/new.html.slim +1 -1
- data/app/views/locomotive/my_account/edit.html.slim +7 -5
- data/app/views/locomotive/pages/_header.html.slim +7 -0
- data/app/views/locomotive/pages/edit.html.slim +2 -4
- data/app/views/locomotive/pages/form/_main.html.slim +4 -1
- data/app/views/locomotive/pages/form/_tabs.html.slim +4 -3
- data/app/views/locomotive/public_submission_accounts/_account.html.slim +1 -1
- data/app/views/locomotive/public_submission_accounts/edit.html.slim +1 -1
- data/app/views/locomotive/shared/_header.html.slim +25 -22
- data/app/views/locomotive/shared/_locale_picker_link.html.slim +3 -0
- data/app/views/locomotive/shared/_main_app_header.html.slim +1 -1
- data/app/views/locomotive/shared/_sidebar.html.slim +15 -11
- data/app/views/locomotive/shared/rte/_markdown_toolbar.html.slim +42 -0
- data/config/locales/admin_ui.en.yml +9 -4
- data/config/locales/default.en.yml +4 -0
- data/config/locales/devise.en.yml +1 -0
- data/config/locales/simple_form.en.yml +6 -2
- data/lib/locomotive/action_controller/responder.rb +5 -0
- data/lib/locomotive/engine.rb +5 -0
- data/lib/locomotive/middlewares/site.rb +39 -21
- data/lib/locomotive/simple_form.rb +3 -31
- data/lib/locomotive/steam/middlewares/cache.rb +62 -0
- data/lib/locomotive/steam/middlewares/page_editing.rb +9 -3
- data/lib/locomotive/steam/services/api_entry_submission_service.rb +6 -3
- data/lib/locomotive/steam/services/liquid_parser_with_cache_service.rb +74 -0
- data/lib/locomotive/steam_adaptor.rb +7 -1
- data/lib/locomotive/version.rb +1 -1
- data/lib/tasks/development.rake +4 -0
- data/lib/tasks/locomotive.rake +14 -0
- data/spec/lib/locomotive/steam/services/api_entry_submission_service_spec.rb +10 -1
- data/spec/lib/locomotive/steam/services/liquid_parser_with_cache_service_spec.rb +53 -0
- data/spec/models/locomotive/concerns/content_entry/file_size_spec.rb +40 -0
- data/spec/models/locomotive/concerns/page/layout_spec.rb +122 -17
- data/spec/models/locomotive/concerns/site/cache_spec.rb +60 -0
- data/spec/models/locomotive/content_entry_spec.rb +7 -0
- data/spec/models/locomotive/content_type_spec.rb +18 -11
- data/spec/models/locomotive/page_spec.rb +32 -8
- data/spec/models/locomotive/snippet_spec.rb +13 -4
- data/spec/models/locomotive/theme_asset_spec.rb +10 -3
- data/spec/models/locomotive/translation_spec.rb +28 -0
- data/spec/requests/locomotive/steam/cache_spec.rb +83 -0
- data/spec/requests/site_spec.rb +24 -0
- data/spec/support/capybara.rb +5 -13
- data/spec/support/factories.rb +9 -0
- data/spec/support/features/session_helpers.rb +19 -3
- data/spec/support/features/site_helpers.rb +27 -0
- data/spec/support/shared_examples/site_scope_examples.rb +27 -0
- data/vendor/assets/images/locomotive/bootstrap-colorpicker/alpha-horizontal.png +0 -0
- data/vendor/assets/images/locomotive/bootstrap-colorpicker/alpha.png +0 -0
- data/vendor/assets/images/locomotive/bootstrap-colorpicker/hue-horizontal.png +0 -0
- data/vendor/assets/images/locomotive/bootstrap-colorpicker/hue.png +0 -0
- data/vendor/assets/images/locomotive/bootstrap-colorpicker/saturation.png +0 -0
- data/vendor/assets/javascripts/locomotive/bootstrap-colorpicker.js +1 -0
- data/vendor/assets/javascripts/locomotive/datepicker_i18n.js.erb +6 -6
- data/vendor/assets/javascripts/locomotive/kramed.min.js +11 -0
- data/vendor/assets/stylesheets/locomotive/bootstrap-colorpicker.scss +9 -0
- metadata +59 -44
- data/app/controllers/locomotive/api/accounts_controller.rb +0 -60
- data/app/controllers/locomotive/api/base_controller.rb +0 -35
- data/app/controllers/locomotive/api/content_assets_controller.rb +0 -51
- data/app/controllers/locomotive/api/content_entries_controller.rb +0 -71
- data/app/controllers/locomotive/api/content_types_controller.rb +0 -52
- data/app/controllers/locomotive/api/current_site_controller.rb +0 -34
- data/app/controllers/locomotive/api/memberships_controller.rb +0 -52
- data/app/controllers/locomotive/api/my_account_controller.rb +0 -46
- data/app/controllers/locomotive/api/pages_controller.rb +0 -53
- data/app/controllers/locomotive/api/sites_controller.rb +0 -58
- data/app/controllers/locomotive/api/snippets_controller.rb +0 -52
- data/app/controllers/locomotive/api/theme_assets_controller.rb +0 -51
- data/app/controllers/locomotive/api/tokens_controller.rb +0 -36
- data/app/controllers/locomotive/api/translations_controller.rb +0 -51
- data/app/controllers/locomotive/api/version_controller.rb +0 -11
- data/spec/models/locomotive/editable_control_spec.rb +0 -79
- data/spec/models/locomotive/editable_file_spec.rb +0 -94
- data/spec/models/locomotive/editable_text_spec.rb +0 -219
- data/vendor/assets/images/select2-spinner.gif +0 -0
- data/vendor/assets/images/select2.png +0 -0
- data/vendor/assets/images/select2x2.png +0 -0
@@ -18,5 +18,6 @@
|
|
18
18
|
.buttons
|
19
19
|
- if membership.account != current_locomotive_account && policy(membership).edit?
|
20
20
|
= link_to t(:edit, scope: 'locomotive.shared.form.array_input'), edit_membership_path(current_site, membership), class: 'choose btn btn-primary btn-sm'
|
21
|
+
|
|
21
22
|
= link_to membership_path(current_site, membership), class: 'delete', data: { confirm: t('locomotive.messages.confirm') }, method: :delete do
|
22
23
|
i.fa.fa-trash-o
|
@@ -2,7 +2,7 @@
|
|
2
2
|
= f.inputs :access_points do
|
3
3
|
= f.input :handle
|
4
4
|
|
5
|
-
= f.input :domains, as: :array, placeholder: true, collection: f.object.domains, template: :domain, template_url: new_domain_current_site_path(current_site)
|
5
|
+
= f.input :domains, as: :array, hint: t(:domains, scope: 'simple_form.hints.locomotive.site', domain: Locomotive.config.host || request.host).html_safe, placeholder: true, collection: f.object.domains, template: :domain, template_url: new_domain_current_site_path(current_site)
|
6
6
|
|
7
7
|
= f.actions do
|
8
8
|
= f.action
|
@@ -0,0 +1,26 @@
|
|
1
|
+
h3 class="activity"= t('.title')
|
2
|
+
|
3
|
+
ul.activity-feed
|
4
|
+
- @activities.each do |activity|
|
5
|
+
li class=activity.domain
|
6
|
+
span.icon.fa-stack.fa-lg
|
7
|
+
i.fa.fa-circle.fa-stack-2x
|
8
|
+
i.fa.fa-stack-1x.fa-inverse class=activity_to_icon(activity)
|
9
|
+
|
10
|
+
p
|
11
|
+
= account_avatar_and_name(activity.actor, size = '70x70#')
|
12
|
+
|
|
13
|
+
| ·
|
14
|
+
|
|
15
|
+
span.time= activity.created_at.to_s(:humanized_ago)
|
16
|
+
|
|
17
|
+
| ·
|
18
|
+
|
|
19
|
+
span.sentence= render_activity_sentence(activity)
|
20
|
+
|
21
|
+
- if info = render_activity_additional_information(activity)
|
22
|
+
.additional-information= info
|
23
|
+
|
24
|
+
- if @activities.current_page < @activities.total_pages
|
25
|
+
p.text-center
|
26
|
+
= link_to t('.load_more'), { page: @activities.current_page + 1 }, class: 'btn btn-primary btn-sm', data: { behavior: 'load-more', loading_text: t('.loading_activity_feed') }, remote: true
|
@@ -0,0 +1,9 @@
|
|
1
|
+
h3 class="url"
|
2
|
+
= t('.title')
|
3
|
+
|
4
|
+
strong
|
5
|
+
= current_site_url
|
6
|
+
= link_to t('.visit'), current_site_url, target: '_blank', class: 'btn btn-sm btn-primary'
|
7
|
+
|
8
|
+
- if current_site.domains.blank?
|
9
|
+
= link_to t('.change_domain'), edit_current_site_path(current_site, anchor: 'access_points'), class: 'btn btn-sm btn-primary'
|
@@ -2,27 +2,9 @@
|
|
2
2
|
|
3
3
|
.row
|
4
4
|
.col-md-12
|
5
|
-
|
6
|
-
- @activities.each do |activity|
|
7
|
-
li class=activity.domain
|
8
|
-
span.icon.fa-stack.fa-lg
|
9
|
-
i.fa.fa-circle.fa-stack-2x
|
10
|
-
i.fa.fa-stack-1x.fa-inverse class=activity_to_icon(activity)
|
5
|
+
= render 'url'
|
11
6
|
|
12
|
-
|
13
|
-
= account_avatar_and_name(activity.actor, size = '70x70#')
|
14
|
-
|
|
15
|
-
| ·
|
16
|
-
|
|
17
|
-
span.time= activity.created_at.to_s(:humanized_ago)
|
18
|
-
|
|
19
|
-
| ·
|
20
|
-
|
|
21
|
-
span.sentence= render_activity_sentence(activity)
|
7
|
+
hr
|
22
8
|
|
23
|
-
|
24
|
-
.additional-information= info
|
9
|
+
= render 'activity'
|
25
10
|
|
26
|
-
- if @activities.current_page < @activities.total_pages
|
27
|
-
p.text-center
|
28
|
-
= link_to t('.load_more'), { page: @activities.current_page + 1 }, class: 'btn btn-primary btn-sm', data: { behavior: 'load-more', loading_text: t('.loading_activity_feed') }, remote: true
|
@@ -5,7 +5,7 @@ p
|
|
5
5
|
p
|
6
6
|
== t('.reset_password_instruction')
|
7
7
|
p
|
8
|
-
= link_to t('.change_my_password'), edit_locomotive_account_password_url(reset_password_token: @
|
8
|
+
= link_to t('.change_my_password'), edit_locomotive_account_password_url(reset_password_token: @token)
|
9
9
|
p
|
10
10
|
== t('.wrong_request_instruction')
|
11
11
|
p
|
@@ -26,7 +26,14 @@
|
|
26
26
|
|
|
27
27
|
= f.action
|
28
28
|
|
29
|
-
-
|
29
|
+
- if @editable_elements.empty?
|
30
|
+
- if @content_entry.nil?
|
31
|
+
.col-sm-12.col-xs-12
|
32
|
+
br
|
33
|
+
.alert.alert-warning.text-center role="alert"
|
34
|
+
= t('.no_editable_elements')
|
35
|
+
|
36
|
+
- else
|
30
37
|
.col-sm-12.col-xs-12
|
31
38
|
fieldset.inputs
|
32
39
|
.form-group.input.select.optional.inline
|
@@ -13,7 +13,7 @@
|
|
13
13
|
- case editable_element.type.to_sym
|
14
14
|
|
15
15
|
- when :editable_text
|
16
|
-
= g.input :content, editable_element_input_options(editable_element, index, as: editable_element
|
16
|
+
= g.input :content, editable_element_input_options(editable_element, index, as: editable_text_format_to_input_type(editable_element), input_html: { rows: editable_element.rows })
|
17
17
|
|
18
18
|
- when :editable_file
|
19
19
|
= g.input :source, editable_element_input_options(editable_element, index, as: :file, select_content_asset: true, hidden_fields: [:content, :default_source_url])
|
@@ -1,10 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
= help t('.help', default: '')
|
1
|
+
= render 'locomotive/pages/header'
|
4
2
|
|
5
3
|
= locomotive_form_for @page, url: update_all_editable_elements_path(current_site, @page), defaults: { placeholder: false, hint: false } do |f|
|
6
4
|
|
7
|
-
= f.action 'hide'
|
5
|
+
= f.action class: 'hide'
|
8
6
|
|
9
7
|
ul.nav.nav-tabs role='tablist'
|
10
8
|
= form_nav_tab :content, true do
|
@@ -18,17 +16,26 @@
|
|
18
16
|
= form_tab_pane :content, true do
|
19
17
|
|
20
18
|
.row
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
=
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
19
|
+
|
20
|
+
- if @editable_elements.empty?
|
21
|
+
- if @content_entry.nil?
|
22
|
+
.col-md-12
|
23
|
+
br
|
24
|
+
.alert.alert-warning.text-center role="alert"
|
25
|
+
= t('.no_editable_elements')
|
26
|
+
|
27
|
+
- else
|
28
|
+
.col-md-12
|
29
|
+
fieldset.inputs.info-row
|
30
|
+
.form-group.input.select.optional.inline
|
31
|
+
label.select.optional.control-label for='page_block'
|
32
|
+
= t(:region, scope: 'simple_form.labels.locomotive.editable_element')
|
33
|
+
span.form-wrapper
|
34
|
+
= select_tag 'block', options_for_page_blocks(@editable_elements_by_block)
|
35
|
+
|
36
|
+
.col-md-12
|
37
|
+
= render 'form', f: f
|
38
|
+
|
39
|
+
= f.actions do
|
40
|
+
= f.action
|
34
41
|
|
@@ -3,6 +3,7 @@ doctype html
|
|
3
3
|
html xmlns='http://www.w3.org/1999/xhtml'
|
4
4
|
head
|
5
5
|
= render 'locomotive/shared/head'
|
6
|
+
|
6
7
|
body class=body_class
|
7
8
|
|
8
9
|
- # HEADER: brand + current site + account
|
@@ -17,8 +18,11 @@ html xmlns='http://www.w3.org/1999/xhtml'
|
|
17
18
|
.content
|
18
19
|
.scrollable
|
19
20
|
.container-fluid.main role='main'
|
21
|
+
.row
|
22
|
+
= yield :local_warning_message
|
23
|
+
|
20
24
|
- if title
|
21
|
-
.row
|
25
|
+
.row.header-row
|
22
26
|
.col-md-8.col-xs-9
|
23
27
|
h1== title
|
24
28
|
|
@@ -35,8 +39,6 @@ html xmlns='http://www.w3.org/1999/xhtml'
|
|
35
39
|
.container-fluid
|
36
40
|
.row
|
37
41
|
.col-md-12
|
38
|
-
h1
|
39
|
-
p
|
40
|
-
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc placerat tincidunt massa, vitae mollis dui volutpat eu. Sed ullamcorper id turpis vel pulvinar. Nullam dignissim purus vel libero sodales finibus. Donec ut pellentesque velit, nec semper felis. Curabitur lacinia egestas condimentum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam non feugiat erat. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nulla enim nibh, consectetur vel mollis eu, venenatis eget elit. Nulla eget massa tincidunt, scelerisque mi non, lacinia ante. In scelerisque, nisi ut ullamcorper aliquet, nulla quam faucibus est, a congue odio enim ac nulla. Cras dictum cursus ex vel scelerisque. Vestibulum elementum auctor tellus vitae imperdiet.
|
42
|
+
h1 Right sidebar
|
41
43
|
|
42
44
|
= yield :foot
|
@@ -3,6 +3,7 @@ doctype html
|
|
3
3
|
html xmlns='http://www.w3.org/1999/xhtml'
|
4
4
|
head
|
5
5
|
= render 'locomotive/shared/head'
|
6
|
+
|
6
7
|
body class="live-editing sidebar-closed"
|
7
8
|
|
8
9
|
- # HEADER: brand + current site + account
|
@@ -10,6 +11,14 @@ html xmlns='http://www.w3.org/1999/xhtml'
|
|
10
11
|
|
11
12
|
- # WRAPPER
|
12
13
|
.wrapper
|
14
|
+
.slide-sidebar
|
15
|
+
.bar
|
16
|
+
.expand-button
|
17
|
+
i.fa.fa-chevron-right
|
18
|
+
nav.sidebar
|
19
|
+
.scrollable
|
20
|
+
= render 'locomotive/shared/sidebar'
|
21
|
+
|
13
22
|
section.preview
|
14
23
|
.scrollable
|
15
24
|
= yield :preview
|
@@ -11,7 +11,7 @@ html xmlns='http://www.w3.org/1999/xhtml' lang=I18n.locale
|
|
11
11
|
= stylesheet_link_tag 'locomotive/not_logged_in', media: 'screen'
|
12
12
|
|
13
13
|
javascript:
|
14
|
-
window.flash_messages = #{flash_messages_to_json};
|
14
|
+
window.flash_messages = #{{flash_messages_to_json}};
|
15
15
|
|
16
16
|
= yield :head
|
17
17
|
|
@@ -10,6 +10,6 @@
|
|
10
10
|
= f.actions do
|
11
11
|
.row
|
12
12
|
.col-md-6.text-left
|
13
|
-
= link_to
|
13
|
+
= link_to "← #{t('.back')}".html_safe, edit_current_site_path(current_site)
|
14
14
|
.col-md-6.text-right
|
15
15
|
= f.action
|
@@ -10,6 +10,6 @@
|
|
10
10
|
= f.actions do
|
11
11
|
.row
|
12
12
|
.col-md-6.text-left
|
13
|
-
= link_to
|
13
|
+
= link_to ('← ' + t('.back')).html_safe, edit_current_site_path(current_site)
|
14
14
|
.col-md-6.text-right
|
15
15
|
= f.action
|
@@ -3,12 +3,14 @@
|
|
3
3
|
|
4
4
|
= help t('.help', default: '')
|
5
5
|
|
6
|
-
|
6
|
+
.row
|
7
|
+
.col-sm-offset-2.col-sm-8
|
8
|
+
= locomotive_form_for @account, url: my_account_path, html: { multipart: true }, defaults: { placeholder: false } do |f|
|
7
9
|
|
8
|
-
|
10
|
+
= hidden_field_tag :active_tab, ''
|
9
11
|
|
10
|
-
|
12
|
+
= f.action class: 'hide'
|
11
13
|
|
12
|
-
|
14
|
+
= render 'locomotive/my_account/form/tabs', f: f
|
13
15
|
|
14
|
-
|
16
|
+
= render 'locomotive/my_account/form/panes', f: f
|
@@ -1,13 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
= help t('.help', default: '')
|
1
|
+
= render 'locomotive/pages/header'
|
4
2
|
|
5
3
|
= locomotive_form_for @page, url: page_path(current_site, @page), html: { multipart: true } do |f|
|
6
4
|
|
7
5
|
= hidden_field_tag :active_tab, ''
|
8
6
|
= hidden_field_tag :_location, params[:_location]
|
9
7
|
|
10
|
-
= f.action 'hide'
|
8
|
+
= f.action class: 'hide'
|
11
9
|
|
12
10
|
= render 'locomotive/pages/form/tabs', f: f
|
13
11
|
|
@@ -19,8 +19,11 @@
|
|
19
19
|
|
20
20
|
= f.input :published, as: :toggle
|
21
21
|
|
22
|
-
-
|
22
|
+
- if !@page.not_found? && !@page.templatized? && @page.default_response_type?
|
23
23
|
|
24
24
|
= f.input :listed, as: :toggle
|
25
25
|
|
26
|
+
- if current_site.cache_enabled?
|
27
|
+
= f.input :cache_enabled, as: :toggle
|
28
|
+
|
26
29
|
= render 'locomotive/pages/form/actions', f: f
|
@@ -1,10 +1,11 @@
|
|
1
1
|
ul.nav.nav-tabs role='tablist'
|
2
|
-
- unless @page.
|
2
|
+
- unless @page.redirect?
|
3
3
|
= form_nav_tab :content do
|
4
4
|
= link_to t('simple_form.titles.locomotive.content'), editable_elements_path(current_site, @page)
|
5
5
|
|
6
6
|
= form_nav_tab :main, true do
|
7
7
|
= link_to t('simple_form.titles.locomotive.settings'), '#main', role: 'tab', data: { toggle: 'tab' }
|
8
8
|
|
9
|
-
|
10
|
-
=
|
9
|
+
- if @page.default_response_type?
|
10
|
+
= form_nav_tab :seo do
|
11
|
+
= link_to t('simple_form.titles.locomotive.seo'), '#seo', role: 'tab', data: { toggle: 'tab' }
|
@@ -1,30 +1,33 @@
|
|
1
|
-
|
1
|
+
.header
|
2
|
+
nav.navbar.navbar-default role='navigation'
|
2
3
|
|
3
|
-
|
4
|
+
.container-fluid
|
4
5
|
|
5
|
-
|
6
|
+
.navbar-header
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
button type='button' class='navbar-toggle'
|
9
|
+
span.sr-only Toggle navigation
|
10
|
+
.icon-bar
|
11
|
+
.icon-bar
|
12
|
+
.icon-bar
|
12
13
|
|
13
|
-
|
14
|
-
|
14
|
+
.navbar-brand.hidden-xs
|
15
|
+
= render 'locomotive/shared/header/brand'
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
ul.nav.navbar-nav.navbar-site.visible-xs
|
18
|
+
li
|
19
|
+
= render 'locomotive/shared/header/site'
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
.navbar-collapse#account-menu-collapse.hidden-xs
|
22
|
+
ul.nav.navbar-nav.navbar-site
|
23
|
+
li
|
24
|
+
= render 'locomotive/shared/header/site'
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
ul.nav.navbar-nav.navbar-right.account-menu-wrapper
|
27
|
+
li.dropdown
|
28
|
+
= render 'locomotive/shared/header/account'
|
28
29
|
|
29
|
-
|
30
|
-
|
30
|
+
ul.dropdown-menu role='menu'
|
31
|
+
= render 'locomotive/shared/header/account_menu'
|
32
|
+
|
33
|
+
= render 'locomotive/shared/main_app_header'
|
@@ -1,6 +1,8 @@
|
|
1
1
|
.btn-group
|
2
2
|
button.btn.btn-primary.btn-sm.dropdown-toggle data-toggle='dropdown' data-aria-haspopup='true' data-aria-expanded='false'
|
3
3
|
= flag_tag current_content_locale, '17x17'
|
4
|
+
|
|
5
|
+
|
|
4
6
|
span.caret
|
5
7
|
ul.dropdown-menu.dropdown-menu-right
|
6
8
|
- current_site.locales.each do |locale|
|
@@ -8,4 +10,5 @@
|
|
8
10
|
a href="?content_locale=#{locale}"
|
9
11
|
= flag_tag locale, '17x17'
|
10
12
|
|
|
13
|
+
|
|
11
14
|
= t(locale, scope: 'locomotive.locales')
|