radiant-templates-extension 1.0.7 → 1.0.8

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 CHANGED
@@ -9,6 +9,7 @@ The current version of the Templates extension is intended for use with Radiant
9
9
 
10
10
  h2. Version History
11
11
 
12
+ * 1.0.8 - added template selector to add_child dropdown on Admin Page index
12
13
  * 1.0.7 - fixed spec deprecations, confirmed compatible with Radiant 1.1.3
13
14
  * 1.0.0 - gemified by Andrew vonderLuft, March 2011
14
15
  * 0.9 - Radiant 0.9 Blade UI, i18n additions Andrew vonderLuft, January 2011 -
@@ -20,8 +21,6 @@ h2. Version History
20
21
 
21
22
  h3. To do
22
23
 
23
- * add template selectors to Add Child dropdown in Admin Page index
24
-
25
24
  h3. Installation
26
25
 
27
26
  h4. Using bundler
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.7
1
+ 1.0.8
@@ -54,6 +54,7 @@ module Templates::Helper
54
54
  field_html.join("\n")
55
55
  end
56
56
 
57
+ # For Radiant before MenuRenderer implemented
57
58
  def child_menu_for(page)
58
59
  children = children_for(page)
59
60
  templates = Template.all
@@ -76,5 +77,22 @@ module Templates::Helper
76
77
  end
77
78
  end
78
79
  end
80
+
81
+ # For Radiant after MenuRenderer implemented
82
+ MenuRenderer.module_eval do
83
+ def template_items
84
+ result = []
85
+ Template.all.each { |template| result << template_item(template) }.compact
86
+ result
87
+ end
88
+ def template_item(template)
89
+ title = "Add child using '#{template.name}' Template"
90
+ path = new_admin_page_child_path(self, :template => template)
91
+ view.content_tag :li, view.link_to(view.image('template') + ' ' + template.name, path, :title => title )
92
+ end
93
+ def menu_items
94
+ template_items + [separator_item, default_child_item] + child_items
95
+ end
96
+ end
79
97
 
80
98
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "radiant-templates-extension"
8
- s.version = "1.0.7"
8
+ s.version = "1.0.8"
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 = "2013-02-20"
12
+ s.date = "2013-03-04"
13
13
  s.description = "Imposes structure on pages via content templates."
14
14
  s.email = "avonderluft@avlux.net"
15
15
  s.extra_rdoc_files = [
@@ -144,7 +144,7 @@ Gem::Specification.new do |s|
144
144
  ]
145
145
  s.homepage = "https://github.com/avonderluft/radiant-templates-extension"
146
146
  s.require_paths = ["lib"]
147
- s.rubygems_version = "1.8.24"
147
+ s.rubygems_version = "1.8.25"
148
148
  s.summary = "Templates Extension for Radiant CMS"
149
149
 
150
150
  if s.respond_to? :specification_version then
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: 25
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 7
10
- version: 1.0.7
9
+ - 8
10
+ version: 1.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew vonderLuft
@@ -16,16 +16,15 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2013-02-20 00:00:00 Z
19
+ date: 2013-03-04 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- prerelease: false
23
22
  requirement: &id001 !ruby/object:Gem::Requirement
24
23
  none: false
25
24
  requirements:
26
25
  - - ">="
27
26
  - !ruby/object:Gem::Version
28
- hash: 2988022751
27
+ hash: -2271628246
29
28
  segments:
30
29
  - 1
31
30
  - 0
@@ -33,9 +32,10 @@ dependencies:
33
32
  - rc
34
33
  - 2
35
34
  version: 1.0.0.rc2
36
- type: :runtime
37
- name: radiant
38
35
  version_requirements: *id001
36
+ name: radiant
37
+ prerelease: false
38
+ type: :runtime
39
39
  description: Imposes structure on pages via content templates.
40
40
  email: avonderluft@avlux.net
41
41
  executables: []
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  requirements: []
200
200
 
201
201
  rubyforge_project:
202
- rubygems_version: 1.8.24
202
+ rubygems_version: 1.8.25
203
203
  signing_key:
204
204
  specification_version: 3
205
205
  summary: Templates Extension for Radiant CMS