Module: RulesEngineView::Navigate
- Defined in:
- lib/rules_engine_view/navigate.rb
Instance Method Summary collapse
Instance Method Details
#re_breadcrumbs(*links) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rules_engine_view/navigate.rb', line 4 def *links return if links.empty? result = ''.html_safe result << '<div class="re-breadcrumbs">'.html_safe links[0 ... -1].each do |link| result << link result << "<span class='re-breadcrumbs-seperator'>></span>".html_safe end result << "<em>".html_safe result << links[-1] result << "</em>".html_safe # result << "<span class='re-breadcrumbs-seperator'>></span>" if links[-1] == links[0] result << '</div>'.html_safe result end |
#re_breadcrumbs_right(*links) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/rules_engine_view/navigate.rb', line 20 def *links return if links.empty? result = ''.html_safe result << '<div class="re-breadcrumbs">'.html_safe links[0 ... -2].each do |link| result << link result << "<span class='re-breadcrumbs-seperator'>></span>".html_safe end result << "<em>".html_safe result << links[-2] result << "</em>".html_safe # result << "<span class='re-breadcrumbs-seperator'>></span>" if links[-2] == links[0] result << "<div class='re-breadcrumb-right'>".html_safe result << links[-1] result << "</div>".html_safe result << '</div>'.html_safe result end |