effective_pages 3.4.12 → 3.4.13
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 370a0872726ab5cc18dca40bf8bdafaef20ac8cfc145600fa1679abe2253059f
|
4
|
+
data.tar.gz: e9e3de8d9fd1e68ee1421a96cf6a0fb15af8014421edf95493e2146d067e8f26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16f78050a37aa5785fea91281c439dd6ad275377374969569f4e5d9b34b8b287b9d930494eb91b7481f6ac29a57a42e52ea8ededfeb5775928c7e1b32188c034
|
7
|
+
data.tar.gz: cbea464d3c44f65a05b0d20bad91ea2e18d12c40968885f09fcfa9f4d80605148dfee04c3cb3e0364e72b4328de82a332a4f1f1add499278568d9d1ba749edc6
|
@@ -16,11 +16,11 @@ class EffectivePagesMenuDatatable < Effective::Datatable
|
|
16
16
|
|
17
17
|
# We only support depth 2 and 3.
|
18
18
|
col :menu_children, label: 'Children' do |page|
|
19
|
-
page.menu_children.group_by
|
19
|
+
page.menu_children.group_by { |child| child.menu_group.presence }.values.flatten.map do |child|
|
20
20
|
content_tag(:div, class: 'col-resource_item') do
|
21
21
|
link = link_to(child.menu_to_s, effective_pages.edit_admin_page_path(child))
|
22
22
|
|
23
|
-
list = child.menu_children.group_by
|
23
|
+
list = child.menu_children.group_by { |child| child.menu_group.presence }.values.flatten.map do |child|
|
24
24
|
content_tag(:li, link_to(child.menu_to_s, effective_pages.edit_admin_page_path(child)))
|
25
25
|
end
|
26
26
|
|
@@ -143,10 +143,6 @@ module Effective
|
|
143
143
|
duplicate.tap { |page| page.save! }
|
144
144
|
end
|
145
145
|
|
146
|
-
def menu_group
|
147
|
-
(menu_group ||= '')
|
148
|
-
end
|
149
|
-
|
150
146
|
# When true, this should not appear in sitemap.xml and should return 404 if visited
|
151
147
|
def menu_root_with_children?
|
152
148
|
menu_root? && menu_parent?
|
@@ -14,8 +14,8 @@
|
|
14
14
|
|
15
15
|
- if menu_children.present?
|
16
16
|
= nav_dropdown(page.menu_to_s, groups: true) do
|
17
|
-
- menu_children.group_by
|
18
|
-
= nav_dropdown_group(menu_group) do
|
17
|
+
- menu_children.group_by { |menu| menu.menu_group.presence }.each do |menu_group, pages|
|
18
|
+
= nav_dropdown_group(menu_group || '') do
|
19
19
|
- pages.each do |page|
|
20
20
|
- next unless EffectiveResources.authorized?(self, :show, page)
|
21
21
|
- next if (page.authenticate_user || page.roles.present?) && current_user.blank?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|