alchemy_cms 7.4.5 → 8.0.0.a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of alchemy_cms might be problematic. Click here for more details.

Files changed (358) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +92 -0
  3. data/Gemfile +13 -6
  4. data/README.md +13 -5
  5. data/alchemy_cms.gemspec +14 -5
  6. data/app/assets/builds/alchemy/admin/page-select.css +1 -1
  7. data/app/assets/builds/alchemy/admin/print.css +1 -1
  8. data/app/assets/builds/alchemy/admin.css +2 -2
  9. data/app/assets/builds/alchemy/custom-properties.css +1 -1
  10. data/app/assets/builds/alchemy/welcome.css +1 -1
  11. data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css +1 -1
  12. data/app/assets/builds/tinymce/skins/ui/alchemy/content.min.css +1 -0
  13. data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css +1 -1
  14. data/app/assets/config/alchemy_manifest.js +0 -2
  15. data/app/assets/images/alchemy/icons-sprite.svg +1 -0
  16. data/app/components/alchemy/admin/resource/applied_filter.rb +29 -0
  17. data/app/components/alchemy/admin/resource/checkbox_filter.rb +36 -0
  18. data/app/components/alchemy/admin/resource/datepicker_filter.rb +42 -0
  19. data/app/components/alchemy/admin/resource/select_filter.rb +43 -0
  20. data/app/components/alchemy/admin/toolbar_button.rb +5 -2
  21. data/app/components/alchemy/ingredients/number_view.rb +18 -0
  22. data/app/controllers/alchemy/admin/attachments_controller.rb +8 -15
  23. data/app/controllers/alchemy/admin/clipboard_controller.rb +2 -6
  24. data/app/controllers/alchemy/admin/elements_controller.rb +1 -1
  25. data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
  26. data/app/controllers/alchemy/admin/pages_controller.rb +15 -15
  27. data/app/controllers/alchemy/admin/picture_descriptions_controller.rb +5 -1
  28. data/app/controllers/alchemy/admin/pictures_controller.rb +10 -5
  29. data/app/controllers/alchemy/admin/resources_controller.rb +16 -106
  30. data/app/controllers/alchemy/attachments_controller.rb +43 -14
  31. data/app/controllers/alchemy/messages_controller.rb +1 -1
  32. data/app/controllers/alchemy/pages_controller.rb +7 -2
  33. data/app/controllers/concerns/alchemy/admin/picture_descriptions_form_helper.rb +16 -0
  34. data/app/controllers/concerns/alchemy/admin/resource_filter.rb +92 -0
  35. data/app/decorators/alchemy/element_editor.rb +5 -48
  36. data/app/decorators/alchemy/ingredient_editor.rb +3 -53
  37. data/app/helpers/alchemy/admin/base_helper.rb +14 -84
  38. data/app/helpers/alchemy/admin/elements_helper.rb +4 -4
  39. data/app/helpers/alchemy/admin/pages_helper.rb +1 -1
  40. data/app/helpers/alchemy/base_helper.rb +0 -30
  41. data/app/helpers/alchemy/elements_block_helper.rb +0 -14
  42. data/app/helpers/alchemy/pages_helper.rb +1 -1
  43. data/{lib → app/helpers}/alchemy/resources_helper.rb +5 -45
  44. data/app/javascript/alchemy_admin/components/action.js +4 -0
  45. data/app/javascript/alchemy_admin/components/alchemy_html_element.js +3 -3
  46. data/app/javascript/alchemy_admin/components/datepicker.js +10 -2
  47. data/app/javascript/alchemy_admin/components/element_editor/delete_element_button.js +7 -7
  48. data/app/javascript/alchemy_admin/components/element_editor.js +1 -1
  49. data/app/javascript/alchemy_admin/components/growl.js +1 -0
  50. data/app/javascript/alchemy_admin/components/index.js +1 -0
  51. data/app/javascript/alchemy_admin/components/remote_select.js +4 -1
  52. data/app/javascript/alchemy_admin/components/tags_autocomplete.js +5 -1
  53. data/app/javascript/alchemy_admin/components/tinymce.js +4 -2
  54. data/app/javascript/alchemy_admin/components/update_check.js +42 -0
  55. data/app/javascript/alchemy_admin/components/uploader/file_upload.js +15 -8
  56. data/app/javascript/alchemy_admin/components/uploader/progress.js +12 -6
  57. data/app/javascript/alchemy_admin/components/uploader.js +4 -2
  58. data/app/javascript/alchemy_admin/confirm_dialog.js +27 -57
  59. data/app/javascript/alchemy_admin/dirty.js +3 -2
  60. data/app/javascript/alchemy_admin/i18n.js +15 -16
  61. data/app/javascript/alchemy_admin/initializer.js +1 -49
  62. data/app/javascript/alchemy_admin/utils/ajax.js +51 -44
  63. data/app/javascript/alchemy_admin.js +3 -8
  64. data/app/models/alchemy/admin/filters/base.rb +38 -0
  65. data/app/models/alchemy/admin/filters/checkbox.rb +24 -0
  66. data/app/models/alchemy/admin/filters/datepicker.rb +53 -0
  67. data/app/models/alchemy/admin/filters/select.rb +70 -0
  68. data/app/models/alchemy/admin/resource_name.rb +27 -0
  69. data/app/models/alchemy/attachment.rb +51 -34
  70. data/app/models/alchemy/base_record.rb +2 -0
  71. data/app/models/alchemy/element/definitions.rb +1 -1
  72. data/app/models/alchemy/element/element_ingredients.rb +6 -6
  73. data/app/models/alchemy/element/presenters.rb +3 -12
  74. data/app/models/alchemy/element.rb +9 -27
  75. data/app/models/alchemy/element_definition.rb +160 -0
  76. data/app/models/alchemy/ingredient.rb +10 -43
  77. data/app/models/alchemy/ingredient_definition.rb +134 -0
  78. data/app/models/alchemy/ingredient_validator.rb +7 -3
  79. data/app/models/alchemy/ingredients/number.rb +19 -0
  80. data/app/models/alchemy/language.rb +0 -14
  81. data/app/models/alchemy/message.rb +3 -7
  82. data/app/models/alchemy/node.rb +1 -1
  83. data/app/models/alchemy/page/{page_layouts.rb → definitions.rb} +12 -19
  84. data/app/models/alchemy/page/fixed_attributes.rb +1 -1
  85. data/app/models/alchemy/page/page_elements.rb +13 -14
  86. data/app/models/alchemy/page/page_natures.rb +7 -7
  87. data/app/models/alchemy/page/page_scopes.rb +1 -1
  88. data/app/models/alchemy/page.rb +11 -33
  89. data/app/models/alchemy/page_definition.rb +115 -0
  90. data/app/models/alchemy/picture.rb +69 -79
  91. data/app/models/alchemy/picture_variant.rb +115 -5
  92. data/{lib → app/models}/alchemy/resource.rb +4 -18
  93. data/{lib → app/models}/alchemy/searchable_resource.rb +15 -0
  94. data/app/models/alchemy/site/layout.rb +5 -5
  95. data/app/models/alchemy/site.rb +0 -15
  96. data/app/models/alchemy/storage_adapter/active_storage/attachment_url.rb +41 -0
  97. data/app/models/alchemy/storage_adapter/active_storage/picture_url.rb +55 -0
  98. data/app/models/alchemy/storage_adapter/active_storage/preprocessor.rb +40 -0
  99. data/app/models/alchemy/storage_adapter/active_storage.rb +173 -0
  100. data/app/models/alchemy/{attachment/url.rb → storage_adapter/dragonfly/attachment_url.rb} +12 -12
  101. data/app/models/alchemy/{picture/url.rb → storage_adapter/dragonfly/picture_url.rb} +28 -12
  102. data/app/models/alchemy/{picture → storage_adapter/dragonfly}/preprocessor.rb +4 -4
  103. data/app/models/alchemy/storage_adapter/dragonfly.rb +183 -0
  104. data/app/models/alchemy/storage_adapter.rb +74 -0
  105. data/app/models/concerns/alchemy/picture_thumbnails.rb +19 -6
  106. data/app/serializers/alchemy/element_serializer.rb +0 -1
  107. data/app/services/alchemy/dragonfly_to_image_processing.rb +100 -0
  108. data/app/stylesheets/alchemy/_defaults.scss +3 -0
  109. data/app/stylesheets/alchemy/_extends.scss +69 -0
  110. data/app/{assets/stylesheets → stylesheets}/alchemy/_mixins.scss +36 -49
  111. data/app/stylesheets/alchemy/_variables.scss +5 -0
  112. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/archive.scss +20 -37
  113. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/base.scss +16 -14
  114. data/app/stylesheets/alchemy/admin/buttons.scss +160 -0
  115. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/clipboard.scss +2 -2
  116. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/dashboard.scss +13 -16
  117. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/dialogs.scss +23 -16
  118. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/elements.scss +150 -105
  119. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/errors.scss +5 -5
  120. data/app/stylesheets/alchemy/admin/filters.scss +58 -0
  121. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flatpickr.scss +53 -60
  122. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/form_fields.scss +21 -7
  123. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/forms.scss +31 -19
  124. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/frame.scss +20 -16
  125. data/app/stylesheets/alchemy/admin/hints.scss +5 -0
  126. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/icons.scss +10 -1
  127. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/image_library.scss +10 -8
  128. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/images.scss +1 -1
  129. data/app/stylesheets/alchemy/admin/labels.scss +5 -0
  130. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/lists.scss +3 -3
  131. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/navigation.scss +61 -55
  132. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/nodes.scss +21 -18
  133. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/notices.scss +18 -18
  134. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/page-select.scss +2 -2
  135. data/app/stylesheets/alchemy/admin/pagination.scss +144 -0
  136. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/preview_window.scss +8 -6
  137. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/print.scss +1 -1
  138. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/resource_info.scss +8 -5
  139. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/search.scss +9 -6
  140. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/selects.scss +49 -37
  141. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/shoelace.scss +5 -6
  142. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/sitemap.scss +38 -33
  143. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/tables.scss +6 -4
  144. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/tags.scss +6 -4
  145. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/toolbar.scss +12 -6
  146. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/typography.scss +2 -2
  147. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/upload.scss +7 -5
  148. data/app/stylesheets/alchemy/admin.scss +44 -0
  149. data/app/stylesheets/alchemy/custom-properties.css +244 -0
  150. data/app/stylesheets/alchemy/welcome.scss +75 -0
  151. data/app/{assets/stylesheets → stylesheets}/tinymce/skins/content/alchemy/content.scss +8 -9
  152. data/app/stylesheets/tinymce/skins/ui/alchemy/content.scss +1 -0
  153. data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/skin.scss +133 -136
  154. data/app/views/alchemy/admin/attachments/_files_list.html.erb +2 -2
  155. data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +1 -1
  156. data/app/views/alchemy/admin/{elements/_clipboard_button.html.erb → clipboard/_button.html.erb} +3 -5
  157. data/app/views/alchemy/admin/clipboard/_update_nested_element_button.turbo_stream.erb +11 -0
  158. data/app/views/alchemy/admin/clipboard/clear.turbo_stream.erb +4 -0
  159. data/app/views/alchemy/admin/clipboard/index.html.erb +15 -13
  160. data/app/views/alchemy/admin/clipboard/insert.turbo_stream.erb +18 -0
  161. data/app/views/alchemy/admin/clipboard/remove.turbo_stream.erb +9 -0
  162. data/app/views/alchemy/admin/dashboard/info.html.erb +17 -31
  163. data/app/views/alchemy/admin/elements/_element.html.erb +4 -8
  164. data/app/views/alchemy/admin/elements/_form.html.erb +1 -1
  165. data/app/views/alchemy/admin/elements/_header.html.erb +1 -0
  166. data/app/views/alchemy/admin/elements/_toolbar.html.erb +4 -6
  167. data/app/views/alchemy/admin/elements/create.turbo_stream.erb +2 -1
  168. data/app/views/alchemy/admin/elements/index.html.erb +2 -2
  169. data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +3 -16
  170. data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +0 -9
  171. data/app/views/alchemy/admin/languages/_form.html.erb +1 -1
  172. data/app/views/alchemy/admin/languages/_table.html.erb +1 -1
  173. data/app/views/alchemy/admin/languages/index.html.erb +5 -2
  174. data/app/views/alchemy/admin/layoutpages/index.html.erb +1 -12
  175. data/app/views/alchemy/admin/pages/_form.html.erb +2 -2
  176. data/app/views/alchemy/admin/pages/_page.html.erb +2 -3
  177. data/app/views/alchemy/admin/pages/_toolbar.html.erb +1 -15
  178. data/app/views/alchemy/admin/pages/index.html.erb +1 -1
  179. data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +9 -12
  180. data/app/views/alchemy/admin/partials/_search_form.html.erb +4 -9
  181. data/app/views/alchemy/admin/picture_descriptions/_form.html.erb +5 -7
  182. data/app/views/alchemy/admin/picture_descriptions/edit.html.erb +2 -2
  183. data/app/views/alchemy/admin/pictures/_archive.html.erb +4 -7
  184. data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +2 -1
  185. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +1 -1
  186. data/app/views/alchemy/admin/pictures/_form.html.erb +2 -2
  187. data/app/views/alchemy/admin/pictures/_picture_description_field.html.erb +21 -13
  188. data/app/views/alchemy/admin/pictures/index.html.erb +2 -7
  189. data/app/views/alchemy/admin/resources/_applied_filters.html.erb +8 -0
  190. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +11 -21
  191. data/app/views/alchemy/admin/resources/_pagination.html.erb +6 -0
  192. data/app/views/alchemy/admin/resources/_per_page_select.html.erb +4 -2
  193. data/app/views/alchemy/admin/resources/_resource_table.html.erb +1 -1
  194. data/app/views/alchemy/admin/resources/_table_header.html.erb +1 -15
  195. data/app/views/alchemy/admin/sites/index.html.erb +5 -1
  196. data/app/views/alchemy/admin/styleguide/index.html.erb +8 -0
  197. data/app/views/alchemy/admin/tags/index.html.erb +1 -1
  198. data/app/views/alchemy/admin/tinymce/_setup.html.erb +7 -7
  199. data/app/{javascript/alchemy_admin/locales/en.js → views/alchemy/admin/translations/_en.js} +5 -2
  200. data/app/views/alchemy/admin/uploader/_button.html.erb +1 -1
  201. data/app/views/alchemy/admin/uploader/_setup.html.erb +4 -4
  202. data/app/views/alchemy/base/500.turbo_stream.erb +3 -0
  203. data/app/views/alchemy/base/redirect.js.erb +1 -1
  204. data/app/views/alchemy/ingredients/_number_editor.html.erb +24 -0
  205. data/app/views/alchemy/no_index.html.erb +31 -0
  206. data/app/views/alchemy/welcome.html.erb +12 -10
  207. data/app/views/kaminari/alchemy/_first_page.html.erb +5 -3
  208. data/app/views/kaminari/alchemy/_last_page.html.erb +5 -3
  209. data/app/views/kaminari/alchemy/_next_page.html.erb +5 -3
  210. data/app/views/kaminari/alchemy/_paginator.html.erb +18 -13
  211. data/app/views/kaminari/alchemy/_prev_page.html.erb +5 -3
  212. data/app/views/layouts/alchemy/admin.html.erb +5 -9
  213. data/bun.lockb +0 -0
  214. data/bundles/remixicon.mjs +153 -0
  215. data/config/alchemy/config.yml +3 -2
  216. data/config/initializers/dragonfly.rb +0 -1
  217. data/config/initializers/mime_types.rb +1 -0
  218. data/config/locales/alchemy.en.yml +32 -14
  219. data/config/routes.rb +0 -2
  220. data/db/migrate/20250626160259_add_unique_index_to_picture_descriptions.rb +7 -0
  221. data/eslint.config.js +2 -1
  222. data/lib/alchemy/admin/preview_url.rb +4 -5
  223. data/lib/alchemy/cache_digests/template_tracker.rb +6 -9
  224. data/lib/alchemy/config_missing.rb +14 -0
  225. data/lib/alchemy/configuration/base_option.rb +24 -0
  226. data/lib/alchemy/configuration/boolean_option.rb +16 -0
  227. data/lib/alchemy/configuration/class_option.rb +15 -0
  228. data/lib/alchemy/configuration/class_set_option.rb +46 -0
  229. data/lib/alchemy/configuration/integer_list_option.rb +13 -0
  230. data/lib/alchemy/configuration/integer_option.rb +12 -0
  231. data/lib/alchemy/configuration/list_option.rb +22 -0
  232. data/lib/alchemy/configuration/regexp_option.rb +11 -0
  233. data/lib/alchemy/configuration/string_list_option.rb +13 -0
  234. data/lib/alchemy/configuration/string_option.rb +11 -0
  235. data/lib/alchemy/configuration.rb +115 -0
  236. data/lib/alchemy/configuration_methods.rb +3 -1
  237. data/lib/alchemy/configurations/default_language.rb +12 -0
  238. data/lib/alchemy/configurations/default_site.rb +10 -0
  239. data/lib/alchemy/configurations/format_matchers.rb +11 -0
  240. data/lib/alchemy/configurations/mailer.rb +16 -0
  241. data/lib/alchemy/configurations/main.rb +216 -0
  242. data/lib/alchemy/configurations/preview.rb +32 -0
  243. data/lib/alchemy/configurations/sitemap.rb +10 -0
  244. data/lib/alchemy/configurations/uploader.rb +34 -0
  245. data/lib/alchemy/engine.rb +65 -17
  246. data/lib/alchemy/hints.rb +3 -7
  247. data/lib/alchemy/on_page_layout.rb +2 -2
  248. data/lib/alchemy/propshaft/tinymce_asset.rb +15 -0
  249. data/lib/alchemy/seeder.rb +2 -2
  250. data/lib/alchemy/tasks/usage.rb +4 -4
  251. data/lib/alchemy/test_support/config_stubbing.rb +1 -7
  252. data/lib/alchemy/test_support/factories/attachment_factory.rb +13 -2
  253. data/lib/alchemy/test_support/factories/language_factory.rb +1 -1
  254. data/lib/alchemy/test_support/factories/page_factory.rb +2 -3
  255. data/lib/alchemy/test_support/factories/picture_factory.rb +30 -2
  256. data/lib/alchemy/test_support/factories/site_factory.rb +2 -2
  257. data/lib/alchemy/test_support/having_crop_action_examples.rb +2 -2
  258. data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +80 -26
  259. data/lib/alchemy/test_support/shared_ingredient_examples.rb +5 -5
  260. data/lib/alchemy/upgrader/.keep +0 -0
  261. data/lib/alchemy/upgrader/eight_zero.rb +14 -0
  262. data/lib/alchemy/upgrader.rb +33 -20
  263. data/lib/alchemy/version.rb +1 -1
  264. data/lib/alchemy.rb +192 -170
  265. data/lib/alchemy_cms.rb +1 -7
  266. data/lib/generators/alchemy/ingredient/ingredient_generator.rb +0 -3
  267. data/lib/generators/alchemy/install/files/_article.html.erb +6 -4
  268. data/lib/generators/alchemy/install/files/alchemy.en.yml +22 -3
  269. data/lib/generators/alchemy/install/files/application.html.erb +5 -0
  270. data/lib/generators/alchemy/install/install_generator.rb +5 -14
  271. data/lib/generators/alchemy/install/templates/alchemy.rb.tt +196 -0
  272. data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +0 -1
  273. data/lib/generators/alchemy/install/templates/elements.yml.tt +3 -1
  274. data/lib/generators/alchemy/install/templates/menus.yml.tt +1 -1
  275. data/lib/generators/alchemy/install/templates/page_layouts.yml.tt +2 -2
  276. data/lib/generators/alchemy/page_layouts/page_layouts_generator.rb +2 -2
  277. data/lib/tasks/alchemy/assets.rake +14 -0
  278. data/lib/tasks/alchemy/upgrade.rake +12 -47
  279. data/vendor/javascript/tinymce.min.js +1 -1
  280. data/vitest.config.js +21 -0
  281. metadata +184 -180
  282. data/app/assets/builds/alchemy/admin/page-select.css.map +0 -1
  283. data/app/assets/builds/alchemy/admin/print.css.map +0 -1
  284. data/app/assets/builds/alchemy/admin.css.map +0 -1
  285. data/app/assets/builds/alchemy/custom-properties.css.map +0 -1
  286. data/app/assets/builds/alchemy/welcome.css.map +0 -1
  287. data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css.map +0 -1
  288. data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css.map +0 -1
  289. data/app/assets/javascripts/alchemy/admin.js +0 -10
  290. data/app/assets/stylesheets/alchemy/_defaults.scss +0 -3
  291. data/app/assets/stylesheets/alchemy/_deprecated_variables.scss +0 -45
  292. data/app/assets/stylesheets/alchemy/_deprecation.scss +0 -17
  293. data/app/assets/stylesheets/alchemy/_extends.scss +0 -62
  294. data/app/assets/stylesheets/alchemy/_variables.scss +0 -201
  295. data/app/assets/stylesheets/alchemy/admin/buttons.scss +0 -124
  296. data/app/assets/stylesheets/alchemy/admin/hints.scss +0 -5
  297. data/app/assets/stylesheets/alchemy/admin/labels.scss +0 -3
  298. data/app/assets/stylesheets/alchemy/admin/pagination.scss +0 -92
  299. data/app/assets/stylesheets/alchemy/admin.scss +0 -42
  300. data/app/assets/stylesheets/alchemy/custom-properties.css +0 -98
  301. data/app/assets/stylesheets/alchemy/welcome.scss +0 -57
  302. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.css +0 -711
  303. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.css +0 -705
  304. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.min.css +0 -7
  305. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.min.css +0 -7
  306. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.css +0 -29
  307. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.min.css +0 -7
  308. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.css +0 -677
  309. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.min.css +0 -7
  310. data/app/controllers/alchemy/elements_controller.rb +0 -32
  311. data/app/models/alchemy/element/dom_id.rb +0 -31
  312. data/app/models/alchemy/picture/calculations.rb +0 -49
  313. data/app/models/alchemy/picture/transformations.rb +0 -115
  314. data/app/views/alchemy/admin/attachments/destroy.js.erb +0 -1
  315. data/app/views/alchemy/admin/clipboard/clear.js.erb +0 -3
  316. data/app/views/alchemy/admin/clipboard/insert.js.erb +0 -29
  317. data/app/views/alchemy/admin/clipboard/remove.js.erb +0 -10
  318. data/app/views/alchemy/admin/resources/_filter.html.erb +0 -12
  319. data/app/views/alchemy/admin/resources/_resource.html.erb +0 -34
  320. data/app/views/alchemy/admin/resources/_table.html.erb +0 -29
  321. data/app/views/alchemy/elements/show.html.erb +0 -1
  322. data/app/views/alchemy/elements/show.js.erb +0 -1
  323. data/app/views/alchemy/ingredients/_audio_view.html.erb +0 -1
  324. data/app/views/alchemy/ingredients/_boolean_view.html.erb +0 -1
  325. data/app/views/alchemy/ingredients/_datetime_view.html.erb +0 -3
  326. data/app/views/alchemy/ingredients/_file_view.html.erb +0 -4
  327. data/app/views/alchemy/ingredients/_headline_view.html.erb +0 -4
  328. data/app/views/alchemy/ingredients/_html_view.html.erb +0 -1
  329. data/app/views/alchemy/ingredients/_link_view.html.erb +0 -4
  330. data/app/views/alchemy/ingredients/_node_view.html.erb +0 -1
  331. data/app/views/alchemy/ingredients/_page_view.html.erb +0 -1
  332. data/app/views/alchemy/ingredients/_picture_view.html.erb +0 -4
  333. data/app/views/alchemy/ingredients/_richtext_view.html.erb +0 -3
  334. data/app/views/alchemy/ingredients/_select_view.html.erb +0 -1
  335. data/app/views/alchemy/ingredients/_text_view.html.erb +0 -4
  336. data/app/views/alchemy/ingredients/_video_view.html.erb +0 -3
  337. data/babel.config.js +0 -12
  338. data/config/initializers/assets.rb +0 -4
  339. data/lib/alchemy/config.rb +0 -114
  340. data/lib/alchemy/element_definition.rb +0 -73
  341. data/lib/alchemy/page_layout.rb +0 -73
  342. data/lib/alchemy/resource_filter.rb +0 -40
  343. data/lib/alchemy/upgrader/seven_point_four.rb +0 -26
  344. data/lib/alchemy/upgrader/seven_point_three.rb +0 -52
  345. data/lib/generators/alchemy/ingredient/templates/view.html.erb +0 -1
  346. data/lib/generators/alchemy/install/files/alchemy_admin.js +0 -1
  347. data/lib/generators/alchemy/install/files/all.js +0 -11
  348. data/lib/generators/alchemy/install/files/article.css +0 -25
  349. data/vendor/assets/images/remixicon.symbol.svg +0 -11
  350. /data/app/{assets/stylesheets → stylesheets}/alchemy/_fonts.scss +0 -0
  351. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/attachment-select.scss +0 -0
  352. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/attachments.scss +0 -0
  353. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flash.scss +0 -0
  354. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/list_filter.scss +0 -0
  355. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/node-select.scss +0 -0
  356. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/spinner.scss +0 -0
  357. /data/app/{assets/stylesheets → stylesheets}/tinymce/skins/skintool.json +0 -0
  358. /data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/fonts/tinymce-mobile.woff +0 -0
@@ -2,30 +2,38 @@
2
2
  <% if Alchemy::Language.published.many? %>
3
3
  <label class="inline-label" style="float: right">
4
4
  <%= Alchemy::Language.model_name.human %>
5
- <%= select_tag :language_id, options_from_collection_for_select(
5
+ <%= select description_field_name_prefix, :language_id, options_from_collection_for_select(
6
6
  Alchemy::Language.published, :id, ->(l) { l.code.upcase },
7
7
  selected: @picture_description.language_id,
8
- ), data: {
9
- url: alchemy.edit_admin_picture_description_url(id: "__ID__", picture_id: @picture)
8
+ ),
9
+ {},
10
+ id: "picture_description_select",
11
+ data: {
12
+ url: alchemy.edit_admin_picture_description_url(
13
+ id: @picture_description.id || "__ID__",
14
+ picture_id: @picture
15
+ )
10
16
  } %>
11
17
  </label>
12
18
  <% end %>
13
19
 
14
20
  <turbo-frame id="picture_descriptions">
15
21
  <%= render "alchemy/admin/picture_descriptions/form",
16
- picture_description_counter: @picture.descriptions.index(@picture_description),
22
+ description_field_name_prefix: description_field_name_prefix,
17
23
  picture_description: @picture_description %>
18
24
  </turbo-frame>
19
25
  </div>
20
26
 
21
- <script type="module">
22
- const select = document.querySelector("#language_id")
27
+ <script>
28
+ (function ($) {
29
+ const select = $.getElementById("picture_description_select")
23
30
 
24
- if (select) {
25
- select.addEventListener("change", () => {
26
- const url = new URL(select.dataset.url)
27
- url.searchParams.set("language_id", select.value)
28
- Turbo.visit(url, { frame: "picture_descriptions" })
29
- })
30
- }
31
+ if (select) {
32
+ select.addEventListener("change", () => {
33
+ const url = new URL(select.dataset.url)
34
+ url.searchParams.set("language_id", select.value)
35
+ Turbo.visit(url, { frame: "picture_descriptions" })
36
+ })
37
+ }
38
+ })(document)
31
39
  </script>
@@ -7,7 +7,7 @@
7
7
  file_attribute: 'image_file',
8
8
  redirect_url: alchemy.admin_pictures_path(
9
9
  size: @size,
10
- filter: { misc: 'last_upload' }
10
+ q: { last_upload: true }
11
11
  ) %>
12
12
  </div>
13
13
  <div class="toolbar_spacer"></div>
@@ -74,13 +74,8 @@
74
74
  <h2>
75
75
  <%= @pictures.total_count %>
76
76
  <%= Alchemy::Picture.model_name.human(count: @pictures.total_count) %>
77
- <% if search_filter_params[:filter].present? %>
78
- <%= Alchemy.t("filtered_by") %>
79
- <% search_filter_params[:filter].each do |k, v| %>
80
- <span class="applied-filter"><%= Alchemy.t("filters.picture.#{k}.values.#{v}") %></span>
81
- <% end %>
82
- <% end %>
83
77
  </h2>
78
+ <%= render "alchemy/admin/resources/applied_filters" %>
84
79
  </div>
85
80
  <%= render 'archive' %>
86
81
  </div>
@@ -0,0 +1,8 @@
1
+ <% if applied_filters.present? %>
2
+ <div class="applied-filters">
3
+ <b><%= Alchemy.t("filtered_by") %></b>
4
+ <% applied_filters.each do |filter| %>
5
+ <%= render filter.applied_filter_component(search_filter_params:, resource_url_proxy:, query: @query) %>
6
+ <% end %>
7
+ </div>
8
+ <% end %>
@@ -1,27 +1,17 @@
1
1
  <div id="filter_bar">
2
- <%= render partial: "filter", collection: resource_filters_for_select %>
2
+ <% alchemy_filters.each do |filter| %>
3
+ <%= render filter.input_component(search_filter_params, @query) %>
4
+ <% end %>
3
5
  </div>
4
6
 
5
7
  <script type="module">
6
- $(function() {
7
- $('select', '#filter_bar').on('change', function(e) {
8
- var $this = $(this);
9
- var filter_param = 'filter['+$this.attr('name')+']';
10
- var path = '<%= resources_path(resource_handler.namespaced_resources_name) %>';
11
- var params = new URLSearchParams('<%= raw search_filter_params.to_query %>');
12
-
13
- if ($this.val() === "") {
14
- params.delete(filter_param);
15
- } else {
16
- params.set(filter_param, $this.val());
17
- }
18
-
19
- if ($this.data('remote') === true) {
20
- $.get(path, params.toString(), null, 'script');
21
- } else {
22
- Turbo.visit(path + '?' + params.toString());
23
- }
24
- return false;
25
- });
8
+ // Still using jQuery here, because select2 does emit the event from
9
+ // the correct element.
10
+ $('#filter_bar').on('change', function(event) {
11
+ // We need to dispatch a submit event, so that Turbo that listens
12
+ // to it submits the search form us.
13
+ const submitEvent = new Event("submit", { bubbles: true, cancelable: true });
14
+ event.target.form.dispatchEvent(submitEvent);
15
+ return false;
26
16
  });
27
17
  </script>
@@ -0,0 +1,6 @@
1
+ <div class="pagination-wrapper">
2
+ <%= paginate resources, theme: "alchemy", remote: local_assigns[:remote] %>
3
+ <% unless local_assigns[:hide_per_page_select] %>
4
+ <%= render "alchemy/admin/resources/per_page_select" %>
5
+ <% end %>
6
+ </div>
@@ -1,4 +1,4 @@
1
- <%= form_tag url_for, method: :get, class: 'per-page-select-form' do |f| %>
1
+ <%= form_tag url_for, method: :get, remote: true, class: 'per-page-select-form' do |f| %>
2
2
  <% search_filter_params.reject { |k, _| k == 'page' || k == 'per_page' }.each do |key, value| %>
3
3
  <% if value.respond_to?(:keys) %>
4
4
  <% value.each do |k, v| %>
@@ -9,7 +9,9 @@
9
9
  <% end %>
10
10
  <% end %>
11
11
  <label>
12
- <%= Alchemy.t(:items_per_page, model_name: resource_model.model_name.human(count: 2)) %>
12
+ <span>
13
+ <%= Alchemy.t(:items_per_page, model_name: resource_model.model_name.human(count: 2)) %>
14
+ </span>
13
15
  <%= select_tag :per_page,
14
16
  options_for_select(
15
17
  items_per_page_options,
@@ -1,3 +1,3 @@
1
1
  <%= render Alchemy::Admin::Resource::Table.new(resources_instance_variable, query: @query, search_filter_params: search_filter_params, icon: local_assigns[:icon]) %>
2
2
 
3
- <%= paginate resources_instance_variable, scope: resource_url_proxy, theme: 'alchemy' %>
3
+ <%= render "alchemy/admin/resources/pagination", resources: resources_instance_variable %>
@@ -1,21 +1,7 @@
1
1
  <div class="resources-header">
2
- <% if search_filter_params[:filter].present? %>
3
- <b><%= Alchemy.t("filtered_by") %></b>
4
- <% search_filter_params[:filter].each do |k, v| %>
5
- <%- tmp_params = search_filter_params.dup -%>
6
- <%- tmp_params[:filter] = tmp_params[:filter].except(k) -%>
7
- <%- dismiss_filter_url = resource_url_proxy.url_for(
8
- { action: 'index' }.merge(tmp_params.except(:page))
9
- ) -%>
10
- <div class="applied-filter">
11
- <%= Alchemy.t("filters.#{resource_handler.resource_name}.#{k}.values.#{v}", default: v) %>
12
- <%= link_to render_icon(:times, size: 'xs'), dismiss_filter_url, class: 'dismiss-filter' %>
13
- </div>
14
- <% end %>
15
- <% end %>
16
-
17
2
  <h2>
18
3
  <%= resources_instance_variable.total_count %>
19
4
  <%= resource_model.model_name.human(count: resources_instance_variable.total_count) %>
20
5
  </h2>
6
+ <%= render "alchemy/admin/resources/applied_filters" %>
21
7
  </div>
@@ -30,7 +30,11 @@
30
30
  <%= render_message do %>
31
31
  <%== Alchemy.t('alchemy/site', scope: :no_resource_found) %>
32
32
  <% end %>
33
- <%= render 'form', site: Alchemy::Site.new(Alchemy::Config.get(:default_site).merge(public: true)) %>
33
+ <%= render 'form', site: Alchemy::Site.new(
34
+ name: Alchemy.config.default_site.name,
35
+ host: Alchemy.config.default_site.host,
36
+ public: true
37
+ ) %>
34
38
  </div>
35
39
  <% end %>
36
40
  </div>
@@ -49,6 +49,14 @@
49
49
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
50
50
  <% end %>
51
51
 
52
+ <h3>Tags Autocomplete</h3>
53
+
54
+ <div>
55
+ <alchemy-tags-autocomplete>
56
+ <input type="text" class="full_width" />
57
+ </alchemy-tags-autocomplete>
58
+ </div>
59
+
52
60
  <h3>Growl Messages</h3>
53
61
 
54
62
  <%= link_to render_icon(:check), 'javascript:Alchemy.growl("Success message")', class: "icon_button" %>
@@ -37,7 +37,7 @@
37
37
  <% table.edit_button tooltip: Alchemy.t(:edit_tag), dialog_size: "360x410" %>
38
38
  <% end %>
39
39
 
40
- <%= paginate @tags, theme: 'alchemy' %>
40
+ <%= render "alchemy/admin/resources/pagination", resources: @tags %>
41
41
 
42
42
  <% else %>
43
43
 
@@ -1,20 +1,20 @@
1
- <% asset_host = ActionController::Base.config.asset_host %>
1
+ <% tinymce_base_path = "#{Rails.application.config.assets.prefix}/tinymce" %>
2
2
 
3
- <link rel="preload" href="<%= asset_host %><%= assets_prefix %>/tinymce/skins/ui/alchemy/skin.min.css" as="style" />
3
+ <link rel="preload" href="<%= asset_path("#{tinymce_base_path}/skins/ui/alchemy/skin.min.css") %>" as="style" />
4
4
  <% if Alchemy::Tinymce.init[:content_css] %>
5
- <link rel="preload" href="<%= asset_host %><%= Alchemy::Tinymce.init[:content_css] %>" as="style" />
5
+ <link rel="preload" href="<%= asset_path(Alchemy::Tinymce.init[:content_css]) %>" as="style" />
6
6
  <% end %>
7
7
  <% Alchemy::Tinymce.preloadable_plugins.each do |plugin| %>
8
- <link rel="preload" href="<%= asset_host %><%= assets_prefix %>/tinymce/plugins/<%= plugin %>/plugin.min.js" as="script">
8
+ <link rel="preload" href="<%= asset_path("#{tinymce_base_path}/plugins/#{plugin}/plugin.min.js") %>" as="script">
9
9
  <% end %>
10
10
 
11
11
  <script>
12
12
  // Setting TinyMCE path.
13
13
  var tinyMCEPreInit = {
14
- <% if ActionController::Base.config.asset_host_set? %>
15
- base: '<%= asset_url(assets_prefix + '/tinymce') %>',
14
+ <% if ActionController::Base.config.asset_host %>
15
+ base: '<%= asset_url(tinymce_base_path, host: ActionController::Base.config.asset_host) %>',
16
16
  <% else %>
17
- base: '<%= asset_path(assets_prefix + '/tinymce') %>',
17
+ base: '<%= tinymce_base_path %>',
18
18
  <% end %>
19
19
  suffix: '.min'
20
20
  };
@@ -1,4 +1,4 @@
1
- export const en = {
1
+ Alchemy.translations = {
2
2
  allowed_chars: "of %{count} chars",
3
3
  cancel: "Cancel",
4
4
  cancelled: "Cancelled",
@@ -12,6 +12,7 @@ export const en = {
12
12
  "You have unsaved changes on this page. They will be lost if you continue.",
13
13
  page_found: "Page found",
14
14
  pages_found: "Pages found",
15
+ "Please confirm": "Please confirm",
15
16
  url_validation_failed: "The url has no valid format.",
16
17
  warning: "Warning!",
17
18
  "File is too large": "File is too large",
@@ -30,5 +31,7 @@ export const en = {
30
31
  date: "Y-m-d",
31
32
  time: "H:i",
32
33
  time_24hr: false
33
- }
34
+ },
35
+ Yes: "Yes",
36
+ No: "No"
34
37
  }
@@ -1,4 +1,4 @@
1
- <% file_types = configuration(:uploader)['allowed_filetypes'][object.class.model_name.collection] || ['*'] %>
1
+ <% file_types = Alchemy.config.uploader.allowed_filetypes[object.class.model_name.collection] || ['*'] %>
2
2
  <% accept = file_types == ["*"] ? false : file_types.map {|type| ".#{type}"}.join(", ") %>
3
3
 
4
4
  <alchemy-uploader dropzone="<%= local_assigns[:dropzone] || "#main_content" %>">
@@ -1,8 +1,8 @@
1
1
  <script>
2
2
  Alchemy.uploader_defaults = {
3
- file_size_limit: <%= configuration(:uploader)['file_size_limit'] || 100 -%>,
4
- upload_limit: <%= configuration(:uploader)['upload_limit'] || 50 -%>,
5
- allowed_filetype_pictures: "<%= configuration(:uploader)['allowed_filetypes']['alchemy/pictures']&.join(", ") || '*' -%>",
6
- allowed_filetype_attachments: "<%= configuration(:uploader)['allowed_filetypes']['alchemy/attachments']&.join(", ") || '*' -%>",
3
+ file_size_limit: <%= Alchemy.config.uploader.file_size_limit -%>,
4
+ upload_limit: <%= Alchemy.config.uploader.upload_limit -%>,
5
+ allowed_filetype_pictures: "<%= Alchemy.config.uploader.allowed_filetypes.alchemy_pictures.join(", ") -%>",
6
+ allowed_filetype_attachments: "<%= Alchemy.config.uploader.allowed_filetypes.alchemy_attachments.join(", ") -%>",
7
7
  }
8
8
  </script>
@@ -0,0 +1,3 @@
1
+ <alchemy-growl type="error">
2
+ <%= @notice %>
3
+ </alchemy-growl>
@@ -1,7 +1,7 @@
1
1
  (function() {
2
2
  var dialog = Alchemy.currentDialog();
3
3
  var callback = function() {
4
- Turbo.visit('<%= url_for(@redirect_url) %>');
4
+ Turbo.visit('<%= url_for(@redirect_url).html_safe %>');
5
5
  };
6
6
  if (dialog) {
7
7
  Alchemy.closeCurrentDialog(callback);
@@ -0,0 +1,24 @@
1
+ <%= content_tag :div, class: [number_editor.css_classes], data: number_editor.data_attributes do %>
2
+ <%= element_form.fields_for(:ingredients, number_editor.ingredient) do |f| %>
3
+ <%= ingredient_label(number_editor) %>
4
+ <div class="input-field">
5
+ <%= f.text_field :value,
6
+ type: number_editor.settings[:input_type] || "number",
7
+ required: number_editor.presence_validation?,
8
+ step: number_editor.settings[:step],
9
+ min: number_editor.settings[:min],
10
+ max: number_editor.settings[:max],
11
+ id: number_editor.form_field_id,
12
+ oninput: number_editor.settings[:input_type] == "range" ? "this.nextElementSibling.value = this.value" : nil
13
+ %>
14
+ <% if number_editor.settings[:input_type] == "range" %>
15
+ <output><%= number_editor.value %></output>
16
+ <% end %>
17
+ <% if number_editor.settings[:unit] %>
18
+ <div class="input-addon right">
19
+ <%= number_editor.settings[:unit] %>
20
+ </div>
21
+ <% end %>
22
+ </div>
23
+ <% end %>
24
+ <% end %>
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title><%= Alchemy.t("Welcome to Alchemy") %></title>
7
+ <%= stylesheet_link_tag("alchemy/welcome", media: "all") %>
8
+ </head>
9
+ <body>
10
+ <div class="container">
11
+ <%= image_tag("alchemy/alchemy-logo.svg") %>
12
+ <% if @page.nil? %>
13
+ <h3>
14
+ <%= Alchemy.t("There are no pages yet") %>
15
+ </h3>
16
+ <p>
17
+ <%= link_to Alchemy.t("Create your first page"),
18
+ alchemy.admin_pages_path, class: "button" %>
19
+ </p>
20
+ <% else %>
21
+ <h3>
22
+ <%= Alchemy.t("There are no published pages yet") %>
23
+ </h3>
24
+ <p>
25
+ <%= link_to Alchemy.t("Publish your homepage"),
26
+ alchemy.edit_admin_page_path(@page), class: "button" %>
27
+ </p>
28
+ <% end %>
29
+ </div>
30
+ </body>
31
+ </html>
@@ -1,25 +1,27 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
- <title>Welcome to AlchemyCMS</title>
8
- <%= stylesheet_link_tag "alchemy/welcome", media: "all" %>
6
+ <title><%= Alchemy.t("Welcome to Alchemy") %></title>
7
+ <%= stylesheet_link_tag("alchemy/welcome", media: "all") %>
9
8
  </head>
10
9
  <body>
11
10
  <div class="container">
12
- <%= image_tag 'alchemy/alchemy-logo.svg' %>
13
- <h3>You have successfully installed AlchemyCMS!</h3>
11
+ <%= image_tag("alchemy/alchemy-logo.svg") %>
12
+ <h3><%= Alchemy.t("You have successfully installed Alchemy") %></h3>
14
13
  <p>
15
- Thank you for using Alchemy. We hope you enjoy using it as much as we do.
14
+ <%= Alchemy.t("Before creating your first page you need an admin user") %>.
16
15
  </p>
17
16
  <p>
18
- The first thing you probably want to do before creating your first page:
17
+ <%= link_to Alchemy.t("Create admin user"), Alchemy.signup_path, class: "button" %>
19
18
  </p>
19
+ <h4><%= Alchemy.t("More resources") %></h4>
20
20
  <ul>
21
- <li><%= link_to 'Create your first admin user', Alchemy.signup_path %></li>
22
- <li><%= link_to 'Read the guidelines', 'http://guides.alchemy-cms.com/stable', target: '_blank' %></li>
21
+ <li>
22
+ <%= link_to Alchemy.t("Read the guidelines"),
23
+ "https://guides.alchemy-cms.com/", target: "_blank", rel: "noopener" %>
24
+ </li>
23
25
  </ul>
24
26
  </div>
25
27
  </body>
@@ -11,7 +11,9 @@
11
11
  <%= render_icon("skip-left") %>
12
12
  </span>
13
13
  <% else %>
14
- <%= link_to url, remote: remote, title: Alchemy.t(:first, scope: 'pagination'), class: 'first-page' do %>
15
- <%= render_icon("skip-left") %>
16
- <% end %>
14
+ <sl-tooltip content="<%= Alchemy.t(:first, scope: 'pagination') %>" placement="top-start">
15
+ <%= link_to url, remote: remote, class: 'first-page' do %>
16
+ <%= render_icon("skip-left") %>
17
+ <% end %>
18
+ </sl-tooltip>
17
19
  <% end %>
@@ -11,7 +11,9 @@
11
11
  <%= render_icon("skip-right") %>
12
12
  </span>
13
13
  <% else %>
14
- <%= link_to url, remote: remote, title: Alchemy.t(:last, scope: 'pagination'), class: 'last-page' do %>
15
- <%= render_icon("skip-right") %>
16
- <% end %>
14
+ <sl-tooltip content="<%= Alchemy.t(:last, scope: 'pagination') %>" placement="top-end">
15
+ <%= link_to url, remote: remote, class: 'last-page' do %>
16
+ <%= render_icon("skip-right") %>
17
+ <% end %>
18
+ </sl-tooltip>
17
19
  <% end %>
@@ -11,7 +11,9 @@
11
11
  <%= render_icon("arrow-right-s") %>
12
12
  </span>
13
13
  <% else -%>
14
- <%= link_to url, rel: 'next', remote: remote, title: Alchemy.t(:next_page, scope: 'pagination'), class: 'next_page' do %>
15
- <%= render_icon("arrow-right-s") %>
16
- <% end %>
14
+ <sl-tooltip content="<%= Alchemy.t(:next_page, scope: 'pagination') %>" placement="top-end">
15
+ <%= link_to url, rel: 'next', remote: remote, class: 'next_page' do %>
16
+ <%= render_icon("arrow-right-s") %>
17
+ <% end %>
18
+ </sl-tooltip>
17
19
  <% end -%>
@@ -8,19 +8,24 @@
8
8
  -%>
9
9
  <div class="pagination">
10
10
  <%= paginator.render do -%>
11
- <%= first_page_tag %>
12
- <%= prev_page_tag -%>
13
- <% each_page do |page| -%>
14
- <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
15
- <%= page_tag page -%>
16
- <% elsif !page.was_truncated? -%>
17
- <%= gap_tag -%>
11
+ <div class="arrows">
12
+ <%= first_page_tag %>
13
+ <%= prev_page_tag -%>
14
+ </div>
15
+
16
+ <div class="pages">
17
+ <% each_page do |page| -%>
18
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
19
+ <%= page_tag page -%>
20
+ <% elsif !page.was_truncated? -%>
21
+ <%= gap_tag -%>
22
+ <% end -%>
18
23
  <% end -%>
19
- <% end -%>
20
- <%= next_page_tag -%>
21
- <%= last_page_tag %>
24
+ </div>
25
+
26
+ <div class="arrows">
27
+ <%= next_page_tag -%>
28
+ <%= last_page_tag %>
29
+ </div>
22
30
  <% end -%>
23
- <% unless local_assigns[:hide_per_page_select] %>
24
- <%= render 'alchemy/admin/resources/per_page_select' %>
25
- <% end %>
26
31
  </div>
@@ -11,7 +11,9 @@
11
11
  <%= render_icon("arrow-left-s") %>
12
12
  </span>
13
13
  <% else -%>
14
- <%= link_to url, rel: 'prev', remote: remote, class: 'previous_page', title: Alchemy.t(:previous_page, scope: 'pagination') do %>
15
- <%= render_icon("arrow-left-s") %>
16
- <% end %>
14
+ <sl-tooltip class="pagination-label" content="<%= Alchemy.t(:previous_page, scope: 'pagination') %>" placement="top-start">
15
+ <%= link_to url, rel: 'prev', remote: remote, class: 'previous_page' do %>
16
+ <%= render_icon("arrow-left-s") %>
17
+ <% end %>
18
+ </sl-tooltip>
17
19
  <% end -%>
@@ -1,16 +1,15 @@
1
1
  <!DOCTYPE html>
2
- <html lang="<%= ::I18n.locale %>" class="no-js loading-custom-elements">
2
+ <html lang="<%= ::I18n.locale %>" class="no-js loading-custom-elements alchemy-light">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title><%= render_alchemy_title %></title>
7
7
  <link rel="shortcut icon" href="<%= asset_path('alchemy/favicon.ico') %>">
8
- <link rel="preload" href="<%= asset_path("remixicon.symbol.svg") %>" as="image" type="<%= Mime::Type.lookup_by_extension(:svg) %>" crossorigin>
8
+ <link rel="preload" href="<%= asset_path("alchemy/icons-sprite.svg") %>" as="image" type="<%= Mime::Type.lookup_by_extension(:svg) %>" crossorigin>
9
9
  <%= csrf_meta_tag %>
10
10
  <meta name="robots" content="noindex">
11
11
  <meta name="turbo-prefetch" content="false">
12
12
  <meta name="turbo-cache-control" content="no-cache">
13
- <%= stylesheet_link_tag('alchemy/custom-properties', media: 'screen', 'data-turbo-track' => true) %>
14
13
  <%= stylesheet_link_tag('alchemy/admin', media: 'screen', 'data-turbo-track' => true) %>
15
14
  <%= stylesheet_link_tag('alchemy/admin/print', media: 'print', 'data-turbo-track' => true) %>
16
15
  <% Alchemy.admin_stylesheets.each do |stylesheet| %>
@@ -22,10 +21,11 @@
22
21
  var Alchemy = {};
23
22
  // Store regular expression for external link url matching.
24
23
  Alchemy.link_url_regexp = <%= link_url_regexp.inspect %>;
24
+ // JS translations
25
+ <%= alchemy_admin_js_translations %>
25
26
  </script>
26
27
  <%= render 'alchemy/admin/tinymce/setup' %>
27
28
  <%= render 'alchemy/admin/partials/routes' %>
28
- <%= javascript_include_tag('alchemy/admin/all', 'data-turbo-track' => true) %>
29
29
  <%= javascript_importmap_tags("alchemy_admin", importmap: Alchemy.importmap) %>
30
30
  <% Alchemy.admin_js_imports.each do |path| %>
31
31
  <script type="module">
@@ -35,7 +35,7 @@
35
35
  <%= yield :javascript_includes %>
36
36
  </head>
37
37
  <%= content_tag :body, id: 'alchemy',
38
- class: alchemy_body_class + ["alchemy-light"],
38
+ class: alchemy_body_class,
39
39
  style: cookies["alchemy-elements-window-width"] && "--elements-window-width: #{cookies["alchemy-elements-window-width"]}px" do %>
40
40
  <noscript>
41
41
  <h1><%= Alchemy.t(:javascript_disabled_headline) %></h1>
@@ -93,10 +93,6 @@
93
93
  <div id="main_content">
94
94
  <%= yield %>
95
95
  </div>
96
- <script type="module">
97
- // Setting the correct locale for select2 dropdown replacement.
98
- $.extend($.fn.select2.defaults, $.fn.select2.locales['<%= ::I18n.locale %>']);
99
- </script>
100
96
  <%= render 'alchemy/admin/uploader/setup' %>
101
97
  <%= yield(:javascripts) %>
102
98
  <% end %>
data/bun.lockb CHANGED
Binary file