effective_pages 3.9.0 → 3.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/effective/pages/_menu.html.haml +17 -16
- data/lib/effective_pages/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27068cf38aee344c7a13bfca4c21f5c5076c65df506085efc3c51c7ed3ebb88c
|
4
|
+
data.tar.gz: ccc55fbf35ace55fa7243f3236305e5a847287a8397874e737513f33fdde1f24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5cfd09bc93c3caa960614850e26e877db3a754d4136ef427d645f376108cf5a5797deb4b089694865b618769344705481b9451aa22e5b848eeb5bd55239326b
|
7
|
+
data.tar.gz: 4a3b0af8da3d99f927a18322e7aefce5b080c4d22e2c8cd1633d1000093f3e0a4b6ecfc26c73e9aedfbb5789191902afa75ab4feb72aaefb8120abc0092512b3
|
@@ -1,21 +1,22 @@
|
|
1
1
|
- raise('expected a menu') unless menu.present?
|
2
2
|
- menu = menu.to_s
|
3
3
|
|
4
|
-
|
5
|
-
-
|
6
|
-
-
|
7
|
-
|
8
|
-
|
4
|
+
= cache([menu, current_user, Effective::Page.for_menu(menu).maximum(:updated_at)]) do
|
5
|
+
- # Renders menu_root? level pages and their immediate children
|
6
|
+
- Effective::Page.for_menu_root(menu).each do |page|
|
7
|
+
- next unless EffectiveResources.authorized?(self, :show, page)
|
8
|
+
- next if (page.authenticate_user || page.roles.present?) && current_user.blank?
|
9
|
+
- next if page.roles.present? && (current_user.roles & page.roles).blank?
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
- if page.menu_children_blank?
|
12
|
+
= nav_link_to(page.menu_to_s, (page.menu_url.presence || effective_pages.page_path(page)))
|
13
|
+
- else
|
14
|
+
= nav_dropdown(page.menu_to_s, groups: true) do
|
15
|
+
- page.menu_children.group_by { |menu| menu.menu_group.presence }.each do |menu_group, pages|
|
16
|
+
= nav_dropdown_group(menu_group || '') do
|
17
|
+
- pages.each do |page|
|
18
|
+
- next unless EffectiveResources.authorized?(self, :show, page)
|
19
|
+
- next if (page.authenticate_user || page.roles.present?) && current_user.blank?
|
20
|
+
- next if page.roles.present? && (current_user.roles & page.roles).blank?
|
20
21
|
|
21
|
-
|
22
|
+
= nav_link_to(page.menu_to_s, (page.menu_url.presence || effective_pages.page_path(page)))
|
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
|
+
version: 3.10.0
|
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:
|
11
|
+
date: 2024-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|