radiant-templates-extension 1.0.4 → 1.0.5
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/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/templates/helper.rb +9 -8
- data/lib/templates/page_extensions.rb +0 -3
- data/radiant-templates-extension.gemspec +6 -6
- metadata +8 -10
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ begin
|
|
7
7
|
gem.email = "avonderluft@avlux.net"
|
8
8
|
gem.homepage = "https://github.com/avonderluft/radiant-templates-extension"
|
9
9
|
gem.authors = ['Andrew vonderLuft','Sean Cribbs']
|
10
|
-
gem.add_dependency 'radiant', ">=1.0.0
|
10
|
+
gem.add_dependency 'radiant', ">=1.0.0"
|
11
11
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
12
12
|
end
|
13
13
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.5
|
data/lib/templates/helper.rb
CHANGED
@@ -54,23 +54,24 @@ module Templates::Helper
|
|
54
54
|
field_html.join("\n")
|
55
55
|
end
|
56
56
|
|
57
|
-
def children_for(page)
|
58
|
-
page.allowed_children
|
59
|
-
end
|
60
|
-
|
61
57
|
def child_menu_for(page)
|
62
58
|
children = children_for(page)
|
59
|
+
templates = Template.all
|
60
|
+
unless children.size == 0 || templates.empty?
|
61
|
+
children << templates.unshift(:separator)
|
62
|
+
children.flatten!
|
63
|
+
end
|
63
64
|
return nil if children.size < 2
|
64
65
|
children.unshift(children.delete(page.default_child), :separator) if children.include?(page.default_child)
|
65
|
-
name_for = proc { |p| (name = p.name.to_name('Page')).blank? ? t('
|
66
|
+
name_for = proc { |p| (name = p.name.to_name('Page')).blank? ? t('normal_page') : name }
|
66
67
|
content_tag :ul, :class => 'menu', :id => "allowed_children_#{page.id}" do
|
67
68
|
children.map do |child|
|
68
69
|
if child == :separator
|
69
70
|
content_tag :li, nil, :class => 'separator'
|
71
|
+
elsif child.is_a?(Template)
|
72
|
+
content_tag :li, link_to(image('template') + ' ' + child.name, new_admin_page_child_path(page, :template => child), :title => "Add child using #{child.name} Template")
|
70
73
|
else
|
71
|
-
|
72
|
-
link = child.name.eql?("Page") ? name_for[child] : image('template') + ' ' + name_for[child]
|
73
|
-
content_tag :li, link_to(link, new_admin_page_child_path(page, :template => child), :title => info)
|
74
|
+
content_tag :li, link_to(name_for[child], new_admin_page_child_path(page, :page_class => child), :title => clean_page_description(child))
|
74
75
|
end
|
75
76
|
end
|
76
77
|
end
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{radiant-templates-extension}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andrew vonderLuft", "Sean Cribbs"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-07-18}
|
13
13
|
s.description = %q{Imposes structure on pages via content templates.}
|
14
14
|
s.email = %q{avonderluft@avlux.net}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -144,7 +144,7 @@ Gem::Specification.new do |s|
|
|
144
144
|
]
|
145
145
|
s.homepage = %q{https://github.com/avonderluft/radiant-templates-extension}
|
146
146
|
s.require_paths = ["lib"]
|
147
|
-
s.rubygems_version = %q{1.
|
147
|
+
s.rubygems_version = %q{1.5.2}
|
148
148
|
s.summary = %q{Templates Extension for Radiant CMS}
|
149
149
|
s.test_files = [
|
150
150
|
"spec/controllers/admin_page_controller_extensions_spec.rb",
|
@@ -165,12 +165,12 @@ Gem::Specification.new do |s|
|
|
165
165
|
s.specification_version = 3
|
166
166
|
|
167
167
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
168
|
-
s.add_runtime_dependency(%q<radiant>, [">= 1.0.0
|
168
|
+
s.add_runtime_dependency(%q<radiant>, [">= 1.0.0"])
|
169
169
|
else
|
170
|
-
s.add_dependency(%q<radiant>, [">= 1.0.0
|
170
|
+
s.add_dependency(%q<radiant>, [">= 1.0.0"])
|
171
171
|
end
|
172
172
|
else
|
173
|
-
s.add_dependency(%q<radiant>, [">= 1.0.0
|
173
|
+
s.add_dependency(%q<radiant>, [">= 1.0.0"])
|
174
174
|
end
|
175
175
|
end
|
176
176
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-templates-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 5
|
10
|
+
version: 1.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew vonderLuft
|
@@ -16,27 +16,25 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-07-18 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
|
-
prerelease: false
|
24
23
|
type: :runtime
|
25
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
25
|
none: false
|
27
26
|
requirements:
|
28
27
|
- - ">="
|
29
28
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
29
|
+
hash: 23
|
31
30
|
segments:
|
32
31
|
- 1
|
33
32
|
- 0
|
34
33
|
- 0
|
35
|
-
|
36
|
-
- 2
|
37
|
-
version: 1.0.0.rc2
|
34
|
+
version: 1.0.0
|
38
35
|
name: radiant
|
39
36
|
version_requirements: *id001
|
37
|
+
prerelease: false
|
40
38
|
description: Imposes structure on pages via content templates.
|
41
39
|
email: avonderluft@avlux.net
|
42
40
|
executables: []
|
@@ -201,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
199
|
requirements: []
|
202
200
|
|
203
201
|
rubyforge_project:
|
204
|
-
rubygems_version: 1.
|
202
|
+
rubygems_version: 1.5.2
|
205
203
|
signing_key:
|
206
204
|
specification_version: 3
|
207
205
|
summary: Templates Extension for Radiant CMS
|