simple-navigation-bootstrap 0.0.3 → 0.0.4
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.rdoc
CHANGED
@@ -23,7 +23,7 @@ To create a navigation menu, you might do something like this:
|
|
23
23
|
navigation.items do |primary|
|
24
24
|
primary.item :music, 'Music', musics_path
|
25
25
|
primary.item :dvds, 'Dvds', dvds_path
|
26
|
-
primary.item :books, 'Books', :icon => [
|
26
|
+
primary.item :books, 'Books', :icon => ['icon-book', 'icon-white'] do |books|
|
27
27
|
books.item :fiction, 'Fiction', books_fiction_path
|
28
28
|
books.item :history, 'History', books_history_path
|
29
29
|
end
|
@@ -41,4 +41,5 @@ may not contain links - any links will be overwritten with a <tt>#</tt> anchor.
|
|
41
41
|
|
42
42
|
== TODO
|
43
43
|
So far, only nav markup and dropdowns are supported, may also implement
|
44
|
-
buttons and nav lists in the future.
|
44
|
+
buttons and nav lists in the future. And tests, there are currently no
|
45
|
+
tests.
|
@@ -25,6 +25,9 @@ module SimpleNavigation
|
|
25
25
|
protected
|
26
26
|
|
27
27
|
def tag_for(item, icon = nil)
|
28
|
+
unless item.url or include_sub_navigation?(item)
|
29
|
+
return item.name
|
30
|
+
end
|
28
31
|
url = item.url
|
29
32
|
link = Array.new
|
30
33
|
link << content_tag(:i, '', :class => [icon].flatten.compact.join(' ')) unless icon.nil?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-navigation-bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
segments:
|
76
76
|
- 0
|
77
|
-
hash:
|
77
|
+
hash: 3790548219355218743
|
78
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
79
|
none: false
|
80
80
|
requirements:
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
segments:
|
85
85
|
- 0
|
86
|
-
hash:
|
86
|
+
hash: 3790548219355218743
|
87
87
|
requirements: []
|
88
88
|
rubyforge_project:
|
89
89
|
rubygems_version: 1.8.24
|