lato_cms 3.3.1 → 3.3.2
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e39b95b3bcd7038dad5c229ad58e5039cbba9f87797e1c153c04127c55929a10
|
|
4
|
+
data.tar.gz: 50f97a9ad2c97a2f666677862886246239569006c31a29931c0982c04bf1b793
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 515fa7907877c2c2bf947cbd9c25a6a63995d3dfa0c4d24af5107f59c1b0f2affbac40363f48876cef825a756a1d7088465efda2cef24919aee59c05a380580a
|
|
7
|
+
data.tar.gz: e06fe86049de921b9c37771dca89631bf2de9047e923bcbcf6cbedc775a663431ddc602ad5d8533d28d32cdf2e8abe3a226417a6513d1044f0106085c97e18cf
|
|
@@ -11,7 +11,10 @@ module LatoCms
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def show
|
|
14
|
-
|
|
14
|
+
# PageField#as_json serializes both the through association and the
|
|
15
|
+
# Active Storage attachments. Preload the complete graph here so a
|
|
16
|
+
# page with many media fields does not issue one query per field/media.
|
|
17
|
+
@page.fields.includes(media: %i[file_attachment poster_file_attachment]).load
|
|
15
18
|
render json: @page.as_json(include_fields: true)
|
|
16
19
|
end
|
|
17
20
|
|
|
@@ -22,7 +22,7 @@ module LatoCms
|
|
|
22
22
|
def lato_cms_page_actions(page, show_edit: false, show_delete: false, hide_show: false)
|
|
23
23
|
btn_group = capture do
|
|
24
24
|
content_tag(:div, class: 'btn-group btn-group-sm') do
|
|
25
|
-
concat(link_to(t('lato_cms.
|
|
25
|
+
concat(link_to(t('lato_cms.cta_edit'), lato_cms.pages_show_path(page), class: 'btn btn-primary')) unless hide_show
|
|
26
26
|
if show_edit
|
|
27
27
|
concat link_to(t('lato_cms.cta_edit'), lato_cms.pages_update_path(page), class: 'btn btn-secondary',
|
|
28
28
|
data: { lato_action_target: 'trigger', turbo_frame: dom_id(page, 'form'), action_title: t('lato_cms.page_update_title') })
|
|
@@ -82,7 +82,7 @@ module LatoCms
|
|
|
82
82
|
concat content_tag(:li, content_tag(:span, t('lato_cms.action_view_frontend'), class: 'dropdown-item disabled text-muted'))
|
|
83
83
|
end
|
|
84
84
|
unless hide_show
|
|
85
|
-
concat content_tag(:li, link_to(t('lato_cms.
|
|
85
|
+
concat content_tag(:li, link_to(t('lato_cms.cta_edit'), lato_cms.pages_show_path(page), class: 'dropdown-item'))
|
|
86
86
|
end
|
|
87
87
|
if show_edit
|
|
88
88
|
concat content_tag(:li, link_to(t('lato_cms.cta_edit'), lato_cms.pages_update_path(page), class: 'dropdown-item',
|
data/lib/lato_cms/version.rb
CHANGED