tenon 1.0.14 → 1.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/tenon/nav_helper.rb +3 -3
- data/app/views/tenon/shared/_main_nav.html.haml +1 -1
- data/lib/tenon/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1113d2e336c7bb39401c7000d5adf08482d2523
|
4
|
+
data.tar.gz: 502bfd2c4086090b8cb25a3fd66ac84240757ca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 206b38bca3565c932cd9ed1ca0c9877dc12989dfa558eca04e03c758d318477a925ffbd92d4b0aa1be648d5f32ae814b3ead53f83e7a5dd57e71ebe5fed12687
|
7
|
+
data.tar.gz: 51f8fb44d61453d1016138a075eb135cc9954cceffe188a0d8f8d6b874118b867a5133db7e332298549f2082a892881b1b4a0103defbfead4e2dfc418aae341f
|
@@ -21,13 +21,13 @@ module Tenon
|
|
21
21
|
content += text
|
22
22
|
opts[:class] ||= ''
|
23
23
|
opts[:title] ||= text
|
24
|
-
opts[:class] += " #{active_class(path)}"
|
24
|
+
opts[:class] += " #{active_class(path, opts[:active])}"
|
25
25
|
link_to(content, path, opts)
|
26
26
|
end
|
27
27
|
|
28
|
-
def active_class(path)
|
28
|
+
def active_class(path, active)
|
29
29
|
path = url_for(path).split('/')[0..2].join('/')[1..-1]
|
30
|
-
'active' if path == controller_path
|
30
|
+
'active' if active || path == controller_path
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
= nav_item 'Asset Library', assets_path, 'picture-o'
|
6
6
|
= nav_item 'Comments', comments_path, 'comment'
|
7
7
|
= nav_item 'Pages', pages_path, 'file'
|
8
|
-
= nav_item 'Posts', posts_path, 'file-text'
|
8
|
+
= nav_item 'Posts', posts_path, 'file-text', active: ['post_categories'].include?(controller_name)
|
9
9
|
= nav_item 'Users', users_path, 'user'
|
10
10
|
= nav_item 'Events', events_path, 'calendar'
|
11
11
|
= nav_item 'Galleries', galleries_path, 'th'
|
data/lib/tenon/version.rb
CHANGED