conte_rails_template 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,21 @@
1
1
  module ConteRailsTemplate
2
- class BreadcrumbsRenderer < SimpleNavigation::Renderer::Breadcrumbs
2
+ class BreadcrumbsRenderer < SimpleNavigation::Renderer::Base
3
3
  def render(item_container)
4
- contents = a_tags.inject([]) do |list, item|
5
- list << content_tag(:li, item.html_safe)
4
+ a_tag(item_container).join.html_safe
5
+ end
6
+
7
+ protected
8
+
9
+ def a_tag(item_container)
10
+ item_container.items.inject([]) do |list, item|
11
+ if item.selected?
12
+ list << content_tag(:li, tag_for(item)) if item.selected?
13
+ if include_sub_navigation?(item)
14
+ list.concat a_tags(item.sub_navigation)
15
+ end
16
+ end
6
17
  list
7
18
  end
8
- contents.join('').html_safe
9
19
  end
10
20
  end
11
21
  end
@@ -1,3 +1,3 @@
1
1
  module ConteRailsTemplate
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -0,0 +1 @@
1
+ <li><%= link_to render_icon_and_text_content('icon-home', t('labels.home')), "#{request.protocol}#{request.host_with_port}"%></li>
@@ -0,0 +1 @@
1
+ <li><%= render_navigation(level: 1..2, renderer: :breadcrumbs_renderer) %></li>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conte_rails_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
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: 2013-01-20 00:00:00.000000000 Z
12
+ date: 2013-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -111,6 +111,8 @@ files:
111
111
  - lib/generators/conte_rails_template/templates/navigation_renderers.rb
112
112
  - lib/generators/conte_rails_template/templates/session.html.erb
113
113
  - lib/generators/conte_rails_template/templates/shared/_breadcrumbs_default.html.erb
114
+ - lib/generators/conte_rails_template/templates/shared/_breadcrumbs_home.html.erb
115
+ - lib/generators/conte_rails_template/templates/shared/_breadcrumbs_navigation.html.erb
114
116
  - lib/generators/conte_rails_template/templates/shared/_notification.html.erb
115
117
  - lib/generators/conte_rails_template/templates/shared/_page_toolbar.html.erb
116
118
  - lib/generators/conte_rails_template/templates/simple_navigation.rb