para 0.8.13 → 0.8.14
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: 4fdbe5ef6d030b3f6aca6f18209211742914f15de7965bc583190a4480921e0e
|
4
|
+
data.tar.gz: aa514928922edf16906fb54f40027a9afc208e5327c00e1fee34ac24c66bb748
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 242dee3461cd57765d4f3b57e32073cb0a30a863e6bb59858891b621c989a36a1c189924bd78f237b25cc6890149816ab9a4f189b9d093465f7483664f525ac7
|
7
|
+
data.tar.gz: a15d5cdab40b3a00b46401b405bd007774bc119dceaf7d6f8423808a2673fafc2e5abf20961bf5176892e6ba670e88c61637d3d9d4a6f10a63ffae3b4f90b5f5
|
@@ -5,8 +5,10 @@ module Para
|
|
5
5
|
#
|
6
6
|
def admin_component_sections
|
7
7
|
@admin_component_sections ||= begin
|
8
|
-
Para::ComponentSection.ordered.includes(:components)
|
9
|
-
|
8
|
+
sections = Para::ComponentSection.ordered.includes(:components, :parent_component)
|
9
|
+
|
10
|
+
sections.tap do |loaded_sections|
|
11
|
+
loaded_sections.flat_map(&:components).each(&method(:decorate))
|
10
12
|
end
|
11
13
|
end
|
12
14
|
end
|
@@ -19,9 +19,13 @@ module Para
|
|
19
19
|
attributes = model_field_mappings(model).fields
|
20
20
|
relation = options.fetch(:relation, model.name.to_s.underscore.pluralize)
|
21
21
|
allow_adding_resource = options.fetch(:addable, true)
|
22
|
+
force_list = options.fetch(:force_list, false)
|
22
23
|
|
23
|
-
partial = :
|
24
|
-
|
24
|
+
partial = if !force_list && model.respond_to?(:roots) && can?(:tree, model)
|
25
|
+
:tree
|
26
|
+
else
|
27
|
+
:list
|
28
|
+
end
|
25
29
|
|
26
30
|
render(
|
27
31
|
partial: find_partial_for(relation, partial),
|
@@ -15,7 +15,7 @@
|
|
15
15
|
%ul.component-section-list-items.collapse.in{ id: "collapse-section-#{index}" }
|
16
16
|
- component_section.components.each do |component|
|
17
17
|
- if can?(:manage, component) && show_component?(component)
|
18
|
-
%li.component-item{ class: (@component == component) && 'active' }
|
18
|
+
%li.component-item{ class: (@component == component || @component.parent_component == component) && 'active' }
|
19
19
|
= link_to component.main_navigation_name, component.path
|
20
20
|
|
21
21
|
- else
|
data/lib/para/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: para
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valentin Ballestrino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|