From e9bf29f2977335199885ed5fe4198b582e92782c Mon Sep 17 00:00:00 2001 From: Didier Lafforgue Date: Fri, 23 Mar 2012 00:41:04 +0100 Subject: [PATCH] the last commit broke the test suite: fixed now --- lib/locomotive/liquid/tags/nav.rb | 33 +++++++++++---------- spec/lib/locomotive/liquid/tags/nav_spec.rb | 2 +- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/lib/locomotive/liquid/tags/nav.rb b/lib/locomotive/liquid/tags/nav.rb index 81178c19..7dd2fbbe 100644 --- a/lib/locomotive/liquid/tags/nav.rb +++ b/lib/locomotive/liquid/tags/nav.rb @@ -56,8 +56,8 @@ module Locomotive output = children_output.join("\n") if @options[:no_wrapper] != 'true' - list_class = !@options[:class].blank? ? %( class="#{@options[:class]}") : '' - output = %{} + list_class = !@options[:class].blank? ? %( class="#{@options[:class]}") : '' + output = %{} end output @@ -90,20 +90,18 @@ module Locomotive label = %{#{icon if @options[:icon] != 'after' }#{title}#{icon if @options[:icon] == 'after' }} - dropdow = "" - link_options = "" - href = "/#{page.fullpath}" - caret = "" + link_options = caret = '' + href = "/#{page.fullpath}" - if render_children_for_page?(page, depth) && @options[:bootstrap] == "true" - dropdow = "dropdown" - link_options = %{class="dropdown-toggle" data-toogle="dropdown"} - href = "#" - caret = %{} + if render_children_for_page?(page, depth) && bootstrap? + css += ' dropdown' + link_options = %{ class="dropdown-toggle" data-toogle="dropdown"} + href = '#' + caret = %{ } end - output = %{} @@ -120,7 +118,7 @@ module Locomotive children = page.children_with_minimal_attributes( @options[:add_attributes] ).reject { |c| !include_page?(c) } if children.present? - output = %{