alchemy_cms 8.0.7 → 8.0.9
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.
- checksums.yaml +4 -4
- data/app/components/alchemy/admin/toolbar_button.rb +1 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +1 -5
- data/app/javascript/alchemy_admin/components/update_check.js +1 -1
- data/app/javascript/alchemy_admin/link_dialog.js +6 -1
- data/app/models/alchemy/page/page_scopes.rb +0 -12
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +3 -2
- data/config/locales/alchemy.en.yml +1 -0
- data/lib/alchemy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a00a8f3556d609e587ee9ec45f8b877a26120b96747dad71527ead0cfceb15ee
|
|
4
|
+
data.tar.gz: 2697a8cdb6dd4833cd6c1dd88446a016ab96da9973023a2762be158619ad2287
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1793f28be9c58f9a7629b6fbb64137765b9a8f8812eba6af30683e3b11099cb30b4314ebd167aafd1fbe213ec0024158dba615e74d2cca8f26a283b2af827b6
|
|
7
|
+
data.tar.gz: bed3d07492cfed653cd1bc563031ffc50c8224e2e497bec0c6979eea37ffa8fd49c115581cf8fe3663a455570a0cd617d9215578a5c947ac92667e7f5173f9f6
|
|
@@ -106,7 +106,7 @@ module Alchemy
|
|
|
106
106
|
action_controller = url.delete_prefix("/").split("/")
|
|
107
107
|
[
|
|
108
108
|
action_controller.last.to_sym,
|
|
109
|
-
action_controller[0
|
|
109
|
+
action_controller[0..-2].join("_").to_sym
|
|
110
110
|
]
|
|
111
111
|
end
|
|
112
112
|
end
|
|
@@ -217,11 +217,7 @@ module Alchemy
|
|
|
217
217
|
end
|
|
218
218
|
|
|
219
219
|
def flush
|
|
220
|
-
@current_language.pages.
|
|
221
|
-
# We need to ensure, that also all layoutpages get the +published_at+ timestamp set,
|
|
222
|
-
# but not set to public true, because the cache_key for an element is +published_at+
|
|
223
|
-
# and we don't want the layout pages to be present in +Page.published+ scope.
|
|
224
|
-
@current_language.pages.flushable_layoutpages.update_all(published_at: Time.current)
|
|
220
|
+
PageVersion.where(page_id: @current_language.pages.select(:id)).published.touch_all
|
|
225
221
|
respond_to { |format| format.js }
|
|
226
222
|
end
|
|
227
223
|
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { translate } from "alchemy_admin/i18n"
|
|
2
2
|
import { Dialog } from "alchemy_admin/dialog"
|
|
3
3
|
|
|
4
|
+
// Matches a URL fragment (#anchor) at the end of a string.
|
|
5
|
+
// Covers RFC 3986 unreserved characters (ALPHA, DIGIT, "-", ".", "_", "~")
|
|
6
|
+
// which are the characters valid in URL fragments and common in DOM element IDs.
|
|
7
|
+
const ANCHOR_REGEX = /#[\w.~-]+$/
|
|
8
|
+
|
|
4
9
|
// Represents the link Dialog that appears, if a user clicks the link buttons
|
|
5
10
|
// in TinyMCE or on an Ingredient that has links enabled (e.g. Picture)
|
|
6
11
|
//
|
|
@@ -103,7 +108,7 @@ export class LinkDialog extends Dialog {
|
|
|
103
108
|
|
|
104
109
|
if (linkType === "internal" && elementAnchor.value !== "") {
|
|
105
110
|
// remove possible fragments on the url and attach the fragment (which contains the #)
|
|
106
|
-
url = url.replace(
|
|
111
|
+
url = url.replace(ANCHOR_REGEX, "") + elementAnchor.value
|
|
107
112
|
} else if (linkType === "external" && !url.match(Alchemy.link_url_regexp)) {
|
|
108
113
|
// show validation error and prevent link creation
|
|
109
114
|
this.#showValidationError()
|
|
@@ -78,18 +78,6 @@ module Alchemy
|
|
|
78
78
|
#
|
|
79
79
|
scope :contentpages, -> { where(layoutpage: [false, nil]) }
|
|
80
80
|
|
|
81
|
-
# Returns all public contentpages that are not locked.
|
|
82
|
-
#
|
|
83
|
-
# Used for flushing all pages caches at once.
|
|
84
|
-
#
|
|
85
|
-
scope :flushables, -> { not_locked.published.contentpages }
|
|
86
|
-
|
|
87
|
-
# Returns all layoutpages that are not locked.
|
|
88
|
-
#
|
|
89
|
-
# Used for flushing all pages caches at once.
|
|
90
|
-
#
|
|
91
|
-
scope :flushable_layoutpages, -> { not_locked.layoutpages }
|
|
92
|
-
|
|
93
81
|
# All searchable pages
|
|
94
82
|
#
|
|
95
83
|
scope :searchables, -> { not_restricted.published.contentpages }
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
alchemy.flush_admin_pages_path,
|
|
24
24
|
remote: true,
|
|
25
25
|
method: :post,
|
|
26
|
-
class: "icon_button
|
|
27
|
-
title: Alchemy.t("Flush page cache")
|
|
26
|
+
class: "icon_button",
|
|
27
|
+
title: Alchemy.t("Flush page cache"),
|
|
28
|
+
"data-turbo-confirm": Alchemy.t(:confirm_to_flush_cache)
|
|
28
29
|
) %>
|
|
29
30
|
</sl-tooltip>
|
|
30
31
|
</div>
|
|
@@ -391,6 +391,7 @@ en:
|
|
|
391
391
|
confirm_to_delete_menu: "Do you really want to delete this menu?"
|
|
392
392
|
confirm_to_delete_node: "Do you really want to delete this menu node?"
|
|
393
393
|
confirm_to_delete_page: "Do you really want to delete this page?"
|
|
394
|
+
confirm_to_flush_cache: "Do you really want to flush the page cache? This will might take a while and can make first page requests slow."
|
|
394
395
|
ingredient_validations_headline: "Please check marked fields below"
|
|
395
396
|
copy: "copy"
|
|
396
397
|
copy_element: "Copy this element"
|
data/lib/alchemy/version.rb
CHANGED