makandra-navy 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/lib/navy/renderer.rb +4 -2
- data/lib/navy/section_activator.rb +1 -1
- data/lib/navy/version.rb +1 -1
- data/lib/navy.rb +1 -0
- metadata +8 -7
data/lib/navy/renderer.rb
CHANGED
@@ -9,6 +9,7 @@ module Navy
|
|
9
9
|
@html_to_append = []
|
10
10
|
@id_counter = 0
|
11
11
|
@collapse = options[:collapse]
|
12
|
+
@name = options[:name]
|
12
13
|
end
|
13
14
|
|
14
15
|
def next_id
|
@@ -17,7 +18,8 @@ module Navy
|
|
17
18
|
|
18
19
|
|
19
20
|
def render_navigation(navigation)
|
20
|
-
|
21
|
+
name = @name || navigation.name
|
22
|
+
div_tag(:id => "navy-#{name}-navigation", :class => 'navy-navigation') do
|
21
23
|
html = ''.html_safe
|
22
24
|
html << render_section_container(navigation, 1)
|
23
25
|
@html_to_append.each do |append|
|
@@ -85,7 +87,7 @@ module Navy
|
|
85
87
|
end
|
86
88
|
end
|
87
89
|
label << section.label
|
88
|
-
link_to(label, section.url, :class => link_classes.join(' '), :"data-navy-opens" => id)
|
90
|
+
link_to(label, section.url, :class => link_classes.join(' '), :"data-navy-opens" => id, 'data-navy-section' => section.name)
|
89
91
|
end
|
90
92
|
|
91
93
|
|
data/lib/navy/version.rb
CHANGED
data/lib/navy.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: makandra-navy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tobias Kraze
|
@@ -16,7 +16,8 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-
|
19
|
+
date: 2012-05-08 00:00:00 +02:00
|
20
|
+
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
22
23
|
name: actionpack
|
@@ -61,6 +62,7 @@ files:
|
|
61
62
|
- lib/navy/section_parser.rb
|
62
63
|
- lib/navy/version.rb
|
63
64
|
- navy.gemspec
|
65
|
+
has_rdoc: true
|
64
66
|
homepage: ""
|
65
67
|
licenses: []
|
66
68
|
|
@@ -90,10 +92,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
92
|
requirements: []
|
91
93
|
|
92
94
|
rubyforge_project: navy
|
93
|
-
rubygems_version: 1.
|
95
|
+
rubygems_version: 1.3.9.4
|
94
96
|
signing_key:
|
95
97
|
specification_version: 3
|
96
98
|
summary: Comprehensive solution for multi-level horizontal navigation bars.
|
97
99
|
test_files: []
|
98
100
|
|
99
|
-
has_rdoc:
|