Class: Proscenium::UI::Breadcrumbs::Component

Inherits:
Component show all
Extended by:
Literal::Properties
Includes:
Phlex::Rails::Helpers::URLFor
Defined in:
lib/proscenium/ui/breadcrumbs/component.rb

Instance Method Summary collapse

Methods inherited from Phlex

inherited, sideload_assets

Methods included from Phlex::AssetInclusions

#include_assets, #include_javascripts, #include_stylesheets

Methods included from Phlex::CssModules

#after_template, #before_template, included, #process_attributes

Methods included from CssModule

#class_names, #css_module

Methods included from SourcePath

included

Instance Method Details

#view_templateObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/proscenium/ui/breadcrumbs/component.rb', line 16

def view_template
  div class: :@base do
    ol do
      if @with_home
        li do
          home_template
        end
      end

      breadcrumbs.each do |ce|
        li do
          path = ce.path
          path.nil? ? ce.name : a(href: url_for(path)) { ce.name }
        end
      end
    end
  end
end