radiant-archive_tabs-extension 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,8 @@ class ArchiveTabsExtension < Radiant::Extension
7
7
 
8
8
  def activate
9
9
  ApplicationHelper.send :include, ArchiveTabs::ApplicationHelper
10
+ MenuRenderer.send :include, ArchiveTabs::Admin::MenuRenderer
11
+
10
12
  Admin::NodeHelper.send :include, ArchiveTabs::Admin::NodeHelper
11
13
  Admin::PagesController.send :include, ArchiveTabs::Admin::PagesController
12
14
 
@@ -0,0 +1,20 @@
1
+ module ArchiveTabs
2
+ module Admin
3
+ module MenuRenderer
4
+ # Shouldn't need to alias_method_chain the MenuRenderer. Something to fix in the future.
5
+ def self.included(base)
6
+ base.class_eval do
7
+ alias_method_chain :add_child_disabled?, :archive
8
+ end
9
+ end
10
+
11
+ def add_child_disabled_with_archive?
12
+ if respond_to?(:parent) && parent.class == ArchivePage
13
+ true
14
+ else
15
+ add_child_disabled_without_archive?
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -6,7 +6,6 @@ module ArchiveTabs
6
6
  alias_method_chain :expanded, :archive
7
7
  alias_method_chain :expander, :archive
8
8
  alias_method_chain :children_class, :archive
9
- alias_method_chain :children_for, :archive
10
9
  end
11
10
  end
12
11
 
@@ -24,11 +23,6 @@ module ArchiveTabs
24
23
  def children_class_with_archive
25
24
  archive_page?(@current_node) ? ' no_children' : children_class_without_archive
26
25
  end
27
-
28
- # Disable adding children on the index page, admin/pages/:page_id/children
29
- def children_for_with_archive(page)
30
- page.respond_to?(:parent) && archive_page?(page.parent) ? [] : children_for_without_archive(page)
31
- end
32
26
  end
33
27
  end
34
28
  end
@@ -1,5 +1,5 @@
1
1
  module RadiantArchiveTabsExtension
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  SUMMARY = "Archive tabs extension for Radiant CMS"
4
4
  DESCRIPTION = "Display Archive pages in their own paginated tab."
5
5
  URL = "https://github.com/jsntv200/radiant-archive_tabs-extension"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-archive_tabs-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 5
10
- version: 1.0.5
9
+ - 6
10
+ version: 1.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Taylor
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-01 00:00:00 +10:00
19
- default_executable:
18
+ date: 2011-11-16 00:00:00 Z
20
19
  dependencies: []
21
20
 
22
21
  description: Display Archive pages in their own paginated tab.
@@ -33,6 +32,7 @@ files:
33
32
  - app/views/admin/pages/archive_index.html.haml
34
33
  - archive_tabs_extension.rb
35
34
  - config/locales/en.yml
35
+ - lib/archive_tabs/admin/menu_renderer.rb
36
36
  - lib/archive_tabs/admin/node_helper.rb
37
37
  - lib/archive_tabs/admin/pages_controller.rb
38
38
  - lib/archive_tabs/application_helper.rb
@@ -46,7 +46,6 @@ files:
46
46
  - spec/helpers/admin/node_helper_spec.rb
47
47
  - spec/spec.opts
48
48
  - spec/spec_helper.rb
49
- has_rdoc: true
50
49
  homepage: https://github.com/jsntv200/radiant-archive_tabs-extension
51
50
  licenses: []
52
51
 
@@ -76,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
75
  requirements: []
77
76
 
78
77
  rubyforge_project:
79
- rubygems_version: 1.5.0
78
+ rubygems_version: 1.8.10
80
79
  signing_key:
81
80
  specification_version: 3
82
81
  summary: Archive tabs extension for Radiant CMS