radiant-copy_move-extension 2.4.5 → 2.4.9
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.
- checksums.yaml +7 -0
- data/HELP.rdoc +22 -3
- data/README.textile +3 -10
- data/VERSION +1 -1
- data/config/locales/fr.yml +25 -0
- data/copy_move_extension.rb +2 -2
- data/lib/copy_move/model.rb +12 -3
- data/radiant-copy_move-extension.gemspec +3 -3
- metadata +31 -55
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 78048c80a53e80c524d1a9a6c80290729cd7dc9873a81b3857c813f7bbcc57df
|
4
|
+
data.tar.gz: c030907e1dd9fd72e1fb8d8604b14d95368340eb25a6ab323d1a7e0445981cda
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1d9541a952fd47381f53c8cf7c762e94b3daf21b71e44e6b01fcff57ba8eb1bdb91a62e5a4d24ea8c5d3551ee40320a95aa2a61068b64651b0b108b10309a79d
|
7
|
+
data.tar.gz: 2a29b25a7345ce706994f149b83022756bce1321d8df02426a43f2974e4ecfc4ec70d9072e7d78bdb6ce5e7a46e5126db8c7c6c1dbd744e39e92b03703d2b0d2
|
data/HELP.rdoc
CHANGED
@@ -21,13 +21,13 @@ This will copy only the selected page, no children will be copied.
|
|
21
21
|
|
22
22
|
==== Copy 'X' and its first-level children.
|
23
23
|
|
24
|
-
This will copy the selected page and all pages one level below it in the tree.
|
24
|
+
This will copy the selected page and all pages one level below it in the tree.
|
25
25
|
|
26
26
|
==== Copy 'X' and all of its children.
|
27
27
|
|
28
|
-
This will copy the selected page and all pages below it in the tree.
|
28
|
+
This will copy the selected page and all pages below it in the tree.
|
29
29
|
|
30
|
-
==== Only move page.
|
30
|
+
==== Only move page.
|
31
31
|
|
32
32
|
Only move the page, do not create a copy, note that all pages below it in the tree wil be moved as well.
|
33
33
|
|
@@ -41,3 +41,22 @@ This allows you to set the status of the new page and all its children.
|
|
41
41
|
* If you choose the "Use the same status" option then all the pages will retain their existing statuses
|
42
42
|
* If you set to a status other than "Use the same status" then ALL the pages in the copied/moved tree will have their status changed.
|
43
43
|
|
44
|
+
== Configuration
|
45
|
+
|
46
|
+
=== Exclude pages from the new parent ('copy or move under') dropdown
|
47
|
+
|
48
|
+
For larger sites, you may want to exclude certain pages from coming up in the "new parent" select for performance and/or usability reasons.
|
49
|
+
There are 2 options:
|
50
|
+
|
51
|
+
1/ Create a page field called "exclude_children_from_copy_move_target" to not display it's children in the list.
|
52
|
+
2/ Set Radiant::Config["copy_move.exclude_archive_children"] to true to not display children from ArchivePages
|
53
|
+
|
54
|
+
=== Copy page attachments
|
55
|
+
|
56
|
+
When using the {clipped extension}[https://github.com/radiant/radiant-clipped-extension], you may want page attachments to be copied along.
|
57
|
+
To achieve this, set Radiant::Config["copy_move.copy_page_attachments"]
|
58
|
+
|
59
|
+
=== Copy related pages
|
60
|
+
|
61
|
+
When using the {relations extension}[https://github.com/jomz/radiant-relations-extension], you may want related pages to be copied alond.
|
62
|
+
To achieve this, set Radiant::Config["copy_move.copy_page_relations"]
|
data/README.textile
CHANGED
@@ -55,21 +55,14 @@ 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
|
-
|
65
58
|
h2. Contributors
|
66
59
|
|
67
60
|
* Benny Degezelle
|
68
|
-
* Mario T. Lanza
|
61
|
+
* Mario T. Lanza
|
69
62
|
* Daniel Collis-Puro
|
70
63
|
* Sean Cribbs
|
71
64
|
* Andrew vonderLuft
|
72
|
-
|
65
|
+
|
73
66
|
h2. Credits
|
74
67
|
|
75
|
-
This extension contains icons from the FamFamFam Silk icon set. See http://famfamfam.com/
|
68
|
+
This extension contains icons from the FamFamFam Silk icon set. See http://famfamfam.com/
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.4.
|
1
|
+
2.4.6
|
@@ -0,0 +1,25 @@
|
|
1
|
+
fr:
|
2
|
+
copy_move:
|
3
|
+
button: "Copier/Déplacer"
|
4
|
+
copy_or_move_page: "Copier ou déplacer Page"
|
5
|
+
copy_page: "Copier Page"
|
6
|
+
copy_page_only: "Copier cette Page seulement"
|
7
|
+
copy_page_description: "Cela va créer une copie de cette page sous un nouveau parent"
|
8
|
+
copy_whole_subtree: "Copier sous-arborescence entière"
|
9
|
+
copy_tree_description: "Cela va créer une copie de cette page et tous ses descendants sous un nouveau parent"
|
10
|
+
move_entire_subtree: "Déplacer sous-arborescence entière"
|
11
|
+
move_tree_description: "Cela va déplacer cette page et tous ses descendants sous un nouveau parent"
|
12
|
+
move_page: "Déplacer Page"
|
13
|
+
move_page_description: "Cela va déplacer cette page sous un nouveau parent"
|
14
|
+
copy_with_first_level_children: "Copier avec sous-arborescence de premiér niveau"
|
15
|
+
copy_children_description: "Cela va créer une copie de cette page et ses enfants immédiats de premier niveau sous un nouveau parent"
|
16
|
+
copied:
|
17
|
+
'Une copie de <strong>%{page}</strong> a été créé sous <strong>%{parent}</strong>.'
|
18
|
+
moved:
|
19
|
+
'Page <strong>%{page} </strong> a été déplacé sous <strong>%{parent}</strong>.'
|
20
|
+
immediate_children_copied:
|
21
|
+
'Des copies de <strong>%{page}</strong> et ses enfants immédiats ont été créés sous <strong>%{parent}</strong>'
|
22
|
+
descendants_copied:
|
23
|
+
'Des copies de <strong>%{page}</strong> et tous ses descendants ont été créés sous <strong>%{parent}</strong>.'
|
24
|
+
descendants_moved:
|
25
|
+
'Page <strong>%{page}</strong> et tous ses descendants ont été déplacés sous <strong>%{parent}</strong>.'
|
data/copy_move_extension.rb
CHANGED
@@ -11,7 +11,7 @@ class CopyMoveExtension < Radiant::Extension
|
|
11
11
|
helper :copy_move
|
12
12
|
end
|
13
13
|
Page.class_eval { include CopyMove::Model }
|
14
|
-
admin.page.index.add :sitemap_head, 'copy_move_extra_th', :
|
15
|
-
admin.page.index.add :node, 'copy_move_extra_td', :
|
14
|
+
admin.page.index.add :sitemap_head, 'copy_move_extra_th', :after => 'actions_column_header'
|
15
|
+
admin.page.index.add :node, 'copy_move_extra_td', :after => 'actions_column'
|
16
16
|
end
|
17
17
|
end
|
data/lib/copy_move/model.rb
CHANGED
@@ -5,9 +5,10 @@ module CopyMove
|
|
5
5
|
test_page.parent = parent
|
6
6
|
until test_page.valid?
|
7
7
|
index = (index || 0) + 1
|
8
|
-
|
9
|
-
test_page.
|
10
|
-
test_page.
|
8
|
+
raise "Couldn't generate new slug for #{id} under #{parent.id}: #{test_page.errors.full_messages.inspect}" if index > 100
|
9
|
+
test_page.title = "#{title} Copy #{index}".first(255)
|
10
|
+
test_page.slug = "#{slug}-copy-#{index}".first(100)
|
11
|
+
test_page.breadcrumb = test_page.title.first(160)
|
11
12
|
test_page.errors.clear # Reset error status before revalidating
|
12
13
|
end
|
13
14
|
{:slug => test_page.slug, :title => test_page.title, :breadcrumb => test_page.breadcrumb}
|
@@ -27,6 +28,14 @@ module CopyMove
|
|
27
28
|
end
|
28
29
|
new_page.send :add_to_list_bottom if defined?(Reorder)
|
29
30
|
new_page.status_id = status.blank? ? new_page.status_id : status
|
31
|
+
if self.respond_to?(:page_attachments) && Radiant::Config["copy_move.copy_page_attachments"]
|
32
|
+
self.page_attachments.each do |att|
|
33
|
+
new_page.page_attachments.build(:asset_id => att.asset_id, :position => att.position)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
if self.respond_to?(:related_page_ids) && Radiant::Config["copy_move.copy_page_relations"]
|
37
|
+
new_page.related_page_ids = self.related_page_ids
|
38
|
+
end
|
30
39
|
new_page.save!
|
31
40
|
end
|
32
41
|
end
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "radiant-copy_move-extension"
|
8
|
-
s.version = "2.4.
|
8
|
+
s.version = "2.4.9"
|
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 = "
|
12
|
+
s.date = "2021-09-08"
|
13
13
|
s.description = "With this extension you can copy or move a page with or without its children."
|
14
14
|
s.email = "benny@gorilla-webdesign.be"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
|
|
35
35
|
"config/locales/de.yml",
|
36
36
|
"config/locales/en.yml",
|
37
37
|
"config/locales/nl.yml",
|
38
|
+
"config/locales/fr.yml",
|
38
39
|
"config/routes.rb",
|
39
40
|
"copy_move_extension.rb",
|
40
41
|
"lib/copy_move.rb",
|
@@ -69,4 +70,3 @@ Gem::Specification.new do |s|
|
|
69
70
|
s.add_dependency(%q<radiant>, [">= 1.0.0.rc2"])
|
70
71
|
end
|
71
72
|
end
|
72
|
-
|
metadata
CHANGED
@@ -1,52 +1,39 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-copy_move-extension
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 4
|
9
|
-
- 5
|
10
|
-
version: 2.4.5
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.4.9
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Benny Degezelle
|
14
8
|
- Andrew vonderLuft
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
none: false
|
25
|
-
requirements:
|
12
|
+
date: 2021-09-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: radiant
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
26
18
|
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: -2414235180
|
29
|
-
segments:
|
30
|
-
- 1
|
31
|
-
- 0
|
32
|
-
- 0
|
33
|
-
- rc
|
34
|
-
- 2
|
19
|
+
- !ruby/object:Gem::Version
|
35
20
|
version: 1.0.0.rc2
|
36
21
|
type: :runtime
|
37
|
-
|
38
|
-
version_requirements:
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 1.0.0.rc2
|
39
28
|
description: With this extension you can copy or move a page with or without its children.
|
40
29
|
email: benny@gorilla-webdesign.be
|
41
30
|
executables: []
|
42
|
-
|
43
31
|
extensions: []
|
44
|
-
|
45
|
-
extra_rdoc_files:
|
32
|
+
extra_rdoc_files:
|
46
33
|
- LICENSE
|
47
34
|
- README.textile
|
48
35
|
- TODO
|
49
|
-
files:
|
36
|
+
files:
|
50
37
|
- HELP.rdoc
|
51
38
|
- LICENSE
|
52
39
|
- README.textile
|
@@ -63,6 +50,7 @@ files:
|
|
63
50
|
- app/views/admin/pages/move_page.html.haml
|
64
51
|
- config/locales/de.yml
|
65
52
|
- config/locales/en.yml
|
53
|
+
- config/locales/fr.yml
|
66
54
|
- config/locales/nl.yml
|
67
55
|
- config/routes.rb
|
68
56
|
- copy_move_extension.rb
|
@@ -82,36 +70,24 @@ files:
|
|
82
70
|
- spec/spec_helper.rb
|
83
71
|
homepage: https://github.com/jomz/radiant-copy-move
|
84
72
|
licenses: []
|
85
|
-
|
73
|
+
metadata: {}
|
86
74
|
post_install_message:
|
87
75
|
rdoc_options: []
|
88
|
-
|
89
|
-
require_paths:
|
76
|
+
require_paths:
|
90
77
|
- lib
|
91
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
-
|
93
|
-
requirements:
|
78
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
94
80
|
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
version: "0"
|
100
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
-
none: false
|
102
|
-
requirements:
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
103
85
|
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
|
106
|
-
segments:
|
107
|
-
- 0
|
108
|
-
version: "0"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
109
88
|
requirements: []
|
110
|
-
|
111
|
-
rubyforge_project:
|
112
|
-
rubygems_version: 1.8.24
|
89
|
+
rubygems_version: 3.1.6
|
113
90
|
signing_key:
|
114
91
|
specification_version: 3
|
115
92
|
summary: Copy/Move extension for Radiant CMS
|
116
93
|
test_files: []
|
117
|
-
|