alchemy_cms 7.0.11 → 7.1.0.pre.b1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (330) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/backport.yml +36 -0
  3. data/.github/workflows/test.yml +3 -2
  4. data/.gitignore +1 -0
  5. data/.standard.yml +1 -1
  6. data/CHANGELOG.md +144 -15
  7. data/Gemfile +8 -10
  8. data/README.md +10 -8
  9. data/alchemy_cms.gemspec +4 -3
  10. data/app/assets/config/alchemy_manifest.js +0 -1
  11. data/app/assets/javascripts/alchemy/admin.js +1 -19
  12. data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +2 -3
  13. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +19 -34
  14. data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +38 -13
  15. data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +1 -1
  16. data/app/assets/javascripts/alchemy/alchemy.fixed_elements.js +32 -25
  17. data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +1 -1
  18. data/app/assets/javascripts/alchemy/alchemy.image_overlay.coffee +3 -5
  19. data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +0 -57
  20. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +22 -63
  21. data/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee +2 -2
  22. data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +5 -4
  23. data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +5 -5
  24. data/app/assets/javascripts/alchemy/templates/index.js +0 -2
  25. data/app/assets/javascripts/alchemy/templates/node_folder.hbs +1 -1
  26. data/app/assets/javascripts/alchemy/templates/page.hbs +1 -1
  27. data/app/assets/javascripts/alchemy/templates/page_folder.hbs +2 -2
  28. data/app/assets/stylesheets/alchemy/_custom-properties.scss +82 -0
  29. data/app/assets/stylesheets/alchemy/_mixins.scss +38 -30
  30. data/app/assets/stylesheets/alchemy/_variables.scss +12 -5
  31. data/app/assets/stylesheets/alchemy/admin.scss +3 -4
  32. data/app/assets/stylesheets/alchemy/archive.scss +107 -50
  33. data/app/assets/stylesheets/alchemy/attachments.scss +5 -4
  34. data/app/assets/stylesheets/alchemy/buttons.scss +38 -164
  35. data/app/assets/stylesheets/alchemy/dashboard.scss +31 -6
  36. data/app/assets/stylesheets/alchemy/dialogs.scss +12 -28
  37. data/app/assets/stylesheets/alchemy/elements.scss +273 -282
  38. data/app/assets/stylesheets/alchemy/flash.scss +20 -12
  39. data/app/assets/stylesheets/alchemy/forms.scss +21 -34
  40. data/app/assets/stylesheets/alchemy/frame.scss +11 -32
  41. data/app/assets/stylesheets/alchemy/hints.scss +4 -62
  42. data/app/assets/stylesheets/alchemy/image_library.scss +36 -33
  43. data/app/assets/stylesheets/alchemy/labels.scss +4 -1
  44. data/app/assets/stylesheets/alchemy/menubar.scss +7 -6
  45. data/app/assets/stylesheets/alchemy/navigation.scss +27 -15
  46. data/app/assets/stylesheets/alchemy/nodes.scss +11 -7
  47. data/app/assets/stylesheets/alchemy/notices.scss +16 -4
  48. data/app/assets/stylesheets/alchemy/page-select.scss +10 -2
  49. data/app/assets/stylesheets/alchemy/pagination.scss +22 -13
  50. data/app/assets/stylesheets/alchemy/resource_info.scss +7 -5
  51. data/app/assets/stylesheets/alchemy/selects.scss +49 -42
  52. data/app/assets/stylesheets/alchemy/shoelace.scss +345 -0
  53. data/app/assets/stylesheets/alchemy/sitemap.scss +24 -14
  54. data/app/assets/stylesheets/alchemy/spinner.scss +9 -19
  55. data/app/assets/stylesheets/alchemy/tables.scss +16 -24
  56. data/app/assets/stylesheets/alchemy/tags.scss +4 -0
  57. data/app/assets/stylesheets/alchemy/toolbar.scss +29 -25
  58. data/app/assets/stylesheets/alchemy/upload.scss +140 -89
  59. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +80 -108
  60. data/app/components/alchemy/admin/node_select.rb +39 -0
  61. data/app/components/alchemy/admin/page_select.rb +42 -0
  62. data/app/controllers/alchemy/admin/base_controller.rb +5 -6
  63. data/app/controllers/alchemy/admin/elements_controller.rb +63 -35
  64. data/app/controllers/alchemy/admin/languages_controller.rb +1 -2
  65. data/app/controllers/alchemy/base_controller.rb +4 -2
  66. data/app/controllers/concerns/alchemy/admin/current_language.rb +1 -5
  67. data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +1 -1
  68. data/app/controllers/concerns/alchemy/site_redirects.rb +1 -1
  69. data/app/decorators/alchemy/element_editor.rb +0 -2
  70. data/app/helpers/alchemy/admin/attachments_helper.rb +6 -5
  71. data/app/helpers/alchemy/admin/base_helper.rb +17 -12
  72. data/app/helpers/alchemy/admin/ingredients_helper.rb +4 -1
  73. data/app/helpers/alchemy/admin/pages_helper.rb +5 -11
  74. data/app/helpers/alchemy/base_helper.rb +47 -13
  75. data/app/javascript/alchemy_admin/components/alchemy_html_element.js +129 -0
  76. data/app/javascript/alchemy_admin/components/button.js +59 -0
  77. data/app/javascript/alchemy_admin/components/char_counter.js +40 -0
  78. data/app/javascript/alchemy_admin/components/datepicker.js +39 -0
  79. data/app/javascript/alchemy_admin/components/dialog_link.js +45 -0
  80. data/app/javascript/alchemy_admin/components/element_editor/publish_element_button.js +36 -0
  81. data/app/javascript/alchemy_admin/components/element_editor.js +553 -0
  82. data/app/javascript/alchemy_admin/components/ingredient_group.js +54 -0
  83. data/app/javascript/alchemy_admin/components/link_buttons/link_button.js +48 -0
  84. data/app/javascript/alchemy_admin/components/link_buttons/unlink_button.js +38 -0
  85. data/app/javascript/alchemy_admin/components/link_buttons.js +79 -0
  86. data/app/javascript/alchemy_admin/components/node_select.js +45 -0
  87. data/app/javascript/alchemy_admin/components/overlay.js +18 -0
  88. data/app/javascript/alchemy_admin/components/page_select.js +63 -0
  89. data/app/javascript/alchemy_admin/components/remote_select.js +134 -0
  90. data/app/javascript/alchemy_admin/components/select.js +12 -0
  91. data/app/javascript/alchemy_admin/components/spinner.js +31 -0
  92. data/app/javascript/alchemy_admin/components/tinymce.js +146 -0
  93. data/app/javascript/alchemy_admin/components/uploader/file_upload.js +266 -0
  94. data/app/javascript/alchemy_admin/components/uploader/progress.js +258 -0
  95. data/app/javascript/alchemy_admin/components/uploader.js +132 -0
  96. data/app/javascript/alchemy_admin/dirty.js +49 -0
  97. data/app/javascript/alchemy_admin/file_editors.js +1 -1
  98. data/app/javascript/alchemy_admin/gui.js +14 -0
  99. data/app/javascript/alchemy_admin/i18n.js +12 -8
  100. data/app/javascript/alchemy_admin/image_cropper.js +6 -3
  101. data/app/javascript/alchemy_admin/image_loader.js +7 -15
  102. data/app/javascript/alchemy_admin/ingredient_anchor_link.js +2 -5
  103. data/app/javascript/alchemy_admin/initializer.js +65 -0
  104. data/app/javascript/alchemy_admin/locales/en.js +31 -0
  105. data/app/javascript/alchemy_admin/picture_editors.js +2 -2
  106. data/app/javascript/alchemy_admin/picture_selector.js +38 -0
  107. data/app/javascript/alchemy_admin/please_wait_overlay.js +8 -0
  108. data/app/javascript/alchemy_admin/sortable_elements.js +78 -0
  109. data/app/javascript/alchemy_admin/spinner.js +36 -0
  110. data/app/javascript/alchemy_admin/tags_autocomplete.js +46 -0
  111. data/app/javascript/alchemy_admin/utils/ajax.js +6 -5
  112. data/app/javascript/alchemy_admin/utils/dom_helpers.js +20 -0
  113. data/app/javascript/alchemy_admin/utils/format.js +11 -0
  114. data/app/javascript/alchemy_admin/utils/string_conversions.js +10 -0
  115. data/app/javascript/alchemy_admin.js +70 -13
  116. data/app/javascript/menubar.js +10 -0
  117. data/app/models/alchemy/attachment.rb +9 -11
  118. data/app/models/alchemy/element.rb +11 -0
  119. data/app/models/alchemy/ingredients/richtext.rb +1 -10
  120. data/app/models/alchemy/node.rb +4 -0
  121. data/app/models/alchemy/page/page_elements.rb +2 -11
  122. data/app/models/alchemy/page/page_natures.rb +10 -2
  123. data/app/models/alchemy/page.rb +9 -49
  124. data/app/models/alchemy/picture/url.rb +1 -9
  125. data/app/serializers/alchemy/page_tree_serializer.rb +2 -1
  126. data/app/services/alchemy/copy_page.rb +98 -0
  127. data/app/views/alchemy/_menubar.html.erb +17 -13
  128. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +14 -10
  129. data/app/views/alchemy/admin/attachments/_attachment.html.erb +44 -36
  130. data/app/views/alchemy/admin/attachments/_replace_button.html.erb +15 -21
  131. data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +0 -1
  132. data/app/views/alchemy/admin/attachments/assign.js.erb +1 -1
  133. data/app/views/alchemy/admin/attachments/index.html.erb +6 -4
  134. data/app/views/alchemy/admin/attachments/show.html.erb +8 -8
  135. data/app/views/alchemy/admin/clipboard/clear.js.erb +1 -1
  136. data/app/views/alchemy/admin/clipboard/index.html.erb +3 -7
  137. data/app/views/alchemy/admin/clipboard/insert.js.erb +1 -1
  138. data/app/views/alchemy/admin/crop.html.erb +1 -1
  139. data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
  140. data/app/views/alchemy/admin/dashboard/index.html.erb +13 -11
  141. data/app/views/alchemy/admin/dashboard/info.html.erb +7 -7
  142. data/app/views/alchemy/admin/elements/_add_nested_element_form.html.erb +21 -23
  143. data/app/views/alchemy/admin/elements/_element.html.erb +52 -44
  144. data/app/views/alchemy/admin/elements/_footer.html.erb +1 -1
  145. data/app/views/alchemy/admin/elements/_form.html.erb +1 -1
  146. data/app/views/alchemy/admin/elements/_header.html.erb +11 -12
  147. data/app/views/alchemy/admin/elements/_toolbar.html.erb +33 -45
  148. data/app/views/alchemy/admin/elements/create.js.erb +7 -15
  149. data/app/views/alchemy/admin/elements/destroy.js.erb +0 -2
  150. data/app/views/alchemy/admin/elements/index.html.erb +27 -24
  151. data/app/views/alchemy/admin/elements/new.html.erb +9 -11
  152. data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +2 -2
  153. data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +3 -3
  154. data/app/views/alchemy/admin/ingredients/_video_fields.html.erb +1 -2
  155. data/app/views/alchemy/admin/languages/_form.html.erb +2 -3
  156. data/app/views/alchemy/admin/languages/_language.html.erb +15 -8
  157. data/app/views/alchemy/admin/languages/_table.html.erb +1 -0
  158. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +28 -16
  159. data/app/views/alchemy/admin/layoutpages/index.html.erb +2 -2
  160. data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +12 -8
  161. data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +1 -1
  162. data/app/views/alchemy/admin/nodes/_form.html.erb +20 -21
  163. data/app/views/alchemy/admin/nodes/_node.html.erb +39 -34
  164. data/app/views/alchemy/admin/nodes/index.html.erb +1 -1
  165. data/app/views/alchemy/admin/pages/_anchor_link.html.erb +4 -4
  166. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +2 -2
  167. data/app/views/alchemy/admin/pages/_current_page.html.erb +1 -1
  168. data/app/views/alchemy/admin/pages/_external_link.html.erb +4 -4
  169. data/app/views/alchemy/admin/pages/_file_link.html.erb +5 -5
  170. data/app/views/alchemy/admin/pages/_form.html.erb +10 -21
  171. data/app/views/alchemy/admin/pages/_internal_link.html.erb +4 -4
  172. data/app/views/alchemy/admin/pages/_locked_page.html.erb +2 -2
  173. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +4 -17
  174. data/app/views/alchemy/admin/pages/_page.html.erb +76 -72
  175. data/app/views/alchemy/admin/pages/_page_infos.html.erb +23 -7
  176. data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +2 -1
  177. data/app/views/alchemy/admin/pages/_page_status.html.erb +11 -21
  178. data/app/views/alchemy/admin/pages/_publication_fields.html.erb +2 -5
  179. data/app/views/alchemy/admin/pages/_table.html.erb +1 -1
  180. data/app/views/alchemy/admin/pages/_table_row.html.erb +43 -39
  181. data/app/views/alchemy/admin/pages/_toolbar.html.erb +43 -38
  182. data/app/views/alchemy/admin/pages/configure.html.erb +12 -14
  183. data/app/views/alchemy/admin/pages/edit.html.erb +80 -103
  184. data/app/views/alchemy/admin/pages/info.html.erb +20 -11
  185. data/app/views/alchemy/admin/pages/link.html.erb +22 -16
  186. data/app/views/alchemy/admin/pages/new.html.erb +9 -11
  187. data/app/views/alchemy/admin/pages/unlock.js.erb +10 -3
  188. data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +15 -13
  189. data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +3 -5
  190. data/app/views/alchemy/admin/partials/_routes.html.erb +10 -2
  191. data/app/views/alchemy/admin/partials/_site_select.html.erb +6 -5
  192. data/app/views/alchemy/admin/partials/_toolbar_button.html.erb +28 -23
  193. data/app/views/alchemy/admin/pictures/_archive.html.erb +5 -5
  194. data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
  195. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +21 -23
  196. data/app/views/alchemy/admin/pictures/_infos.html.erb +2 -6
  197. data/app/views/alchemy/admin/pictures/_picture.html.erb +15 -17
  198. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +17 -16
  199. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
  200. data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +1 -1
  201. data/app/views/alchemy/admin/pictures/assign.js.erb +1 -1
  202. data/app/views/alchemy/admin/pictures/index.html.erb +34 -30
  203. data/app/views/alchemy/admin/pictures/show.html.erb +3 -3
  204. data/app/views/alchemy/admin/resources/_filter.html.erb +2 -2
  205. data/app/views/alchemy/admin/resources/_form.html.erb +2 -2
  206. data/app/views/alchemy/admin/resources/_per_page_select.html.erb +1 -1
  207. data/app/views/alchemy/admin/resources/_resource.html.erb +16 -9
  208. data/app/views/alchemy/admin/resources/_table.html.erb +4 -1
  209. data/app/views/alchemy/admin/resources/index.html.erb +22 -19
  210. data/app/views/alchemy/admin/sites/index.html.erb +2 -1
  211. data/app/views/alchemy/admin/styleguide/index.html.erb +54 -28
  212. data/app/views/alchemy/admin/tags/_tag.html.erb +16 -18
  213. data/app/views/alchemy/admin/tags/index.html.erb +15 -12
  214. data/app/views/alchemy/admin/tinymce/_setup.html.erb +29 -0
  215. data/app/views/alchemy/admin/uploader/_button.html.erb +23 -29
  216. data/app/views/alchemy/admin/uploader/_setup.html.erb +3 -8
  217. data/app/views/alchemy/base/500.html.erb +1 -1
  218. data/app/views/alchemy/base/error_notice.js.erb +0 -1
  219. data/app/views/alchemy/ingredients/_boolean_editor.html.erb +1 -1
  220. data/app/views/alchemy/ingredients/_datetime_editor.html.erb +1 -1
  221. data/app/views/alchemy/ingredients/_file_editor.html.erb +5 -5
  222. data/app/views/alchemy/ingredients/_link_editor.html.erb +1 -1
  223. data/app/views/alchemy/ingredients/_node_editor.html.erb +6 -19
  224. data/app/views/alchemy/ingredients/_page_editor.html.erb +7 -19
  225. data/app/views/alchemy/ingredients/_picture_editor.html.erb +2 -2
  226. data/app/views/alchemy/ingredients/_richtext_editor.html.erb +6 -15
  227. data/app/views/alchemy/ingredients/_select_editor.html.erb +2 -1
  228. data/app/views/alchemy/ingredients/_text_editor.html.erb +1 -1
  229. data/app/views/alchemy/ingredients/shared/_anchor.html.erb +1 -1
  230. data/app/views/alchemy/ingredients/shared/_link_tools.html.erb +10 -20
  231. data/app/views/alchemy/ingredients/shared/_picture_tools.html.erb +42 -49
  232. data/app/views/kaminari/alchemy/_first_page.html.erb +4 -2
  233. data/app/views/kaminari/alchemy/_gap.html.erb +1 -1
  234. data/app/views/kaminari/alchemy/_last_page.html.erb +4 -2
  235. data/app/views/kaminari/alchemy/_next_page.html.erb +4 -2
  236. data/app/views/kaminari/alchemy/_prev_page.html.erb +4 -2
  237. data/app/views/layouts/alchemy/admin.html.erb +10 -29
  238. data/config/alchemy/modules.yml +30 -30
  239. data/config/importmap.rb +10 -1
  240. data/config/initializers/rails_live_reload.rb +13 -0
  241. data/config/locales/alchemy.en.yml +23 -9
  242. data/config/routes.rb +2 -1
  243. data/lib/alchemy/auth_accessors.rb +6 -1
  244. data/lib/alchemy/controller_actions.rb +17 -4
  245. data/lib/alchemy/dev_support/live_reload_watcher.rb +5 -0
  246. data/lib/alchemy/engine.rb +8 -2
  247. data/lib/alchemy/forms/builder.rb +18 -12
  248. data/lib/alchemy/resources_helper.rb +3 -3
  249. data/lib/alchemy/test_support/capybara_helpers.rb +8 -5
  250. data/lib/alchemy/test_support/rspec_matchers.rb +14 -0
  251. data/lib/alchemy/test_support/shared_uploader_examples.rb +1 -1
  252. data/lib/alchemy/tinymce.rb +8 -3
  253. data/lib/alchemy/version.rb +1 -1
  254. data/package.json +14 -5
  255. data/vendor/assets/fonts/remixicon.eot +0 -0
  256. data/vendor/assets/fonts/remixicon.svg +7816 -0
  257. data/vendor/assets/fonts/remixicon.ttf +0 -0
  258. data/vendor/assets/fonts/remixicon.woff +0 -0
  259. data/vendor/assets/fonts/remixicon.woff2 +0 -0
  260. data/vendor/assets/stylesheets/remixicon.scss +10480 -0
  261. metadata +85 -96
  262. data/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee +0 -30
  263. data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +0 -53
  264. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +0 -45
  265. data/app/assets/javascripts/alchemy/alchemy.char_counter.js.coffee +0 -19
  266. data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +0 -59
  267. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +0 -79
  268. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +0 -267
  269. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +0 -27
  270. data/app/assets/javascripts/alchemy/alchemy.spinner.js +0 -32
  271. data/app/assets/javascripts/alchemy/alchemy.tooltips.coffee +0 -10
  272. data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +0 -131
  273. data/app/assets/javascripts/alchemy/menubar.js.coffee +0 -8
  274. data/app/assets/javascripts/alchemy/node_select.js +0 -39
  275. data/app/assets/javascripts/alchemy/page_select.js +0 -46
  276. data/app/assets/javascripts/alchemy/templates/node.hbs +0 -16
  277. data/app/assets/javascripts/alchemy/templates/spinner.hbs +0 -7
  278. data/app/assets/stylesheets/alchemy/jquery-ui.scss +0 -435
  279. data/app/javascript/alchemy_admin/datepicker.js +0 -40
  280. data/app/javascript/alchemy_admin/tinymce.js +0 -146
  281. data/app/javascript/alchemy_admin/translations.js +0 -32
  282. data/app/views/alchemy/admin/elements/fold.js.erb +0 -33
  283. data/app/views/alchemy/admin/elements/order.js.erb +0 -11
  284. data/app/views/alchemy/admin/elements/publish.js.erb +0 -21
  285. data/app/views/alchemy/admin/elements/update.js.erb +0 -27
  286. data/vendor/assets/fonts/fa-regular-400.eot +0 -0
  287. data/vendor/assets/fonts/fa-regular-400.svg +0 -803
  288. data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
  289. data/vendor/assets/fonts/fa-regular-400.woff +0 -0
  290. data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
  291. data/vendor/assets/fonts/fa-solid-900.eot +0 -0
  292. data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
  293. data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
  294. data/vendor/assets/fonts/fa-solid-900.woff +0 -0
  295. data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
  296. data/vendor/assets/javascripts/fileupload/jquery.fileupload-process.js +0 -178
  297. data/vendor/assets/javascripts/fileupload/jquery.fileupload-validate.js +0 -125
  298. data/vendor/assets/javascripts/fileupload/jquery.fileupload.js +0 -1502
  299. data/vendor/assets/javascripts/fileupload/jquery.iframe-transport.js +0 -224
  300. data/vendor/assets/javascripts/jquery-ui/data.js +0 -45
  301. data/vendor/assets/javascripts/jquery-ui/ie.js +0 -20
  302. data/vendor/assets/javascripts/jquery-ui/keycode.js +0 -51
  303. data/vendor/assets/javascripts/jquery-ui/plugin.js +0 -49
  304. data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +0 -46
  305. data/vendor/assets/javascripts/jquery-ui/safe-blur.js +0 -27
  306. data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +0 -50
  307. data/vendor/assets/javascripts/jquery-ui/unique-id.js +0 -54
  308. data/vendor/assets/javascripts/jquery-ui/version.js +0 -20
  309. data/vendor/assets/javascripts/jquery-ui/widget.js +0 -754
  310. data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +0 -1268
  311. data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +0 -241
  312. data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +0 -1623
  313. data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +0 -931
  314. data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo.min.js +0 -7
  315. data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +0 -296
  316. data/vendor/assets/stylesheets/fontawesome/_animated.scss +0 -20
  317. data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +0 -20
  318. data/vendor/assets/stylesheets/fontawesome/_core.scss +0 -21
  319. data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +0 -6
  320. data/vendor/assets/stylesheets/fontawesome/_icons.scss +0 -1441
  321. data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
  322. data/vendor/assets/stylesheets/fontawesome/_list.scss +0 -18
  323. data/vendor/assets/stylesheets/fontawesome/_mixins.scss +0 -56
  324. data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +0 -24
  325. data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +0 -5
  326. data/vendor/assets/stylesheets/fontawesome/_stacked.scss +0 -31
  327. data/vendor/assets/stylesheets/fontawesome/_variables.scss +0 -1458
  328. data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +0 -16
  329. data/vendor/assets/stylesheets/fontawesome/regular.scss +0 -23
  330. data/vendor/assets/stylesheets/fontawesome/solid.scss +0 -24
@@ -1,57 +1,50 @@
1
1
  <% linkable = picture_editor.settings[:linkable] != false %>
2
2
  <% croppable = picture_editor.allow_image_cropping? %>
3
3
 
4
- <%= link_to_dialog render_icon(:crop),
5
- alchemy.crop_admin_ingredient_path(picture_editor.ingredient, {
6
- crop_from_form_field_id: picture_editor.form_field_id(:crop_from),
7
- crop_size_form_field_id: picture_editor.form_field_id(:crop_size),
8
- picture_id: picture_editor.picture&.id
9
- }), {
10
- size: "1080x615",
11
- title: Alchemy.t("Edit Picturemask"),
12
- image_loader: false,
13
- padding: false
14
- }, {
15
- title: Alchemy.t("Edit Picturemask"),
16
- class: croppable ? "crop_link" : "disabled crop_link",
17
- tabindex: croppable ? nil : "-1",
18
- onclick: "return false"
19
- } %>
20
-
21
- <%= link_to_dialog render_icon("file-image", style: "regular"),
22
- alchemy.admin_pictures_path(
23
- form_field_id: picture_editor.form_field_id(:picture_id)
24
- ),
25
- {
26
- title: (picture_editor.picture ? Alchemy.t(:swap_image) : Alchemy.t(:insert_image)),
27
- size: "790x590",
28
- padding: false
29
- },
30
- title: (picture_editor.picture ? Alchemy.t(:swap_image) : Alchemy.t(:insert_image)) %>
4
+ <%= content_tag "sl-tooltip", content: Alchemy.t("Edit Picturemask"), placement: "top-start", disabled: !croppable do %>
5
+ <%= link_to_dialog render_icon(:crop),
6
+ alchemy.crop_admin_ingredient_path(picture_editor.ingredient, {
7
+ crop_from_form_field_id: picture_editor.form_field_id(:crop_from),
8
+ crop_size_form_field_id: picture_editor.form_field_id(:crop_size),
9
+ picture_id: picture_editor.picture&.id
10
+ }), {
11
+ size: "1080x615",
12
+ title: Alchemy.t("Edit Picturemask"),
13
+ image_loader: false,
14
+ padding: false
15
+ }, {
16
+ class: croppable ? "crop_link icon_button" : "disabled crop_link icon_button" ,
17
+ tabindex: croppable ? nil : "-1",
18
+ onclick: "return false"
19
+ } %>
20
+ <% end %>
31
21
 
32
- <%= link_to_if linkable, render_icon(:link), "", {
33
- onclick: "new Alchemy.LinkDialog(this).open(); return false;",
34
- class: picture_editor.linked? ? "linked" : nil,
35
- title: Alchemy.t(:link_image),
36
- "data-parent-selector": "[data-ingredient-id='#{picture_editor.id}']",
37
- id: "edit_link_#{picture_editor.id}"
38
- } do %>
39
- <span class="disabled" tabindex="-1"><%= render_icon(:link) %></span>
22
+ <%= content_tag "sl-tooltip", content: picture_editor.picture ? Alchemy.t(:swap_image) : Alchemy.t(:insert_image) do %>
23
+ <%= link_to_dialog render_icon("image-add"),
24
+ alchemy.admin_pictures_path(
25
+ form_field_id: picture_editor.form_field_id(:picture_id)
26
+ ),
27
+ {
28
+ title: Alchemy.t(:choose_image),
29
+ size: "800x600",
30
+ padding: false
31
+ },
32
+ class: "icon_button" %>
40
33
  <% end %>
41
34
 
42
- <%= link_to_if linkable, render_icon(:unlink), "", {
43
- onclick: "return Alchemy.LinkDialog.removeLink(this, '[data-ingredient-id=\"#{picture_editor.id}\"]')",
44
- class: picture_editor.linked? ? "linked" : "disabled",
45
- tabindex: picture_editor.linked? ? nil : "-1",
46
- title: Alchemy.t(:unlink)
47
- } do %>
48
- <span class="disabled" tabindex="-1"><%= render_icon(:unlink) %></span>
35
+ <% if linkable %>
36
+ <%= render "alchemy/ingredients/shared/link_tools", ingredient_editor: picture_editor %>
37
+ <% else %>
38
+ <span class="disabled"><%= render_icon("link", style: "m") %></span>
39
+ <span class="disabled"><%= render_icon("link-unlink", style: "m") %></span>
49
40
  <% end %>
50
41
 
51
- <%= link_to_dialog render_icon(:edit),
52
- alchemy.edit_admin_ingredient_path(id: picture_editor.id),
53
- {
54
- title: Alchemy.t(:edit_image_properties),
55
- size: "380x255"
56
- },
57
- title: Alchemy.t(:edit_image_properties) %>
42
+ <%= content_tag "sl-tooltip", content: Alchemy.t(:edit_image_properties), placement: "top-end" do %>
43
+ <%= link_to_dialog render_icon(:edit),
44
+ alchemy.edit_admin_ingredient_path(id: picture_editor.id),
45
+ {
46
+ title: Alchemy.t(:edit_image_properties),
47
+ size: "380x255"
48
+ },
49
+ class: "icon_button" %>
50
+ <% end %>
@@ -7,9 +7,11 @@
7
7
  remote: data-remote
8
8
  -%>
9
9
  <% if current_page.first? %>
10
- <span class="first-page disabled"><i class="icon fas fa-angle-double-left"></i></span>
10
+ <span class="first-page disabled">
11
+ <i class="icon ri-skip-left-line ri-fw"></i>
12
+ </span>
11
13
  <% else %>
12
14
  <%= link_to url, remote: remote, title: Alchemy.t(:first, scope: 'pagination'), class: 'first-page' do %>
13
- <i class="icon fas fa-angle-double-left"></i>
15
+ <i class="icon ri-skip-left-line ri-fw"></i>
14
16
  <% end %>
15
17
  <% end %>
@@ -5,4 +5,4 @@
5
5
  per_page: number of items to fetch per page
6
6
  remote: data-remote
7
7
  -%>
8
- <span class="page gap"><i class="icon fas fa-ellipsis-h"></i></span>
8
+ <span class="page gap"><i class="icon ri-more-line"></i></span>
@@ -7,9 +7,11 @@
7
7
  remote: data-remote
8
8
  -%>
9
9
  <% if current_page.last? %>
10
- <span class="last-page disabled"><i class="icon fas fa-angle-double-right"></i></span>
10
+ <span class="last-page disabled">
11
+ <i class="icon ri-skip-right-line ri-fw"></i>
12
+ </span>
11
13
  <% else %>
12
14
  <%= link_to url, remote: remote, title: Alchemy.t(:last, scope: 'pagination'), class: 'last-page' do %>
13
- <i class="icon fas fa-angle-double-right"></i>
15
+ <i class="icon ri-skip-right-line ri-fw"></i>
14
16
  <% end %>
15
17
  <% end %>
@@ -7,9 +7,11 @@
7
7
  remote: data-remote
8
8
  -%>
9
9
  <% if current_page.last? -%>
10
- <span class="next_page disabled"><i class="icon fas fa-angle-right"></i></span>
10
+ <span class="next_page disabled">
11
+ <i class="icon ri-arrow-right-s-line ri-fw"></i>
12
+ </span>
11
13
  <% else -%>
12
14
  <%= link_to url, rel: 'next', remote: remote, title: Alchemy.t(:next_page, scope: 'pagination'), class: 'next_page' do %>
13
- <i class="icon fas fa-angle-right"></i>
15
+ <i class="icon ri-arrow-right-s-line ri-fw"></i>
14
16
  <% end %>
15
17
  <% end -%>
@@ -7,9 +7,11 @@
7
7
  remote: data-remote
8
8
  -%>
9
9
  <% if current_page.first? -%>
10
- <span class="previous_page disabled"><i class="icon fas fa-angle-left"></i></span>
10
+ <span class="previous_page disabled">
11
+ <i class="icon ri-arrow-left-s-line ri-fw"></i>
12
+ </span>
11
13
  <% else -%>
12
14
  <%= link_to url, rel: 'prev', remote: remote, class: 'previous_page', title: Alchemy.t(:previous_page, scope: 'pagination') do %>
13
- <i class="icon fas fa-angle-left"></i>
15
+ <i class="icon ri-arrow-left-s-line ri-fw"></i>
14
16
  <% end %>
15
17
  <% end -%>
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html class="no-js">
2
+ <html lang="<%= ::I18n.locale %>" class="no-js">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -13,25 +13,10 @@
13
13
  <script>
14
14
  // Global Alchemy JavaScript object.
15
15
  var Alchemy = {};
16
- // Setting TinyMCE path.
17
- var tinyMCEPreInit = {
18
- <% if ActionController::Base.config.asset_host_set? %>
19
- base: '<%= asset_url(assets_prefix + '/tinymce') %>',
20
- <% else %>
21
- base: '<%= asset_path(assets_prefix + '/tinymce') %>',
22
- <% end %>
23
- suffix: '.min'
24
- };
25
16
  // Store regular expression for external link url matching.
26
17
  Alchemy.link_url_regexp = <%= link_url_regexp.inspect %>;
27
- // Holds the default Alchemy TinyMCE configuration
28
- Alchemy.TinymceDefaults = {
29
- plugins: '<%= Alchemy::Tinymce.plugins.join(',') %>',
30
- <% Alchemy::Tinymce.init.each do |k, v| %>
31
- <%= k %>: <%== v.to_json %>,
32
- <% end %>
33
- };
34
18
  </script>
19
+ <%= render 'alchemy/admin/tinymce/setup' %>
35
20
  <%= render 'alchemy/admin/partials/routes' %>
36
21
  <%= javascript_include_tag('alchemy/admin/all', 'data-turbo-track' => true) %>
37
22
  <%= javascript_importmap_tags("alchemy_admin", importmap: Alchemy.importmap) %>
@@ -44,16 +29,12 @@
44
29
  <% end %>
45
30
  <%= yield :javascript_includes %>
46
31
  </head>
47
- <%= content_tag :body, id: 'alchemy', class: alchemy_body_class do %>
32
+ <%= content_tag :body, id: 'alchemy', class: alchemy_body_class + ["alchemy-light"] do %>
48
33
  <noscript>
49
34
  <h1><%= Alchemy.t(:javascript_disabled_headline) %></h1>
50
35
  <p><%= Alchemy.t(:javascript_disabled_text) %></p>
51
36
  </noscript>
52
- <div id="overlay">
53
- <div id="overlay_text_box">
54
- <span id="overlay_text"><%= Alchemy.t(:please_wait) %></span>
55
- </div>
56
- </div>
37
+ <alchemy-overlay text="<%= Alchemy.t(:please_wait) %>"></alchemy-overlay>
57
38
  <div id="left_menu">
58
39
  <div id="main_navi">
59
40
  <% sorted_alchemy_modules.each do |alchemy_module| %>
@@ -64,14 +45,17 @@
64
45
  <div id="logout" class="main_navi_entry">
65
46
  <% if current_alchemy_user %>
66
47
  <%= link_to_dialog(
67
- "#{render_icon('sign-out-alt', size: 'lg', class: 'module')}<label>#{Alchemy.t(:leave)}</label>".html_safe,
48
+ %(
49
+ #{render_icon('logout-box-r', class: 'module')}
50
+ <label>#{Alchemy.t(:leave)}</label>
51
+ ).html_safe,
68
52
  alchemy.leave_admin_path, {
69
53
  size: "300x155",
70
54
  title: Alchemy.t("Leave Alchemy")
71
55
  }, {'data-alchemy-hotkey' => 'alt+q'}) %>
72
56
  <% else %>
73
57
  <%= link_to(alchemy.root_path) do %>
74
- <i class="icon fas fa-sign-out-alt fa-fw fa-lg"></i>
58
+ <i class="icon ri-logout-r-line ri-fw ri-lg"></i>
75
59
  <label><%= Alchemy.t(:leave) %></label>
76
60
  <% end %>
77
61
  <% end %>
@@ -89,8 +73,7 @@
89
73
  <%= current_alchemy_user_name %>
90
74
  <% if Alchemy::I18n.available_locales.length > 1 %>
91
75
  <%= select_tag 'change_locale',
92
- options_for_select(translations_for_select, ::I18n.locale),
93
- class: 'alchemy_selectbox tiny' %>
76
+ options_for_select(translations_for_select, ::I18n.locale) %>
94
77
  <% end %>
95
78
  </div>
96
79
  </div>
@@ -104,8 +87,6 @@
104
87
  <%= yield %>
105
88
  </div>
106
89
  <script>
107
- // Store current locale for javascript translations.
108
- Alchemy.locale = '<%= ::I18n.locale %>';
109
90
  // Setting the correct locale for select2 dropdown replacement.
110
91
  $.extend($.fn.select2.defaults, $.fn.select2.locales['<%= ::I18n.locale %>']);
111
92
  </script>
@@ -4,78 +4,78 @@
4
4
  engine_name: alchemy
5
5
  position: 1
6
6
  navigation:
7
- name: 'modules.dashboard'
8
- controller: '/alchemy/admin/dashboard'
7
+ name: Home
8
+ controller: "/alchemy/admin/dashboard"
9
9
  action: index
10
- inline_image: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="-4 -6 32 32" class="svg-inline--fa fa-lg fa-fw"><path fill="currentColor" d="M15.7 7.9L9.9 2.2 2.1 4.3 0 12.1l5.7 5.8 7.8-2.1 2.2-7.9zm-5.3 10.3l-1.2 4.4 3.2 3.2 4.4-1.2 1.2-4.4-3.2-3.2-4.4 1.2zM23.5 7.3L17.2 9l-1.7 6.2 4.5 4.6 6.2-1.7 1.7-6.2-4.4-4.6z"/></svg>'
10
+ icon: home-2-line
11
11
 
12
12
  - name: pages
13
13
  engine_name: alchemy
14
14
  position: 2
15
15
  navigation:
16
- name: 'modules.pages'
17
- controller: '/alchemy/admin/pages'
16
+ name: "modules.pages"
17
+ controller: "/alchemy/admin/pages"
18
18
  action: index
19
- icon: file-alt
19
+ icon: pages-line
20
20
  sub_navigation:
21
- - name: 'modules.pages'
22
- controller: '/alchemy/admin/pages'
21
+ - name: "modules.pages"
22
+ controller: "/alchemy/admin/pages"
23
23
  action: index
24
- - name: 'modules.layoutpages'
25
- controller: '/alchemy/admin/layoutpages'
24
+ - name: "modules.layoutpages"
25
+ controller: "/alchemy/admin/layoutpages"
26
26
  action: index
27
27
  nested:
28
- - controller: '/alchemy/admin/pages'
28
+ - controller: "/alchemy/admin/pages"
29
29
  action: edit
30
30
 
31
31
  - name: menus
32
32
  engine_name: alchemy
33
33
  position: 3
34
34
  navigation:
35
- name: 'modules.menus'
36
- controller: '/alchemy/admin/nodes'
35
+ name: "modules.menus"
36
+ controller: "/alchemy/admin/nodes"
37
37
  action: index
38
- icon: list-ul
38
+ icon: menu-2-line
39
39
 
40
40
  - name: languages
41
41
  engine_name: alchemy
42
42
  position: 4
43
43
  navigation:
44
- name: 'modules.languages'
45
- controller: '/alchemy/admin/languages'
44
+ name: "modules.languages"
45
+ controller: "/alchemy/admin/languages"
46
46
  action: index
47
- icon: flag
47
+ icon: translate-2
48
48
 
49
49
  - name: sites
50
50
  engine_name: alchemy
51
51
  position: 5
52
52
  navigation:
53
- name: 'modules.sites'
54
- controller: '/alchemy/admin/sites'
53
+ name: "modules.sites"
54
+ controller: "/alchemy/admin/sites"
55
55
  action: index
56
- icon: bullseye
56
+ icon: global-line
57
57
 
58
58
  - name: tags
59
59
  engine_name: alchemy
60
60
  position: 6
61
61
  navigation:
62
- name: 'modules.tags'
63
- controller: '/alchemy/admin/tags'
62
+ name: "modules.tags"
63
+ controller: "/alchemy/admin/tags"
64
64
  action: index
65
- icon: tags
65
+ icon: price-tag-3-line
66
66
 
67
67
  - name: archive
68
68
  engine_name: alchemy
69
69
  position: 7
70
70
  navigation:
71
- controller: '/alchemy/admin/pictures'
71
+ controller: "/alchemy/admin/pictures"
72
72
  action: index
73
- name: 'modules.library'
74
- icon: archive
73
+ name: "modules.library"
74
+ icon: archive-drawer-line
75
75
  sub_navigation:
76
- - name: 'modules.pictures'
77
- controller: '/alchemy/admin/pictures'
76
+ - name: "modules.pictures"
77
+ controller: "/alchemy/admin/pictures"
78
78
  action: index
79
- - name: 'modules.attachments'
80
- controller: '/alchemy/admin/attachments'
79
+ - name: "modules.attachments"
80
+ controller: "/alchemy/admin/attachments"
81
81
  action: index
data/config/importmap.rb CHANGED
@@ -1,8 +1,17 @@
1
+ pin "@ungap/custom-elements", to: "https://ga.jspm.io/npm:@ungap/custom-elements@1.3.0/index.js", preload: true
1
2
  pin "flatpickr", to: "https://ga.jspm.io/npm:flatpickr@4.6.13/dist/esm/index.js", preload: true
2
3
  pin "lodash-es/debounce", to: "https://ga.jspm.io/npm:lodash-es@4.17.21/debounce.js", preload: true
3
4
  pin "lodash-es/max", to: "https://ga.jspm.io/npm:lodash-es@4.17.21/max.js", preload: true
4
- pin "sortablejs", to: "https://ga.jspm.io/npm:sortablejs@1.15.0/modular/sortable.esm.js", preload: true
5
+ pin "sortablejs", to: "https://ga.jspm.io/npm:sortablejs@1.15.1/modular/sortable.esm.js", preload: true
5
6
  pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
7
+ pin "@shoelace/animation-registry", to: "https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/utilities/animation-registry.js", preload: true
8
+ pin "@shoelace/switch", to: "https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/switch/switch.js", preload: true
9
+ pin "@shoelace/tab", to: "https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/tab/tab.js", preload: true
10
+ pin "@shoelace/tab-group", to: "https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/tab-group/tab-group.js", preload: true
11
+ pin "@shoelace/tab-panel", to: "https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/tab-panel/tab-panel.js", preload: true
12
+ pin "@shoelace/tooltip", to: "https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/tooltip/tooltip.js", preload: true
13
+ pin "@shoelace/progress-bar", to: "https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/components/progress-bar/progress-bar.js", preload: true
14
+ pin "@rails/ujs", to: "https://ga.jspm.io/npm:@rails/ujs@7.1.2/app/assets/javascripts/rails-ujs.esm.js"
6
15
 
7
16
  pin "alchemy_admin", to: "alchemy_admin.js", preload: true
8
17
  pin_all_from File.expand_path("../app/javascript/alchemy_admin", __dir__), under: "alchemy_admin"
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ if defined?(RailsLiveReload)
4
+ RailsLiveReload.configure do |config|
5
+ # Default watched folders & files
6
+ config.watch %r{app/views/.+\.(erb)$}
7
+ config.watch %r{(app|vendor)/(assets|javascript)/\w+/(.+\.(s?css|coffee|js|html|png|jpg)).*}, reload: :always
8
+
9
+ # More examples:
10
+ config.watch %r{app/(helpers|components|decorators)/.+\.rb}, reload: :always
11
+ config.watch %r{config/locales/.+\.yml}, reload: :always
12
+ end
13
+ end
@@ -223,6 +223,10 @@ en:
223
223
  host: Either enter a <a href="https://en.wikipedia.org/wiki/Fully_qualified_domain_name" target="_blank">FQDN</a> or use a asterisk (*) to allow all domains to access this site.
224
224
  aliases: Enter additional domains this site should be accessible by. Please separate them by space or new line.
225
225
 
226
+ admin:
227
+ elements:
228
+ toolbar:
229
+ hide: Hide
226
230
  add_nested_element: "Add %{name}"
227
231
  anchor: "Anchor"
228
232
  anchor_link_headline: You can link to an anchor from the current page.
@@ -362,7 +366,7 @@ en:
362
366
  all_pictures: "All pictures"
363
367
  apply: "apply"
364
368
  assign_file: "Assign a file"
365
- assign_image: "Assign an image"
369
+ assign_image: "Assign this image"
366
370
  attached_to: "attached to"
367
371
  attachment_filename_notice: "* Please do not use any special characters for the filename."
368
372
  auto_play: "Play movie after load"
@@ -420,6 +424,7 @@ en:
420
424
  edit_tag: "Edit tag"
421
425
  edit_selected_pictures: "Edit selected pictures"
422
426
  element_editor_not_found: "Error within this Element"
427
+ element_hidden: "Hidden"
423
428
  element_of_type: "Element"
424
429
  element_saved: "Saved element."
425
430
  enter_external_link: "Please enter the URL you want to link with"
@@ -522,19 +527,27 @@ en:
522
527
  "Page created": "Page: '%{name}' created."
523
528
  page_infos: "Page info"
524
529
  page_properties: "Page properties"
525
- page_public: "published"
526
530
  page_published: "Published page"
527
- page_restricted: "restricted"
528
531
  page_states:
529
532
  public:
530
- "true": "Page is published."
531
- "false": "Page is unpublished."
533
+ "true": "Page is available online."
534
+ "false": "Page is unavailable for website visitors."
532
535
  locked:
533
536
  "true": "Page is being edited at the moment."
534
537
  "false": ""
535
538
  restricted:
536
- "true": "Page is restricted."
537
- "false": "Page is not restricted."
539
+ "true": "Page is only accessible by members."
540
+ "false": "Page is accessible by all visitors."
541
+ page_status_titles:
542
+ public:
543
+ "true": "online"
544
+ "false": "offline"
545
+ locked:
546
+ "true": "locked"
547
+ "false": ""
548
+ restricted:
549
+ "true": "restricted"
550
+ "false": "accessible"
538
551
  page_status: "Status"
539
552
  page_title: "Title"
540
553
  page_type: "Type"
@@ -547,7 +560,7 @@ en:
547
560
  password: "Password"
548
561
  paste: "paste"
549
562
  pictures_in_page: "%{page} in %{pictures}"
550
- place_link: "Link text"
563
+ place_link: "Add link"
551
564
  player_version: "Flash Player version"
552
565
  "please enter subject and mail address": "Please enter recipient and subject."
553
566
  please_confirm: "Please confirm"
@@ -604,7 +617,7 @@ en:
604
617
  title: "Title"
605
618
  to_alchemy: "To Alchemy"
606
619
  unknown: "unknown"
607
- unlink: "Remove link from this image."
620
+ unlink: "Remove link"
608
621
  unlock_page: "Leave page"
609
622
  unlocked_page: "Unlocked page %{name}."
610
623
  uploader:
@@ -616,6 +629,7 @@ en:
616
629
  button_label: Upload image(s)
617
630
  upload_success: "Picture %{name} uploaded successfully"
618
631
  upload_failure: "Error while uploading %{name}: %{error}"
632
+ error: "Could not upload file! %{error}"
619
633
  want_to_create_new_language: "Do you want to create a new empty language tree?"
620
634
  want_to_make_copy_of_existing_language: "Do you want to copy an existing language tree?"
621
635
  "We need at least one default.": "A default language must exist."
data/config/routes.rb CHANGED
@@ -45,7 +45,8 @@ Alchemy::Engine.routes.draw do
45
45
  end
46
46
  member do
47
47
  patch :publish
48
- post :fold
48
+ post :collapse
49
+ post :expand
49
50
  end
50
51
  end
51
52
 
@@ -11,6 +11,7 @@
11
11
  # +Alchemy.login_path defaults to +'/login'+
12
12
  # +Alchemy.logout_path defaults to +'/logout'+
13
13
  # +Alchemy.logout_method defaults to +'delete'+
14
+ # +Alchemy.unauthorized_path defaults to +'/'+
14
15
  #
15
16
  # Anyway, you can tell Alchemy about your authentication model configuration:
16
17
  #
@@ -22,6 +23,7 @@
22
23
  # 5. The path to the login form - @see: Alchemy.login_path
23
24
  # 6. The path to the logout method - @see: Alchemy.logout_path
24
25
  # 7. The http verb for the logout method - @see: Alchemy.logout_method
26
+ # 8. The path to the page showing the user she's unauthorized - @see: Alchemy.unauthorized_path
25
27
  #
26
28
  # == Example
27
29
  #
@@ -33,6 +35,7 @@
33
35
  # Alchemy.login_path = '/auth/login'
34
36
  # Alchemy.logout_path = '/auth/logout'
35
37
  # Alchemy.logout_method = 'get'
38
+ # Alchemy.unauthorized_path = '/home'
36
39
  #
37
40
  # If you don't have your own user model or don't want to provide one,
38
41
  # add the `alchemy-devise` gem into your App's Gemfile.
@@ -49,7 +52,8 @@ module Alchemy
49
52
  :signup_path,
50
53
  :login_path,
51
54
  :logout_path,
52
- :logout_method
55
+ :logout_method,
56
+ :unauthorized_path
53
57
 
54
58
  # Defaults
55
59
  #
@@ -60,6 +64,7 @@ module Alchemy
60
64
  @@login_path = "/login"
61
65
  @@logout_path = "/logout"
62
66
  @@logout_method = "delete"
67
+ @@unauthorized_path = "/"
63
68
 
64
69
  # Returns the user class
65
70
  #
@@ -59,15 +59,17 @@ module Alchemy
59
59
  Site.current = current_alchemy_site
60
60
  end
61
61
 
62
- # Sets the current language for Alchemy.
62
+ # Try to find and stores current language for Alchemy.
63
63
  #
64
64
  def set_alchemy_language(lang = nil)
65
65
  @language = if lang
66
66
  lang.is_a?(Language) ? lang : load_alchemy_language_from_id_or_code(lang)
67
67
  else
68
- load_alchemy_language_from_params || Language.default
68
+ # find the best language and remember it for later
69
+ load_alchemy_language_from_params ||
70
+ load_alchemy_language_from_session ||
71
+ Language.default
69
72
  end
70
-
71
73
  store_current_alchemy_language(@language)
72
74
  end
73
75
 
@@ -78,15 +80,26 @@ module Alchemy
78
80
  end
79
81
  end
80
82
 
83
+ # Load language from session if it's present on current site.
84
+ # Otherwise return nil so we can load the default language from current site.
85
+ def load_alchemy_language_from_session
86
+ if session[:alchemy_language_id].present? && Site.current
87
+ Site.current.languages.find_by(id: session[:alchemy_language_id])
88
+ end
89
+ end
90
+
81
91
  def load_alchemy_language_from_id_or_code(id_or_code)
82
92
  Language.find_by(id: id_or_code) ||
83
93
  Language.find_by_code(id_or_code)
84
94
  end
85
95
 
86
- # Stores language in +Language.current+
96
+ # Stores language's id in the session.
97
+ #
98
+ # Also stores language in +Language.current+
87
99
  #
88
100
  def store_current_alchemy_language(language)
89
101
  if language&.id
102
+ session[:alchemy_language_id] = language.id
90
103
  Language.current = language
91
104
  end
92
105
  end
@@ -0,0 +1,5 @@
1
+ module Alchemy
2
+ class LiveReloadWatcher < RailsLiveReload::Watcher
3
+ def root = Alchemy::Engine.root
4
+ end
5
+ end
@@ -46,8 +46,8 @@ module Alchemy
46
46
  initializer "alchemy.ransack" do
47
47
  Ransack.configure do |config|
48
48
  config.custom_arrows = {
49
- up_arrow: '<i class="fa fas fa-xs fa-arrow-up"></i>',
50
- down_arrow: '<i class="fa fas fa-xs fa-arrow-down"></i>'
49
+ up_arrow: '<i class="ri-1x ri-arrow-up-line"></i>',
50
+ down_arrow: '<i class="ri-1x ri-arrow-down-line"></i>'
51
51
  }
52
52
  end
53
53
  end
@@ -59,6 +59,12 @@ module Alchemy
59
59
  Alchemy.user_class.stampable(stamper_class_name: Alchemy.user_class.name)
60
60
  end
61
61
  end
62
+
63
+ if defined?(RailsLiveReload) && Rails.env.development?
64
+ require "alchemy/dev_support/live_reload_watcher"
65
+
66
+ Alchemy::LiveReloadWatcher.init
67
+ end
62
68
  end
63
69
 
64
70
  initializer "alchemy.webp-mime_type" do