radiant-navigation-extension 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/navigation/tags/core.rb +11 -4
- data/lib/navigation/tags/helpers.rb +2 -2
- data/radiant-navigation-extension.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.2
|
data/lib/navigation/tags/core.rb
CHANGED
@@ -40,8 +40,8 @@ module Navigation
|
|
40
40
|
css_class = [("current" if tag.locals.page == root), "first"].compact
|
41
41
|
first_set = true
|
42
42
|
|
43
|
-
tree << %{<li class=
|
44
|
-
tree << %{<a href="#{root.url}" id=
|
43
|
+
tree << %{<li#{" class='#{css_class.join(' ')}'" unless css_class.empty?}#{" id='#{(root.slug == '/' ? 'home' : root.slug)}'" if tag.attr['ids_for_lis']}>}
|
44
|
+
tree << %{<a href="#{root.url}"#{" id='link_#{(child_page.slug == '/' ? 'home' : root.slug)}'" if tag.attr['ids_for_links']}>}
|
45
45
|
tree << %{#{root.breadcrumb}}
|
46
46
|
tree << %{</a></li>}
|
47
47
|
end
|
@@ -53,6 +53,13 @@ module Navigation
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
['only','except','expand_all','include_root'].each do |key| #'root','depth'
|
57
|
+
tag.attr.delete(key)
|
58
|
+
end
|
59
|
+
|
60
|
+
tag.attr.delete('only')
|
61
|
+
tag.attr.delete('except')
|
62
|
+
|
56
63
|
if tag.attr
|
57
64
|
html_options = tag.attr.stringify_keys
|
58
65
|
tag_options = tag_options(html_options)
|
@@ -60,9 +67,9 @@ module Navigation
|
|
60
67
|
tag_options = nil
|
61
68
|
end
|
62
69
|
|
63
|
-
%{<
|
70
|
+
%{<ol#{tag_options}>
|
64
71
|
#{tree}
|
65
|
-
</
|
72
|
+
</ol>}
|
66
73
|
|
67
74
|
end
|
68
75
|
|
@@ -19,8 +19,8 @@ module Navigation
|
|
19
19
|
css_class << "parent_of_current" if current_page.url.starts_with?(child_page.url) and current_page != child_page
|
20
20
|
css_class.compact!
|
21
21
|
|
22
|
-
r = %{<li class=
|
23
|
-
r << %{<a href="#{child_page.url}" id=
|
22
|
+
r = %{<li#{" class='#{css_class.join(' ')}'" unless css_class.empty?}#{" id='nav_#{child_page.slug}'" if tag.attr['ids_for_lis']}>}
|
23
|
+
r << %{<a href="#{child_page.url}"#{" id='link_#{(child_page.slug == '/' ? 'home' : child_page.slug)}'" if tag.attr['ids_for_links']}>}
|
24
24
|
r << %{#{child_page.breadcrumb}}
|
25
25
|
r << %{</a>}
|
26
26
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{radiant-navigation-extension}
|
8
|
-
s.version = "2.0.
|
8
|
+
s.version = "2.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Phil Schilter", "Dirk Kelly"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-navigation-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 2
|
10
|
+
version: 2.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Phil Schilter
|