radiant-relations-extension 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,12 +5,12 @@ module RelationsHelper
|
|
5
5
|
if @page && @page.field('relations_target_parent_id')
|
6
6
|
options.concat build_tree(Page.find(@page.field('relations_target_parent_id').content), [])
|
7
7
|
else
|
8
|
-
options.concat
|
8
|
+
options.concat build_relations_tree(Page.root, [])
|
9
9
|
end
|
10
10
|
options_for_select(options, selected)
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def build_relations_tree(page, list, level = 0)
|
14
14
|
label = "#{'-'*level} #{page.title}"
|
15
15
|
id = page.id
|
16
16
|
list << [label, id]
|
@@ -19,7 +19,7 @@ module RelationsHelper
|
|
19
19
|
return list if Radiant::Config["relations.exclude_archive_children"] && page.class_name =~ /ArchivePage/
|
20
20
|
|
21
21
|
page.children.each do |p|
|
22
|
-
|
22
|
+
build_relations_tree p, list, level + 1
|
23
23
|
end
|
24
24
|
list
|
25
25
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-relations-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2019-02-21 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: Allows you to define relations between pages
|
16
16
|
email:
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- lib/tasks/relations_extension_tasks.rake
|
38
38
|
- public/javascripts/admin/relations.js
|
39
39
|
- public/stylesheets/sass/admin/relations.sass
|
40
|
+
- radiant-relations-extension-1.2.3.gem
|
40
41
|
- radiant-relations-extension.gemspec
|
41
42
|
- Rakefile
|
42
43
|
- README
|
@@ -46,7 +47,7 @@ files:
|
|
46
47
|
homepage: http://github.com/jomz/radiant-relations-extension
|
47
48
|
licenses: []
|
48
49
|
post_install_message: ! "\n Add this to your radiant project by putting this line
|
49
|
-
in your Gemfile:\n gem \"radiant-relations-extension\", \"~> 1.2.
|
50
|
+
in your Gemfile:\n gem \"radiant-relations-extension\", \"~> 1.2.4\"\n "
|
50
51
|
rdoc_options: []
|
51
52
|
require_paths:
|
52
53
|
- lib
|
@@ -64,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
65
|
version: '0'
|
65
66
|
requirements: []
|
66
67
|
rubyforge_project:
|
67
|
-
rubygems_version: 1.8.
|
68
|
+
rubygems_version: 1.8.23.2
|
68
69
|
signing_key:
|
69
70
|
specification_version: 3
|
70
71
|
summary: Relations extension for Radiant CMS
|
@@ -73,3 +74,4 @@ test_files:
|
|
73
74
|
- spec/spec_helper.rb
|
74
75
|
- features/support/env.rb
|
75
76
|
- features/support/paths.rb
|
77
|
+
has_rdoc:
|