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.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -3
  3. data/app/api/locomotive/api.rb +1 -0
  4. data/app/api/locomotive/api/entities/page_entity.rb +1 -1
  5. data/app/api/locomotive/api/entities/site_entity.rb +9 -1
  6. data/app/api/locomotive/api/exception_rescuers.rb +3 -5
  7. data/app/api/locomotive/api/forms/page_form.rb +1 -1
  8. data/app/api/locomotive/api/forms/site_form.rb +1 -2
  9. data/app/api/locomotive/api/helpers/authentication_helper.rb +6 -1
  10. data/app/api/locomotive/api/helpers/locales_helper.rb +15 -0
  11. data/app/api/locomotive/api/helpers/params_helper.rb +13 -0
  12. data/app/api/locomotive/api/middlewares/locale_middleware.rb +6 -1
  13. data/app/api/locomotive/api/resources/content_entry_resource.rb +2 -0
  14. data/app/api/locomotive/api/resources/content_type_resource.rb +2 -2
  15. data/app/api/locomotive/api/resources/current_site_resource.rb +2 -1
  16. data/app/api/locomotive/api/resources/membership_resource.rb +0 -4
  17. data/app/api/locomotive/api/resources/page_resource.rb +6 -1
  18. data/app/api/locomotive/api/resources/site_resource.rb +4 -2
  19. data/app/assets/javascripts/locomotive.js +1 -0
  20. data/app/assets/javascripts/locomotive/utils/nprogress.js.coffee +3 -1
  21. data/app/assets/javascripts/locomotive/views/editable_elements/index_view.js.coffee +10 -3
  22. data/app/assets/javascripts/locomotive/views/inputs/markdown_view.js.coffee +82 -0
  23. data/app/assets/javascripts/locomotive/views/inputs/rte/file_view.js.coffee +1 -1
  24. data/app/assets/javascripts/locomotive/views/inputs/rte/link_view.js.coffee +1 -1
  25. data/app/assets/javascripts/locomotive/views/inputs/rte_view.js.coffee.erb +1 -1
  26. data/app/assets/javascripts/locomotive/views/inputs/text_view.js.coffee +4 -1
  27. data/app/assets/javascripts/locomotive/views/pages/list_view.js.coffee +3 -0
  28. data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +22 -1
  29. data/app/assets/javascripts/locomotive/views/shared/header_view.js.coffee +2 -2
  30. data/app/assets/stylesheets/locomotive/application.scss +2 -0
  31. data/app/assets/stylesheets/locomotive/base/_form.scss +2 -0
  32. data/app/assets/stylesheets/locomotive/base/form/_api_key.scss +0 -1
  33. data/app/assets/stylesheets/locomotive/base/form/_array_input.scss +2 -0
  34. data/app/assets/stylesheets/locomotive/base/form/_base.scss +13 -2
  35. data/app/assets/stylesheets/locomotive/base/form/_color_input.scss +12 -0
  36. data/app/assets/stylesheets/locomotive/base/form/_markdown.scss +292 -0
  37. data/app/assets/stylesheets/locomotive/base/form/_popover.scss +22 -0
  38. data/app/assets/stylesheets/locomotive/base/form/_rte.scss +2 -1
  39. data/app/assets/stylesheets/locomotive/components/_activity_feed.scss +1 -0
  40. data/app/assets/stylesheets/locomotive/components/_dashboard.scss +29 -0
  41. data/app/assets/stylesheets/locomotive/components/_live_editing.scss +13 -1
  42. data/app/assets/stylesheets/locomotive/components/_main.scss +1 -1
  43. data/app/assets/stylesheets/locomotive/components/_transitions.scss +24 -3
  44. data/app/assets/stylesheets/locomotive/components/sidebar/_base.scss +1 -0
  45. data/app/assets/stylesheets/locomotive/globals/_bootstrap.scss +2 -2
  46. data/app/assets/stylesheets/locomotive/globals/_variables.scss +4 -3
  47. data/app/assets/stylesheets/locomotive/layouts/_live_editing.scss +4 -0
  48. data/app/controllers/locomotive/concerns/locale_helpers_controller.rb +1 -0
  49. data/app/controllers/locomotive/content_entries_controller.rb +10 -2
  50. data/app/controllers/locomotive/pages_controller.rb +2 -1
  51. data/app/controllers/locomotive/passwords_controller.rb +17 -1
  52. data/app/helpers/locomotive/base_helper.rb +19 -0
  53. data/app/helpers/locomotive/content_types_helper.rb +2 -1
  54. data/app/helpers/locomotive/custom_fields_helper.rb +14 -1
  55. data/app/helpers/locomotive/dashboard_helper.rb +12 -0
  56. data/app/helpers/locomotive/editable_elements_helper.rb +9 -4
  57. data/app/helpers/locomotive/pages_helper.rb +1 -14
  58. data/app/helpers/locomotive/shared/pages_helper.rb +17 -0
  59. data/app/helpers/locomotive/translations_helper.rb +0 -14
  60. data/app/inputs/locomotive/color_input.rb +18 -0
  61. data/app/inputs/locomotive/markdown_input.rb +19 -0
  62. data/app/models/locomotive/account.rb +2 -1
  63. data/app/models/locomotive/concerns/content_entry/file_size.rb +27 -0
  64. data/app/models/locomotive/concerns/content_type/group_by.rb +3 -1
  65. data/app/models/locomotive/concerns/page/layout.rb +63 -19
  66. data/app/models/locomotive/concerns/shared/site_scope.rb +37 -0
  67. data/app/models/locomotive/concerns/site/cache.rb +32 -0
  68. data/app/models/locomotive/concerns/theme_asset/plain_text.rb +85 -0
  69. data/app/models/locomotive/content_entry.rb +7 -7
  70. data/app/models/locomotive/content_type.rb +12 -6
  71. data/app/models/locomotive/page.rb +12 -14
  72. data/app/models/locomotive/site.rb +9 -3
  73. data/app/models/locomotive/snippet.rb +6 -4
  74. data/app/models/locomotive/theme_asset.rb +8 -73
  75. data/app/models/locomotive/translation.rb +6 -5
  76. data/app/policies/locomotive/site_policy.rb +2 -2
  77. data/app/services/locomotive/content_entry_service.rb +7 -6
  78. data/app/services/locomotive/site_service.rb +1 -0
  79. data/app/views/locomotive/content_entries/_entry.html.slim +1 -0
  80. data/app/views/locomotive/content_entries/edit.html.slim +1 -1
  81. data/app/views/locomotive/content_entries/new.html.slim +1 -1
  82. data/app/views/locomotive/current_site/_membership.html.slim +1 -0
  83. data/app/views/locomotive/current_site/edit.html.slim +1 -1
  84. data/app/views/locomotive/current_site/form/_access_points.html.slim +1 -1
  85. data/app/views/locomotive/current_site/form/_advanced.html.slim +2 -0
  86. data/app/views/locomotive/dashboard/_activity.html.slim +26 -0
  87. data/app/views/locomotive/dashboard/_url.html.slim +9 -0
  88. data/app/views/locomotive/dashboard/show.html.slim +3 -21
  89. data/app/views/locomotive/devise_mailer/reset_password_instructions.html.slim +1 -1
  90. data/app/views/locomotive/editable_elements/_edit.html.slim +8 -1
  91. data/app/views/locomotive/editable_elements/_form.html.slim +1 -1
  92. data/app/views/locomotive/editable_elements/index_without_preview.html.slim +24 -17
  93. data/app/views/locomotive/layouts/application.html.slim +6 -4
  94. data/app/views/locomotive/layouts/live_editing.html.slim +9 -0
  95. data/app/views/locomotive/layouts/not_logged_in.html.slim +1 -1
  96. data/app/views/locomotive/layouts/without_site.html.slim +2 -0
  97. data/app/views/locomotive/memberships/edit.html.slim +1 -1
  98. data/app/views/locomotive/memberships/new.html.slim +1 -1
  99. data/app/views/locomotive/my_account/edit.html.slim +7 -5
  100. data/app/views/locomotive/pages/_header.html.slim +7 -0
  101. data/app/views/locomotive/pages/edit.html.slim +2 -4
  102. data/app/views/locomotive/pages/form/_main.html.slim +4 -1
  103. data/app/views/locomotive/pages/form/_tabs.html.slim +4 -3
  104. data/app/views/locomotive/public_submission_accounts/_account.html.slim +1 -1
  105. data/app/views/locomotive/public_submission_accounts/edit.html.slim +1 -1
  106. data/app/views/locomotive/shared/_header.html.slim +25 -22
  107. data/app/views/locomotive/shared/_locale_picker_link.html.slim +3 -0
  108. data/app/views/locomotive/shared/_main_app_header.html.slim +1 -1
  109. data/app/views/locomotive/shared/_sidebar.html.slim +15 -11
  110. data/app/views/locomotive/shared/rte/_markdown_toolbar.html.slim +42 -0
  111. data/config/locales/admin_ui.en.yml +9 -4
  112. data/config/locales/default.en.yml +4 -0
  113. data/config/locales/devise.en.yml +1 -0
  114. data/config/locales/simple_form.en.yml +6 -2
  115. data/lib/locomotive/action_controller/responder.rb +5 -0
  116. data/lib/locomotive/engine.rb +5 -0
  117. data/lib/locomotive/middlewares/site.rb +39 -21
  118. data/lib/locomotive/simple_form.rb +3 -31
  119. data/lib/locomotive/steam/middlewares/cache.rb +62 -0
  120. data/lib/locomotive/steam/middlewares/page_editing.rb +9 -3
  121. data/lib/locomotive/steam/services/api_entry_submission_service.rb +6 -3
  122. data/lib/locomotive/steam/services/liquid_parser_with_cache_service.rb +74 -0
  123. data/lib/locomotive/steam_adaptor.rb +7 -1
  124. data/lib/locomotive/version.rb +1 -1
  125. data/lib/tasks/development.rake +4 -0
  126. data/lib/tasks/locomotive.rake +14 -0
  127. data/spec/lib/locomotive/steam/services/api_entry_submission_service_spec.rb +10 -1
  128. data/spec/lib/locomotive/steam/services/liquid_parser_with_cache_service_spec.rb +53 -0
  129. data/spec/models/locomotive/concerns/content_entry/file_size_spec.rb +40 -0
  130. data/spec/models/locomotive/concerns/page/layout_spec.rb +122 -17
  131. data/spec/models/locomotive/concerns/site/cache_spec.rb +60 -0
  132. data/spec/models/locomotive/content_entry_spec.rb +7 -0
  133. data/spec/models/locomotive/content_type_spec.rb +18 -11
  134. data/spec/models/locomotive/page_spec.rb +32 -8
  135. data/spec/models/locomotive/snippet_spec.rb +13 -4
  136. data/spec/models/locomotive/theme_asset_spec.rb +10 -3
  137. data/spec/models/locomotive/translation_spec.rb +28 -0
  138. data/spec/requests/locomotive/steam/cache_spec.rb +83 -0
  139. data/spec/requests/site_spec.rb +24 -0
  140. data/spec/support/capybara.rb +5 -13
  141. data/spec/support/factories.rb +9 -0
  142. data/spec/support/features/session_helpers.rb +19 -3
  143. data/spec/support/features/site_helpers.rb +27 -0
  144. data/spec/support/shared_examples/site_scope_examples.rb +27 -0
  145. data/vendor/assets/images/locomotive/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  146. data/vendor/assets/images/locomotive/bootstrap-colorpicker/alpha.png +0 -0
  147. data/vendor/assets/images/locomotive/bootstrap-colorpicker/hue-horizontal.png +0 -0
  148. data/vendor/assets/images/locomotive/bootstrap-colorpicker/hue.png +0 -0
  149. data/vendor/assets/images/locomotive/bootstrap-colorpicker/saturation.png +0 -0
  150. data/vendor/assets/javascripts/locomotive/bootstrap-colorpicker.js +1 -0
  151. data/vendor/assets/javascripts/locomotive/datepicker_i18n.js.erb +6 -6
  152. data/vendor/assets/javascripts/locomotive/kramed.min.js +11 -0
  153. data/vendor/assets/stylesheets/locomotive/bootstrap-colorpicker.scss +9 -0
  154. metadata +59 -44
  155. data/app/controllers/locomotive/api/accounts_controller.rb +0 -60
  156. data/app/controllers/locomotive/api/base_controller.rb +0 -35
  157. data/app/controllers/locomotive/api/content_assets_controller.rb +0 -51
  158. data/app/controllers/locomotive/api/content_entries_controller.rb +0 -71
  159. data/app/controllers/locomotive/api/content_types_controller.rb +0 -52
  160. data/app/controllers/locomotive/api/current_site_controller.rb +0 -34
  161. data/app/controllers/locomotive/api/memberships_controller.rb +0 -52
  162. data/app/controllers/locomotive/api/my_account_controller.rb +0 -46
  163. data/app/controllers/locomotive/api/pages_controller.rb +0 -53
  164. data/app/controllers/locomotive/api/sites_controller.rb +0 -58
  165. data/app/controllers/locomotive/api/snippets_controller.rb +0 -52
  166. data/app/controllers/locomotive/api/theme_assets_controller.rb +0 -51
  167. data/app/controllers/locomotive/api/tokens_controller.rb +0 -36
  168. data/app/controllers/locomotive/api/translations_controller.rb +0 -51
  169. data/app/controllers/locomotive/api/version_controller.rb +0 -11
  170. data/spec/models/locomotive/editable_control_spec.rb +0 -79
  171. data/spec/models/locomotive/editable_file_spec.rb +0 -94
  172. data/spec/models/locomotive/editable_text_spec.rb +0 -219
  173. data/vendor/assets/images/select2-spinner.gif +0 -0
  174. data/vendor/assets/images/select2.png +0 -0
  175. 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
@@ -6,7 +6,7 @@
6
6
 
7
7
  = hidden_field_tag :active_tab, ''
8
8
 
9
- = f.action 'hide'
9
+ = f.action class: 'hide'
10
10
 
11
11
  = render 'locomotive/current_site/form/tabs', f: f
12
12
 
@@ -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
@@ -5,6 +5,8 @@
5
5
 
6
6
  = f.input :robots_txt, as: :code, wrapper_html: { class: 'small' }
7
7
 
8
+ = f.input :cache_enabled, as: :toggle
9
+
8
10
  - if policy(@site).destroy?
9
11
  = f.actions do
10
12
  .row
@@ -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
- ul.activity-feed
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
- p
13
- = account_avatar_and_name(activity.actor, size = '70x70#')
14
- | &nbsp;
15
- | &middot;
16
- | &nbsp;
17
- span.time= activity.created_at.to_s(:humanized_ago)
18
- | &nbsp;
19
- | &middot;
20
- | &nbsp;
21
- span.sentence= render_activity_sentence(activity)
7
+ hr
22
8
 
23
- - if info = render_activity_additional_information(activity)
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: @resource.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
  | &nbsp;
27
27
  = f.action
28
28
 
29
- - unless @editable_elements.empty?
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.format == 'html' ? :rte : :text, input_html: { rows: editable_element.rows })
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
- - title t('.title', title: @page.title, fullpath: @page.fullpath)
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
- .col-md-12
22
- fieldset.inputs.info-row
23
- .form-group.input.select.optional.inline
24
- label.select.optional.control-label for='page_block'
25
- = t(:region, scope: 'simple_form.labels.locomotive.editable_element')
26
- span.form-wrapper
27
- = select_tag 'block', options_for_page_blocks(@editable_elements_by_block)
28
-
29
- .col-md-12
30
- = render 'form', f: f
31
-
32
- = f.actions do
33
- = f.action
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 TEST
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
 
@@ -19,3 +19,5 @@ html xmlns='http://www.w3.org/1999/xhtml'
19
19
  .container-fluid
20
20
  .main
21
21
  = yield
22
+
23
+ = yield :foot
@@ -10,6 +10,6 @@
10
10
  = f.actions do
11
11
  .row
12
12
  .col-md-6.text-left
13
- = link_to escape_once('&larr;&nbsp;') + t('.back'), edit_current_site_path(current_site)
13
+ = link_to "&larr;&nbsp;#{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 escape_once('&larr;&nbsp;') + t('.back'), edit_current_site_path(current_site)
13
+ = link_to ('&larr;&nbsp;' + 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
- = locomotive_form_for @account, url: my_account_path, html: { multipart: true }, defaults: { placeholder: false } do |f|
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
- = hidden_field_tag :active_tab, ''
10
+ = hidden_field_tag :active_tab, ''
9
11
 
10
- = f.action 'hide'
12
+ = f.action class: 'hide'
11
13
 
12
- = render 'locomotive/my_account/form/tabs', f: f
14
+ = render 'locomotive/my_account/form/tabs', f: f
13
15
 
14
- = render 'locomotive/my_account/form/panes', f: f
16
+ = render 'locomotive/my_account/form/panes', f: f
@@ -0,0 +1,7 @@
1
+ - title t(:title, title: @page.title, fullpath: preview_page_path(@page), scope: 'locomotive.pages.edit')
2
+
3
+ = help t('.help', default: '')
4
+
5
+ - if current_site.localized?
6
+ - content_for :actions do
7
+ = locale_picker_link
@@ -1,13 +1,11 @@
1
- - title t('.title', title: @page.title, fullpath: @page.fullpath)
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
- - unless @page.not_found? || @page.templatized?
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.templatized? || @page.redirect?
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
- = form_nav_tab :seo do
10
- = link_to t('simple_form.titles.locomotive.seo'), '#seo', role: 'tab', data: { toggle: 'tab' }
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' }
@@ -12,7 +12,7 @@
12
12
  .text
13
13
  = account.name
14
14
 
15
- small= "<# account.email >"
15
+ small= "<#{account.email}>"
16
16
 
17
17
  .buttons
18
18
  = link_to '#', class: 'delete' do
@@ -12,5 +12,5 @@
12
12
 
13
13
  = f.actions back_url: content_entries_path(current_site, @content_type.slug)
14
14
 
15
- = f.action 'hide'
15
+ = f.action class: 'hide'
16
16
 
@@ -1,30 +1,33 @@
1
- nav.navbar.navbar-default role='navigation'
1
+ .header
2
+ nav.navbar.navbar-default role='navigation'
2
3
 
3
- .container-fluid
4
+ .container-fluid
4
5
 
5
- .navbar-header
6
+ .navbar-header
6
7
 
7
- button type='button' class='navbar-toggle'
8
- span.sr-only Toggle navigation
9
- .icon-bar
10
- .icon-bar
11
- .icon-bar
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
- .navbar-brand.hidden-xs
14
- = render 'locomotive/shared/header/brand'
14
+ .navbar-brand.hidden-xs
15
+ = render 'locomotive/shared/header/brand'
15
16
 
16
- ul.nav.navbar-nav.navbar-site.visible-xs
17
- li
18
- = render 'locomotive/shared/header/site'
17
+ ul.nav.navbar-nav.navbar-site.visible-xs
18
+ li
19
+ = render 'locomotive/shared/header/site'
19
20
 
20
- .navbar-collapse#account-menu-collapse.hidden-xs
21
- ul.nav.navbar-nav.navbar-site
22
- li
23
- = render 'locomotive/shared/header/site'
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
- ul.nav.navbar-nav.navbar-right.account-menu-wrapper
26
- li.dropdown
27
- = render 'locomotive/shared/header/account'
26
+ ul.nav.navbar-nav.navbar-right.account-menu-wrapper
27
+ li.dropdown
28
+ = render 'locomotive/shared/header/account'
28
29
 
29
- ul.dropdown-menu role='menu'
30
- = render 'locomotive/shared/header/account_menu'
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
+ | &nbsp;
5
+ | &nbsp;
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
  | &nbsp;
13
+ | &nbsp;
11
14
  = t(locale, scope: 'locomotive.locales')