alchemy_cms 6.1.10 → 7.0.0.pre.a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +0 -3
  3. data/.gitignore +1 -6
  4. data/CHANGELOG.md +19 -44
  5. data/Gemfile +1 -1
  6. data/Rakefile +14 -9
  7. data/alchemy_cms.gemspec +2 -3
  8. data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +1 -1
  9. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +18 -32
  10. data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +2 -2
  11. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +2 -2
  12. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +27 -29
  13. data/app/assets/stylesheets/alchemy/elements.scss +16 -35
  14. data/app/assets/stylesheets/alchemy/forms.scss +0 -4
  15. data/app/assets/stylesheets/alchemy/node-select.scss +2 -2
  16. data/app/controllers/alchemy/admin/attachments_controller.rb +0 -1
  17. data/app/controllers/alchemy/admin/elements_controller.rb +7 -32
  18. data/app/controllers/alchemy/admin/pages_controller.rb +1 -1
  19. data/app/controllers/alchemy/admin/pictures_controller.rb +1 -1
  20. data/app/controllers/alchemy/admin/resources_controller.rb +1 -18
  21. data/app/controllers/alchemy/api/elements_controller.rb +0 -2
  22. data/app/controllers/alchemy/api/pages_controller.rb +8 -4
  23. data/app/controllers/alchemy/messages_controller.rb +9 -9
  24. data/app/controllers/alchemy/pages_controller.rb +23 -18
  25. data/app/decorators/alchemy/element_editor.rb +10 -30
  26. data/app/helpers/alchemy/admin/elements_helper.rb +0 -2
  27. data/app/helpers/alchemy/elements_block_helper.rb +5 -42
  28. data/app/helpers/alchemy/elements_helper.rb +3 -11
  29. data/app/helpers/alchemy/pages_helper.rb +0 -4
  30. data/app/models/alchemy/attachment.rb +6 -3
  31. data/app/models/alchemy/base_record.rb +2 -0
  32. data/app/models/alchemy/eager_loading.rb +0 -1
  33. data/app/models/alchemy/element/element_ingredients.rb +1 -8
  34. data/app/models/alchemy/element/presenters.rb +9 -25
  35. data/app/models/alchemy/element.rb +2 -18
  36. data/app/models/alchemy/ingredient.rb +17 -6
  37. data/app/models/alchemy/ingredients/audio.rb +2 -0
  38. data/app/models/alchemy/ingredients/datetime.rb +3 -1
  39. data/app/models/alchemy/ingredients/file.rb +7 -0
  40. data/app/models/alchemy/ingredients/headline.rb +6 -0
  41. data/app/models/alchemy/ingredients/link.rb +2 -0
  42. data/app/models/alchemy/ingredients/node.rb +2 -0
  43. data/app/models/alchemy/ingredients/page.rb +2 -0
  44. data/app/models/alchemy/ingredients/picture.rb +11 -0
  45. data/app/models/alchemy/ingredients/richtext.rb +6 -0
  46. data/app/models/alchemy/ingredients/select.rb +1 -0
  47. data/app/models/alchemy/ingredients/text.rb +8 -0
  48. data/app/models/alchemy/ingredients/video.rb +2 -0
  49. data/app/models/alchemy/node.rb +9 -6
  50. data/app/models/alchemy/page/page_elements.rb +5 -26
  51. data/app/models/alchemy/page/page_layouts.rb +0 -14
  52. data/app/models/alchemy/page/page_natures.rb +0 -10
  53. data/app/models/alchemy/page.rb +0 -10
  54. data/app/models/alchemy/picture/transformations.rb +0 -30
  55. data/app/models/alchemy/picture/url.rb +1 -1
  56. data/app/models/alchemy/picture.rb +14 -13
  57. data/app/models/alchemy/picture_thumb/create.rb +7 -18
  58. data/app/models/alchemy/picture_thumb/file_store.rb +33 -0
  59. data/app/models/alchemy/picture_thumb.rb +10 -10
  60. data/app/models/concerns/alchemy/picture_thumbnails.rb +2 -6
  61. data/app/serializers/alchemy/element_serializer.rb +1 -6
  62. data/app/services/alchemy/delete_elements.rb +1 -7
  63. data/app/services/alchemy/duplicate_element.rb +1 -6
  64. data/app/views/alchemy/admin/elements/_element.html.erb +5 -22
  65. data/app/views/alchemy/admin/elements/create.js.erb +1 -1
  66. data/app/views/alchemy/admin/elements/fold.js.erb +2 -2
  67. data/app/views/alchemy/admin/elements/order.js.erb +1 -1
  68. data/app/views/alchemy/admin/elements/update.js.erb +1 -2
  69. data/app/views/alchemy/admin/pages/_external_link.html.erb +2 -2
  70. data/app/views/alchemy/admin/pages/_file_link.html.erb +2 -2
  71. data/app/views/alchemy/admin/pages/_internal_link.html.erb +2 -2
  72. data/app/views/alchemy/admin/pages/_table.html.erb +0 -6
  73. data/app/views/alchemy/admin/pages/_tinymce_custom_config.html.erb +3 -6
  74. data/app/views/alchemy/admin/pages/edit.html.erb +1 -1
  75. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +1 -3
  76. data/app/views/alchemy/admin/pictures/_infos.html.erb +4 -6
  77. data/app/views/alchemy/admin/resources/_per_page_select.html.erb +1 -1
  78. data/app/views/alchemy/ingredients/_boolean_editor.html.erb +1 -1
  79. data/app/views/alchemy/ingredients/_headline_editor.html.erb +1 -1
  80. data/app/views/alchemy/ingredients/_html_editor.html.erb +1 -1
  81. data/app/views/alchemy/ingredients/_node_editor.html.erb +1 -1
  82. data/app/views/alchemy/ingredients/_picture_editor.html.erb +4 -4
  83. data/app/views/alchemy/ingredients/_select_editor.html.erb +2 -2
  84. data/app/views/alchemy/ingredients/_text_editor.html.erb +1 -1
  85. data/app/views/alchemy/ingredients/shared/_link_tools.html.erb +3 -3
  86. data/app/views/alchemy/pages/_meta_data.html.erb +0 -1
  87. data/app/views/layouts/alchemy/admin.html.erb +5 -1
  88. data/config/alchemy/config.yml +6 -6
  89. data/config/brakeman.ignore +56 -57
  90. data/config/locales/alchemy.en.yml +99 -113
  91. data/config/routes.rb +1 -16
  92. data/db/migrate/20230121212637_alchemy_six_point_one.rb +248 -0
  93. data/lib/alchemy/cache_digests/template_tracker.rb +6 -7
  94. data/lib/alchemy/config.rb +2 -2
  95. data/lib/alchemy/deprecation.rb +1 -1
  96. data/lib/alchemy/errors.rb +0 -11
  97. data/lib/alchemy/hints.rb +10 -10
  98. data/lib/alchemy/permissions.rb +4 -17
  99. data/lib/alchemy/routing_constraints.rb +3 -3
  100. data/lib/alchemy/searchable_resource.rb +38 -0
  101. data/lib/alchemy/seeder.rb +2 -8
  102. data/lib/alchemy/tasks/tidy.rb +0 -38
  103. data/lib/alchemy/test_support/capybara_helpers.rb +69 -0
  104. data/lib/alchemy/test_support/factories/element_factory.rb +0 -6
  105. data/lib/alchemy/test_support/factories/ingredient_factory.rb +1 -1
  106. data/lib/alchemy/test_support/factories/page_factory.rb +4 -2
  107. data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +0 -20
  108. data/lib/alchemy/test_support/shared_dom_ids_examples.rb +1 -1
  109. data/lib/alchemy/test_support/shared_ingredient_examples.rb +1 -1
  110. data/lib/alchemy/tinymce.rb +1 -18
  111. data/lib/alchemy/upgrader/seven_point_zero.rb +45 -0
  112. data/lib/alchemy/upgrader/tasks/.keep +0 -0
  113. data/lib/alchemy/upgrader.rb +8 -3
  114. data/lib/alchemy/version.rb +1 -1
  115. data/lib/alchemy.rb +0 -19
  116. data/lib/alchemy_cms.rb +1 -2
  117. data/lib/generators/alchemy/elements/elements_generator.rb +0 -1
  118. data/lib/generators/alchemy/elements/templates/view.html.erb +1 -10
  119. data/lib/generators/alchemy/elements/templates/view.html.haml +1 -9
  120. data/lib/generators/alchemy/elements/templates/view.html.slim +1 -9
  121. data/lib/generators/alchemy/install/files/alchemy.en.yml +7 -8
  122. data/lib/generators/alchemy/install/files/application.html.erb +1 -1
  123. data/lib/generators/alchemy/install/install_generator.rb +18 -34
  124. data/lib/generators/alchemy/install/templates/elements.yml.tt +12 -12
  125. data/lib/non_stupid_digest_assets.rb +1 -1
  126. data/lib/tasks/alchemy/thumbnails.rake +2 -21
  127. data/lib/tasks/alchemy/tidy.rake +1 -12
  128. data/lib/tasks/alchemy/upgrade.rake +10 -47
  129. data/package/dist/admin.js +16 -0
  130. data/package/dist/admin.js.map +7 -0
  131. data/package.json +5 -3
  132. metadata +18 -147
  133. data/app/controllers/alchemy/admin/contents_controller.rb +0 -21
  134. data/app/controllers/alchemy/admin/essence_audios_controller.rb +0 -30
  135. data/app/controllers/alchemy/admin/essence_files_controller.rb +0 -31
  136. data/app/controllers/alchemy/admin/essence_pictures_controller.rb +0 -43
  137. data/app/controllers/alchemy/admin/essence_videos_controller.rb +0 -34
  138. data/app/controllers/alchemy/api/contents_controller.rb +0 -52
  139. data/app/decorators/alchemy/content_editor.rb +0 -119
  140. data/app/helpers/alchemy/admin/contents_helper.rb +0 -42
  141. data/app/helpers/alchemy/admin/essences_helper.rb +0 -31
  142. data/app/models/alchemy/content/factory.rb +0 -143
  143. data/app/models/alchemy/content.rb +0 -247
  144. data/app/models/alchemy/element/element_contents.rb +0 -200
  145. data/app/models/alchemy/element/element_essences.rb +0 -133
  146. data/app/models/alchemy/essence_audio.rb +0 -13
  147. data/app/models/alchemy/essence_boolean.rb +0 -20
  148. data/app/models/alchemy/essence_date.rb +0 -25
  149. data/app/models/alchemy/essence_file.rb +0 -49
  150. data/app/models/alchemy/essence_headline.rb +0 -41
  151. data/app/models/alchemy/essence_html.rb +0 -23
  152. data/app/models/alchemy/essence_link.rb +0 -21
  153. data/app/models/alchemy/essence_node.rb +0 -19
  154. data/app/models/alchemy/essence_page.rb +0 -17
  155. data/app/models/alchemy/essence_picture.rb +0 -67
  156. data/app/models/alchemy/essence_picture_view.rb +0 -90
  157. data/app/models/alchemy/essence_richtext.rb +0 -44
  158. data/app/models/alchemy/essence_select.rb +0 -19
  159. data/app/models/alchemy/essence_text.rb +0 -23
  160. data/app/models/alchemy/essence_video.rb +0 -13
  161. data/app/serializers/alchemy/content_serializer.rb +0 -17
  162. data/app/serializers/alchemy/essence_boolean_serializer.rb +0 -10
  163. data/app/serializers/alchemy/essence_date_serializer.rb +0 -10
  164. data/app/serializers/alchemy/essence_file_serializer.rb +0 -13
  165. data/app/serializers/alchemy/essence_html_serializer.rb +0 -10
  166. data/app/serializers/alchemy/essence_link_serializer.rb +0 -13
  167. data/app/serializers/alchemy/essence_picture_serializer.rb +0 -28
  168. data/app/serializers/alchemy/essence_richtext_serializer.rb +0 -11
  169. data/app/serializers/alchemy/essence_select_serializer.rb +0 -10
  170. data/app/serializers/alchemy/essence_text_serializer.rb +0 -22
  171. data/app/views/alchemy/admin/contents/create.js.erb +0 -21
  172. data/app/views/alchemy/admin/essence_audios/edit.html.erb +0 -7
  173. data/app/views/alchemy/admin/essence_files/edit.html.erb +0 -21
  174. data/app/views/alchemy/admin/essence_pictures/destroy.js.erb +0 -5
  175. data/app/views/alchemy/admin/essence_pictures/edit.html.erb +0 -30
  176. data/app/views/alchemy/admin/essence_pictures/save_link.js.erb +0 -3
  177. data/app/views/alchemy/admin/essence_pictures/update.js.erb +0 -8
  178. data/app/views/alchemy/admin/essence_videos/edit.html.erb +0 -12
  179. data/app/views/alchemy/essences/_essence_audio_editor.html.erb +0 -4
  180. data/app/views/alchemy/essences/_essence_audio_view.html.erb +0 -15
  181. data/app/views/alchemy/essences/_essence_boolean_editor.html.erb +0 -11
  182. data/app/views/alchemy/essences/_essence_boolean_view.html.erb +0 -2
  183. data/app/views/alchemy/essences/_essence_date_editor.html.erb +0 -16
  184. data/app/views/alchemy/essences/_essence_date_view.html.erb +0 -10
  185. data/app/views/alchemy/essences/_essence_file_editor.html.erb +0 -54
  186. data/app/views/alchemy/essences/_essence_file_view.html.erb +0 -18
  187. data/app/views/alchemy/essences/_essence_headline_editor.html.erb +0 -36
  188. data/app/views/alchemy/essences/_essence_headline_view.html.erb +0 -10
  189. data/app/views/alchemy/essences/_essence_html_editor.html.erb +0 -10
  190. data/app/views/alchemy/essences/_essence_html_view.html.erb +0 -2
  191. data/app/views/alchemy/essences/_essence_link_editor.html.erb +0 -30
  192. data/app/views/alchemy/essences/_essence_link_view.html.erb +0 -10
  193. data/app/views/alchemy/essences/_essence_node_editor.html.erb +0 -27
  194. data/app/views/alchemy/essences/_essence_node_view.html.erb +0 -1
  195. data/app/views/alchemy/essences/_essence_page_editor.html.erb +0 -26
  196. data/app/views/alchemy/essences/_essence_page_view.html.erb +0 -5
  197. data/app/views/alchemy/essences/_essence_picture_editor.html.erb +0 -59
  198. data/app/views/alchemy/essences/_essence_picture_view.html.erb +0 -6
  199. data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +0 -14
  200. data/app/views/alchemy/essences/_essence_richtext_view.html.erb +0 -4
  201. data/app/views/alchemy/essences/_essence_select_editor.html.erb +0 -28
  202. data/app/views/alchemy/essences/_essence_select_view.html.erb +0 -2
  203. data/app/views/alchemy/essences/_essence_text_editor.html.erb +0 -29
  204. data/app/views/alchemy/essences/_essence_text_view.html.erb +0 -17
  205. data/app/views/alchemy/essences/_essence_video_editor.html.erb +0 -4
  206. data/app/views/alchemy/essences/_essence_video_view.html.erb +0 -19
  207. data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +0 -59
  208. data/app/views/alchemy/essences/shared/_linkable_essence_tools.html.erb +0 -20
  209. data/app/views/alchemy/pages/show.rss.builder +0 -21
  210. data/db/migrate/20200226213334_alchemy_four_point_four.rb +0 -313
  211. data/db/migrate/20200423073425_create_alchemy_essence_nodes.rb +0 -11
  212. data/db/migrate/20200504210159_remove_site_id_from_nodes.rb +0 -28
  213. data/db/migrate/20200505215518_add_language_id_foreign_key_to_alchemy_pages.rb +0 -8
  214. data/db/migrate/20200511113603_add_menu_type_to_alchemy_nodes.rb +0 -27
  215. data/db/migrate/20200514091507_make_page_layoutpage_null_false.rb +0 -6
  216. data/db/migrate/20200519073500_remove_visible_from_alchemy_pages.rb +0 -24
  217. data/db/migrate/20200617110713_create_alchemy_picture_thumbs.rb +0 -22
  218. data/db/migrate/20200907111332_remove_tri_state_booleans.rb +0 -33
  219. data/db/migrate/20201207131309_create_page_versions.rb +0 -19
  220. data/db/migrate/20201207135820_add_page_version_id_to_alchemy_elements.rb +0 -76
  221. data/db/migrate/20210205143548_rename_public_on_and_public_until_on_alchemy_pages.rb +0 -10
  222. data/db/migrate/20210326105046_add_sanitized_body_to_alchemy_essence_richtexts.rb +0 -7
  223. data/db/migrate/20210406093436_add_alchemy_essence_headlines.rb +0 -12
  224. data/db/migrate/20210506135919_create_essence_audios.rb +0 -19
  225. data/db/migrate/20210506140258_create_essence_videos.rb +0 -23
  226. data/db/migrate/20210508091432_create_alchemy_ingredients.rb +0 -22
  227. data/db/migrate/20220514072456_restrict_on_delete_page_id_foreign_key_from_alchemy_nodes.rb +0 -13
  228. data/db/migrate/20220622130905_add_playsinline_to_alchemy_essence_videos.rb +0 -9
  229. data/lib/alchemy/essence.rb +0 -250
  230. data/lib/alchemy/tasks/usage.rb +0 -34
  231. data/lib/alchemy/test_support/essence_shared_examples.rb +0 -271
  232. data/lib/alchemy/test_support/factories/content_factory.rb +0 -20
  233. data/lib/alchemy/test_support/factories/essence_audio_factory.rb +0 -7
  234. data/lib/alchemy/test_support/factories/essence_file_factory.rb +0 -7
  235. data/lib/alchemy/test_support/factories/essence_page_factory.rb +0 -7
  236. data/lib/alchemy/test_support/factories/essence_picture_factory.rb +0 -11
  237. data/lib/alchemy/test_support/factories/essence_text_factory.rb +0 -7
  238. data/lib/alchemy/test_support/factories/essence_video_factory.rb +0 -7
  239. data/lib/alchemy/upgrader/five_point_zero.rb +0 -41
  240. data/lib/alchemy/upgrader/six_point_zero.rb +0 -21
  241. data/lib/alchemy/upgrader/tasks/add_page_versions.rb +0 -33
  242. data/lib/alchemy/upgrader/tasks/element_views_updater.rb +0 -34
  243. data/lib/alchemy/upgrader/tasks/harden_gutentag_migrations.rb +0 -29
  244. data/lib/alchemy/upgrader/tasks/ingredients_migrator.rb +0 -73
  245. data/lib/generators/alchemy/essence/essence_generator.rb +0 -49
  246. data/lib/generators/alchemy/essence/templates/editor.html.erb +0 -17
  247. data/lib/generators/alchemy/essence/templates/view.html.erb +0 -2
  248. data/lib/generators/alchemy/install/files/babel.config.js +0 -64
  249. data/lib/tasks/alchemy/usage.rake +0 -44
@@ -1,10 +0,0 @@
1
- <%= content_tag :div,
2
- id: essence_html_editor.dom_id,
3
- class: essence_html_editor.css_classes,
4
- data: essence_html_editor.data_attributes do %>
5
- <%= content_label(essence_html_editor) %>
6
- <%= text_area_tag(
7
- essence_html_editor.form_field_name,
8
- essence_html_editor.ingredient
9
- ) %>
10
- <% end %>
@@ -1,2 +0,0 @@
1
- <% content = local_assigns[:content] || local_assigns[:essence_html_view] %>
2
- <%= raw content.ingredient -%>
@@ -1,30 +0,0 @@
1
- <%= content_tag :div,
2
- id: essence_link_editor.dom_id,
3
- class: essence_link_editor.css_classes,
4
- data: essence_link_editor.data_attributes do %>
5
- <%= content_label(essence_link_editor) %>
6
- <%= text_field_tag '', essence_link_editor.ingredient,
7
- class: "thin_border text_with_icon disabled",
8
- name: nil,
9
- id: nil,
10
- disabled: true
11
- %>
12
- <%= hidden_field_tag essence_link_editor.form_field_name(:link),
13
- essence_link_editor.essence.link,
14
- "data-link-value": true %>
15
- <%= hidden_field_tag essence_link_editor.form_field_name(:link_title),
16
- essence_link_editor.essence.link_title,
17
- "data-link-title": true %>
18
- <%= hidden_field_tag essence_link_editor.form_field_name(:link_class_name),
19
- essence_link_editor.essence.link_class_name,
20
- "data-link-class": true %>
21
- <%= hidden_field_tag essence_link_editor.form_field_name(:link_target),
22
- essence_link_editor.essence.link_target,
23
- "data-link-target": true %>
24
- <%= render 'alchemy/essences/shared/linkable_essence_tools', content: essence_link_editor.content %>
25
- <% end %>
26
- <script type="text/javascript" charset="utf-8">
27
- $('#<%= essence_link_editor.form_field_id(:link) %>').on('change', function() {
28
- $('#<%= essence_link_editor.dom_id %> input.text_with_icon').val($(this).val());
29
- });
30
- </script>
@@ -1,10 +0,0 @@
1
- <% content = local_assigns[:content] || local_assigns[:essence_link_view] %>
2
- <%- if content.ingredient.present? -%>
3
- <%- html_options = {
4
- target: content.essence.link_target == "blank" ? "_blank" : nil
5
- }.merge(local_assigns.fetch(:html_options, {})) -%>
6
- <%= link_to(content.ingredient, html_options) do -%>
7
- <%= content.settings_value(:text, local_assigns.fetch(:options, {})) ||
8
- content.ingredient -%>
9
- <%- end -%>
10
- <%- end -%>
@@ -1,27 +0,0 @@
1
- <%= content_tag :div,
2
- id: essence_node_editor.dom_id,
3
- class: essence_node_editor.css_classes,
4
- data: essence_node_editor.data_attributes do %>
5
- <%= content_label(essence_node_editor) %>
6
- <%= text_field_tag(
7
- essence_node_editor.form_field_name("node_id"),
8
- essence_node_editor.essence.node_id,
9
- id: essence_node_editor.form_field_id,
10
- class: 'alchemy_selectbox full_width'
11
- ) %>
12
- <% end %>
13
-
14
- <script>
15
- <% query_params = essence_node_editor.settings.fetch(:query_params, {}).merge({
16
- include: :ancestors
17
- }) %>
18
- $('#<%= essence_node_editor.form_field_id %>').alchemyNodeSelect({
19
- placeholder: "<%= Alchemy.t(:search_node) %>",
20
- url: "<%= alchemy.api_nodes_path(language_id: essence_node_editor.page&.language_id) %>",
21
- query_params: <%== query_params.to_json %>,
22
- <% if essence_node_editor.essence.node %>
23
- <% serialized_node = ActiveModelSerializers::SerializableResource.new(essence_node_editor.essence.node, include: :ancestors) %>
24
- initialSelection: <%== serialized_node.to_json %>
25
- <% end %>
26
- })
27
- </script>
@@ -1 +0,0 @@
1
- <%= render content.ingredient if content.ingredient %>
@@ -1,26 +0,0 @@
1
- <%= content_tag :div,
2
- id: essence_page_editor.dom_id,
3
- class: essence_page_editor.css_classes,
4
- data: essence_page_editor.data_attributes do %>
5
- <%= content_label(essence_page_editor) %>
6
- <%= text_field_tag(
7
- essence_page_editor.form_field_name("page_id"),
8
- essence_page_editor.essence.page_id,
9
- id: essence_page_editor.form_field_id,
10
- class: 'alchemy_selectbox full_width'
11
- ) %>
12
- <% end %>
13
-
14
- <script>
15
- $('#<%= essence_page_editor.form_field_id %>').alchemyPageSelect({
16
- placeholder: "<%= Alchemy.t(:search_page) %>",
17
- url: "<%= alchemy.api_pages_path language_id: essence_page_editor.page&.language_id %>",
18
- query_params: <%== essence_page_editor.settings[:query_params].to_json %>,
19
- <% if essence_page_editor.essence.page %>
20
- initialSelection: {
21
- id: <%= essence_page_editor.essence.page_id %>,
22
- text: "<%= essence_page_editor.essence.page.name %>"
23
- }
24
- <% end %>
25
- })
26
- </script>
@@ -1,5 +0,0 @@
1
- <% content = local_assigns[:content] || local_assigns[:essence_page_view] %>
2
- <% page = content.ingredient %>
3
- <% if page %>
4
- <%= link_to page.name, alchemy.show_page_path(urlname: page.urlname) %>
5
- <% end %>
@@ -1,59 +0,0 @@
1
- <% options = local_assigns.fetch(:options, {}) %>
2
-
3
- <%= content_tag :div,
4
- id: essence_picture_editor.dom_id,
5
- class: essence_picture_editor.css_classes,
6
- data: essence_picture_editor.data_attributes do %>
7
- <%= content_label(essence_picture_editor) %>
8
- <%= content_tag :div,
9
- data: {
10
- target_size: essence_picture_editor.essence.content.settings[:size] || [
11
- essence_picture_editor.essence.image_file_width.to_i,
12
- essence_picture_editor.essence.image_file_height.to_i
13
- ].join("x"),
14
- image_cropper: essence_picture_editor.essence.thumbnail_url_options[:crop],
15
- },
16
- class: "picture_thumbnail" do %>
17
- <a class="picture_tool delete">
18
- <%= render_icon(:times) %>
19
- </a>
20
- <div class="picture_image">
21
- <div class="thumbnail_background">
22
- <%- if essence_picture_editor.ingredient -%>
23
- <%= essence_picture_thumbnail(essence_picture_editor) %>
24
- <% else %>
25
- <%= render_icon(:image, style: 'regular') %>
26
- <% end %>
27
- </div>
28
- </div>
29
- <%- if essence_picture_editor.essence.css_class.present? -%>
30
- <div class="essence_picture_css_class">
31
- <%= Alchemy.t("alchemy.essence_pictures.css_classes.#{essence_picture_editor.essence.css_class}",
32
- default: essence_picture_editor.essence.css_class.camelcase) %>
33
- </div>
34
- <%- end -%>
35
- <div class="edit_images_bottom">
36
- <%= render 'alchemy/essences/shared/essence_picture_tools', {
37
- essence_picture_editor: essence_picture_editor
38
- } %>
39
- </div>
40
- <% end %>
41
- <%= hidden_field_tag essence_picture_editor.form_field_name(:picture_id),
42
- essence_picture_editor.ingredient&.id, data: {
43
- picture_id: true,
44
- image_file_width: essence_picture_editor.ingredient&.image_file_width,
45
- image_file_height: essence_picture_editor.ingredient&.image_file_height
46
- } %>
47
- <%= hidden_field_tag essence_picture_editor.form_field_name(:link),
48
- essence_picture_editor.essence.link, data: { link_value: true }%>
49
- <%= hidden_field_tag essence_picture_editor.form_field_name(:link_title),
50
- essence_picture_editor.essence.link_title, data: { link_title: true } %>
51
- <%= hidden_field_tag essence_picture_editor.form_field_name(:link_class_name),
52
- essence_picture_editor.essence.link_class_name, data: { link_class: true } %>
53
- <%= hidden_field_tag essence_picture_editor.form_field_name(:link_target),
54
- essence_picture_editor.essence.link_target, data: { link_target: true } %>
55
- <%= hidden_field_tag essence_picture_editor.form_field_name(:crop_from),
56
- essence_picture_editor.essence.crop_from, data: { crop_from: true } %>
57
- <%= hidden_field_tag essence_picture_editor.form_field_name(:crop_size),
58
- essence_picture_editor.essence.crop_size, data: { crop_size: true } %>
59
- <% end %>
@@ -1,6 +0,0 @@
1
- <% content = local_assigns[:content] || local_assigns[:essence_picture_view] %>
2
- <%= Alchemy::EssencePictureView.new(
3
- content,
4
- local_assigns[:options] || {},
5
- local_assigns[:html_options] || {}
6
- ).render %>
@@ -1,14 +0,0 @@
1
- <%= content_tag :div,
2
- id: essence_richtext_editor.dom_id,
3
- class: essence_richtext_editor.css_classes,
4
- data: essence_richtext_editor.data_attributes do %>
5
- <%= content_label(essence_richtext_editor) %>
6
- <div class="tinymce_container">
7
- <%= text_area_tag(
8
- essence_richtext_editor.form_field_name,
9
- essence_richtext_editor.ingredient || '',
10
- class: essence_richtext_editor.tinymce_class_name,
11
- id: "tinymce_#{essence_richtext_editor.id}"
12
- ) %>
13
- </div>
14
- <% end %>
@@ -1,4 +0,0 @@
1
- <% content = local_assigns[:content] || local_assigns[:essence_richtext_view] %>
2
- <%- options = local_assigns.fetch(:options, {}) -%>
3
- <%- plain_text = !!content.settings_value(:plain_text, options) -%>
4
- <%= raw content.essence.public_send(plain_text ? :stripped_body : :body) -%>
@@ -1,28 +0,0 @@
1
- <% select_values = essence_select_editor.settings[:select_values] %>
2
-
3
- <%= content_tag :div,
4
- id: essence_select_editor.dom_id,
5
- class: [
6
- essence_select_editor.css_classes,
7
- essence_select_editor.settings[:display_inline] ? 'display_inline' : ''
8
- ], data: essence_select_editor.data_attributes do %>
9
- <%= content_label(essence_select_editor) %>
10
-
11
- <% if select_values.nil? %>
12
- <%= warning(':select_values is nil',
13
- "<strong>No select values given.</strong>
14
- <br>Please provide <code>select_values</code> on the
15
- content definition <code>settings</code> in
16
- <code>elements.yml</code>.") %>
17
- <% else %>
18
- <%
19
- if select_values.is_a?(Hash)
20
- options_tags = grouped_options_for_select(select_values, essence_select_editor.ingredient)
21
- else
22
- options_tags = options_for_select(select_values, essence_select_editor.ingredient)
23
- end %>
24
- <%= select_tag essence_select_editor.form_field_name, options_tags, {
25
- class: ["alchemy_selectbox", "essence_editor_select"]
26
- } %>
27
- <% end %>
28
- <% end %>
@@ -1,2 +0,0 @@
1
- <% content = local_assigns[:content] || local_assigns[:essence_select_view] %>
2
- <%= content.ingredient %>
@@ -1,29 +0,0 @@
1
- <%= content_tag :div,
2
- id: essence_text_editor.dom_id,
3
- class: [
4
- essence_text_editor.css_classes,
5
- essence_text_editor.settings[:display_inline] ? 'display_inline' : ''
6
- ], data: essence_text_editor.data_attributes do %>
7
- <%= content_label(essence_text_editor) %>
8
- <%= text_field_tag(
9
- essence_text_editor.form_field_name,
10
- essence_text_editor.ingredient,
11
- class: "thin_border #{essence_text_editor.settings[:linkable] ? ' text_with_icon' : ''}",
12
- type: essence_text_editor.settings[:input_type] || "text"
13
- ) %>
14
- <% if essence_text_editor.settings[:linkable] %>
15
- <%= hidden_field_tag essence_text_editor.form_field_name(:link),
16
- essence_text_editor.essence.link,
17
- "data-link-value": true %>
18
- <%= hidden_field_tag essence_text_editor.form_field_name(:link_title),
19
- essence_text_editor.essence.link_title,
20
- "data-link-title": true %>
21
- <%= hidden_field_tag essence_text_editor.form_field_name(:link_class_name),
22
- essence_text_editor.essence.link_class_name,
23
- "data-link-class": true %>
24
- <%= hidden_field_tag essence_text_editor.form_field_name(:link_target),
25
- essence_text_editor.essence.link_target,
26
- "data-link-target": true %>
27
- <%= render 'alchemy/essences/shared/linkable_essence_tools', content: essence_text_editor.content %>
28
- <% end %>
29
- <% end %>
@@ -1,17 +0,0 @@
1
- <% content = local_assigns[:content] || local_assigns[:essence_text_view] %>
2
- <%- options = local_assigns.fetch(:options, {}) -%>
3
- <%- html_options = local_assigns.fetch(:html_options, {}) -%>
4
- <%- if content.essence.link.blank? ||
5
- content.settings_value(:disable_link, options) -%>
6
- <%= content.ingredient -%>
7
- <%- else -%>
8
- <%= link_to(
9
- content.ingredient,
10
- url_for(content.essence.link),
11
- {
12
- title: content.essence.link_title,
13
- target: (content.essence.link_target == "blank" ? "_blank" : nil),
14
- 'data-link-target' => content.essence.link_target
15
- }.merge(html_options)
16
- ) -%>
17
- <%- end -%>
@@ -1,4 +0,0 @@
1
- <%= render(
2
- "alchemy/essences/essence_file_editor",
3
- essence_file_editor: essence_video_editor
4
- ) %>
@@ -1,19 +0,0 @@
1
- <% content = local_assigns[:content] || local_assigns[:essence_video_view] %>
2
- <%- if content.ingredient -%>
3
- <%= content_tag :video,
4
- controls: content.essence.controls,
5
- autoplay: content.essence.autoplay,
6
- loop: content.essence.loop,
7
- muted: content.essence.muted,
8
- playsinline: content.essence.playsinline,
9
- preload: content.essence.preload.presence,
10
- width: content.essence.width.presence,
11
- height: content.essence.height.presence do %>
12
- <%= tag :source,
13
- src: alchemy.show_attachment_path(
14
- content.ingredient,
15
- format: content.ingredient.suffix
16
- ),
17
- type: content.ingredient.file_mime_type %>
18
- <% end %>
19
- <%- end -%>
@@ -1,59 +0,0 @@
1
- <% content = essence_picture_editor.essence.content %>
2
- <% linkable = content.settings[:linkable] != false %>
3
- <% croppable = content.essence && content.essence.allow_image_cropping? %>
4
-
5
- <%= link_to_dialog render_icon(:crop),
6
- alchemy.crop_admin_essence_picture_path(content.essence, {
7
- crop_from_form_field_id: essence_picture_editor.form_field_id(:crop_from),
8
- crop_size_form_field_id: essence_picture_editor.form_field_id(:crop_size),
9
- picture_id: content.essence.picture_id
10
- }), {
11
- size: "1080x615",
12
- title: Alchemy.t('Edit Picturemask'),
13
- image_loader: false,
14
- padding: false
15
- }, {
16
- title: Alchemy.t('Edit Picturemask'),
17
- class: croppable ? "crop_link" : "disabled crop_link",
18
- tabindex: croppable ? nil : "-1",
19
- onclick: "return false"
20
- } %>
21
-
22
- <%= link_to_dialog render_icon('file-image', style: 'regular'),
23
- alchemy.admin_pictures_path(
24
- form_field_id: essence_picture_editor.form_field_id(:picture_id)
25
- ),
26
- {
27
- title: (content.ingredient ? Alchemy.t(:swap_image) : Alchemy.t(:insert_image)),
28
- size: '790x590',
29
- padding: false
30
- },
31
- title: (content.ingredient ? Alchemy.t(:swap_image) : Alchemy.t(:insert_image)) %>
32
-
33
- <%= link_to_if linkable, render_icon(:link), '', {
34
- onclick: 'new Alchemy.LinkDialog(this).open(); return false;',
35
- class: content.linked? ? 'linked' : nil,
36
- title: Alchemy.t(:link_image),
37
- "data-parent-selector": "##{content.dom_id}",
38
- id: "edit_link_#{content.id}"
39
- } do %>
40
- <span class="disabled" tabindex="-1"><%= render_icon(:link) %></span>
41
- <% end %>
42
-
43
- <%= link_to_if linkable, render_icon(:unlink), '', {
44
- onclick: "return Alchemy.LinkDialog.removeLink(this, '##{content.dom_id}')",
45
- class: content.linked? ? 'linked' : 'disabled',
46
- tabindex: content.linked? ? nil : '-1',
47
- title: Alchemy.t(:unlink)
48
- } do %>
49
- <span class="disabled" tabindex="-1"><%= render_icon(:unlink) %></span>
50
- <% end %>
51
-
52
- <%= link_to_dialog render_icon(:edit),
53
- alchemy.edit_admin_essence_picture_path(
54
- id: content.essence.id,
55
- content_id: content.id
56
- ), {
57
- title: Alchemy.t(:edit_image_properties),
58
- size: edit_picture_dialog_size(content)
59
- }, title: Alchemy.t(:edit_image_properties) %>
@@ -1,20 +0,0 @@
1
- <span class="linkable_essence_tools">
2
- <%= link_to(
3
- render_icon(:link),
4
- '#',
5
- onclick: 'new Alchemy.LinkDialog(this).open(); return false;',
6
- class: "icon_button#{content.linked? ? ' linked' : ''} link-essence",
7
- "data-parent-selector": "##{content.dom_id}",
8
- title: Alchemy.t(:place_link),
9
- id: "edit_link_#{content.id}"
10
- ) %>
11
- <%= link_to(
12
- render_icon(:unlink),
13
- '#',
14
- onclick: "return Alchemy.LinkDialog.removeLink(this, '##{content.dom_id}')",
15
- class: "icon_button unlink-essence #{content.linked? ? 'linked' : 'disabled'}",
16
- tabindex: content.linked? ? nil : '-1',
17
- 'data-content-id' => content.id,
18
- title: Alchemy.t(:unlink)
19
- ) %>
20
- </span>
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
- xml.instruct! :xml, version: "1.0"
3
- xml.rss version: "2.0" do
4
- xml.channel do
5
- xml.title @page.title
6
- xml.description @page.meta_description
7
- xml.link show_alchemy_page_url(@page)
8
-
9
- @page.feed_elements.each do |element|
10
- xml.item do
11
- xml.title element.content_for_rss_title.try(:ingredient)
12
- xml.description element.content_for_rss_description.try(:ingredient)
13
- if element.has_ingredient?("date")
14
- xml.pubDate element.ingredient("date").to_s(:rfc822)
15
- end
16
- xml.link show_alchemy_page_url(@page, anchor: "##{element.dom_id}")
17
- xml.guid show_alchemy_page_url(@page, anchor: "##{element.dom_id}")
18
- end
19
- end
20
- end
21
- end