radiant-copy_move-extension 2.3.4 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.textile +7 -0
- data/VERSION +1 -1
- data/app/helpers/copy_move_helper.rb +4 -0
- data/app/views/admin/pages/_copy_move_form.html.haml +4 -1
- data/radiant-copy_move-extension.gemspec +6 -5
- data/spec/controllers/copy_move_controller_spec.rb +3 -3
- data/spec/models/copy_move_spec.rb +3 -3
- metadata +6 -7
- data/pkg/radiant-copy_move-extension-2.3.3.gem +0 -0
data/README.textile
CHANGED
@@ -55,6 +55,13 @@ h2. Usage
|
|
55
55
|
|
56
56
|
See the HELP.rdoc
|
57
57
|
|
58
|
+
For larger sites, you may want to exclude certain pages from coming up in the "new parent" select for performance and/or usability reasons.
|
59
|
+
There are 2 options:
|
60
|
+
|
61
|
+
1/ Create a page field called "exclude_children_from_copy_move_target" to not display it's children in the list.
|
62
|
+
2/ Set Radiant::Config["copy_move.exclude_archive_children"] to true to not display children from ArchivePages
|
63
|
+
|
64
|
+
|
58
65
|
h2. Contributors
|
59
66
|
|
60
67
|
* Benny Degezelle
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.0
|
@@ -11,6 +11,10 @@ module CopyMoveHelper
|
|
11
11
|
label = "#{'-'*level}#{page.title}"
|
12
12
|
id = page.id
|
13
13
|
list << [label, id]
|
14
|
+
|
15
|
+
return list if page.fields.select{|f| f.name == "exclude_children_from_copy_move_target"}.any?
|
16
|
+
return list if Radiant::Config["copy_move.exclude_archive_children"] && page.class_name =~ /ArchivePage/
|
17
|
+
|
14
18
|
page.children.each do |p|
|
15
19
|
build_tree p, list, level + 1
|
16
20
|
end
|
@@ -3,7 +3,10 @@
|
|
3
3
|
%p
|
4
4
|
%label= "Page: #{@page.title} ( #{@page.path} )"
|
5
5
|
%p
|
6
|
-
|
6
|
+
- if @page.parent
|
7
|
+
%label= "Parent: #{@page.parent.title} ( #{@page.parent.path} )"
|
8
|
+
- else
|
9
|
+
%label= "Parent: none"
|
7
10
|
%hr
|
8
11
|
%p
|
9
12
|
%label{:for => 'parent_id'}
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{radiant-copy_move-extension}
|
8
|
-
s.version = "2.
|
8
|
+
s.version = "2.4.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Benny Degezelle", "Andrew vonderLuft"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-05-12}
|
13
13
|
s.description = %q{With this extension you can copy or move a page with or without its children.}
|
14
14
|
s.email = %q{benny@gorilla-webdesign.be}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -63,15 +63,16 @@ Gem::Specification.new do |s|
|
|
63
63
|
]
|
64
64
|
|
65
65
|
if s.respond_to? :specification_version then
|
66
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
66
67
|
s.specification_version = 3
|
67
68
|
|
68
69
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
69
|
-
s.add_runtime_dependency(%q<radiant>, [">= 0.
|
70
|
+
s.add_runtime_dependency(%q<radiant>, [">= 1.0.0"])
|
70
71
|
else
|
71
|
-
s.add_dependency(%q<radiant>, [">= 0.
|
72
|
+
s.add_dependency(%q<radiant>, [">= 1.0.0"])
|
72
73
|
end
|
73
74
|
else
|
74
|
-
s.add_dependency(%q<radiant>, [">= 0.
|
75
|
+
s.add_dependency(%q<radiant>, [">= 1.0.0"])
|
75
76
|
end
|
76
77
|
end
|
77
78
|
|
@@ -56,11 +56,11 @@ describe Admin::PagesController do
|
|
56
56
|
|
57
57
|
describe "POST to /admin/pages/:id/copy_children" do
|
58
58
|
before :each do
|
59
|
-
post :copy_children, :id => page_id(:
|
59
|
+
post :copy_children, :id => page_id(:parent), :parent_id => page_id(:another)
|
60
60
|
end
|
61
61
|
|
62
62
|
it "should load the page" do
|
63
|
-
assigns[:page].should == pages(:
|
63
|
+
assigns[:page].should == pages(:parent)
|
64
64
|
end
|
65
65
|
|
66
66
|
it "should load the parent page" do
|
@@ -72,7 +72,7 @@ describe Admin::PagesController do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
it "should have copied the children" do
|
75
|
-
assigns[:new_page].should have(
|
75
|
+
assigns[:new_page].should have(3).children
|
76
76
|
end
|
77
77
|
|
78
78
|
it "should write a flash notice" do
|
@@ -66,10 +66,10 @@ describe CopyMove do
|
|
66
66
|
|
67
67
|
describe "copying the page with first-level children" do
|
68
68
|
it "should copy the page and its children" do
|
69
|
-
@page = pages(:
|
69
|
+
@page = pages(:parent)
|
70
70
|
@new_page = @page.copy_with_children_to(pages(:first))
|
71
71
|
@new_page.parent.should == pages(:first)
|
72
|
-
@new_page.should have(
|
72
|
+
@new_page.should have(3).children
|
73
73
|
end
|
74
74
|
|
75
75
|
it "should not copy grandchild pages" do
|
@@ -80,7 +80,7 @@ describe CopyMove do
|
|
80
80
|
end
|
81
81
|
|
82
82
|
it "should override the status when given" do
|
83
|
-
@page = pages(:
|
83
|
+
@page = pages(:parent)
|
84
84
|
@new_page = @page.copy_with_children_to(pages(:first), Status[:hidden].id)
|
85
85
|
@new_page.status.should == Status[:hidden]
|
86
86
|
@new_page.children.each do |child|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-copy_move-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 31
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
|
-
- 3
|
9
8
|
- 4
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 2.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Benny Degezelle
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-05-12 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -69,7 +69,6 @@ files:
|
|
69
69
|
- lib/copy_move/controller.rb
|
70
70
|
- lib/copy_move/model.rb
|
71
71
|
- lib/tasks/copy_move_extension_tasks.rake
|
72
|
-
- pkg/radiant-copy_move-extension-2.3.3.gem
|
73
72
|
- public/images/admin/copy-move.png
|
74
73
|
- public/images/admin/page_white.png
|
75
74
|
- public/images/admin/page_white_copy.png
|
@@ -110,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
109
|
requirements: []
|
111
110
|
|
112
111
|
rubyforge_project:
|
113
|
-
rubygems_version: 1.
|
112
|
+
rubygems_version: 1.3.7
|
114
113
|
signing_key:
|
115
114
|
specification_version: 3
|
116
115
|
summary: Copy/Move extension for Radiant CMS
|
Binary file
|