para 0.8.14 → 0.8.15

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: 4fdbe5ef6d030b3f6aca6f18209211742914f15de7965bc583190a4480921e0e
4
- data.tar.gz: aa514928922edf16906fb54f40027a9afc208e5327c00e1fee34ac24c66bb748
3
+ metadata.gz: eaabbc24f0c6d28e69cf3ebc0d837ffb52dc6abd1286a2ab6c23b0c8767e7a9d
4
+ data.tar.gz: 5f7e0609618d87d13d27b8132c2a6a7aa6a46e365c4dc9c7ac1a687f843ceca7
5
5
  SHA512:
6
- metadata.gz: 242dee3461cd57765d4f3b57e32073cb0a30a863e6bb59858891b621c989a36a1c189924bd78f237b25cc6890149816ab9a4f189b9d093465f7483664f525ac7
7
- data.tar.gz: a15d5cdab40b3a00b46401b405bd007774bc119dceaf7d6f8423808a2673fafc2e5abf20961bf5176892e6ba670e88c61637d3d9d4a6f10a63ffae3b4f90b5f5
6
+ metadata.gz: 2d16ba804ed07daac026531e17c0f669a2cada924db5a22d87bff4b44018c3720dcf2177600bd6133dcba9c6da97a2a0a0253e3fbe6111ae24036f12596010be
7
+ data.tar.gz: 31cf72e15c979a0b24f1aa18cb736b9d1c56b4af88057fe730b5375dd3b8e7fe4bbd034f5f38232ffb900cc6b591480dacfdff4742fdd36f23d3c56a14a116c6
@@ -25,5 +25,11 @@ module Para
25
25
  config = Para.components.component_configuration_for(component.identifier)
26
26
  !config.shown_if || instance_exec(&config.shown_if)
27
27
  end
28
+
29
+ def current_component_or_parent?(component)
30
+ return false unless @component
31
+
32
+ @component == component || @component.parent_component == component
33
+ end
28
34
  end
29
35
  end
@@ -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 || @component.parent_component == component) && 'active' }
18
+ %li.component-item{ class: ('active' if current_component_or_parent?(component)) }
19
19
  = link_to component.main_navigation_name, component.path
20
20
 
21
21
  - else
@@ -1,3 +1,3 @@
1
1
  module Para
2
- VERSION = '0.8.14'
2
+ VERSION = '0.8.15'
3
3
  end
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.14
4
+ version: 0.8.15
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-21 00:00:00.000000000 Z
11
+ date: 2020-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails