Sha256: 9eb56b3617b2b00e56485201450b663083242b0f03d88e69d9fc2780154d321a

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

- model ||= nil
- new ||= false

%section.crumbs
  %ul
    - unless item.nil?
      - item.crumbs.each do |crumb|
        %li
          %span!= "›"
          - if crumb.try(:editable?)
            %a{:href => crumb.path(:edit)}= crumb.to_s
          - else
            %strong= crumb.to_s

    - if new
      %li.new
        %span!= "›"
        %strong (Here)

  - if item.try(:sluggable?) || model.try(:sluggable?)

    .url
      .components
        %span.protocol http://
        %span.host<>= request.env['HTTP_HOST']

        - if item.try(:parent?)
          - path = item.parent.path
          - path.split('/').reject { |s| s.empty? }.each do |segment|
            %span.slash<>= "/"
            %span.path<>= segment

        %span.slash<>= "/"
        - if item
          %span.this<>= (item.slug  if item)
        - else
          %span.this<>= "..."
        %input{:type => 'text', :name => 'slug', :value => (item.slug  if item)}
      %ul.actions.js
        %li
          %a.edit{:href => '#edit'} Edit
        - if item.try(:renderable?)
          %li
            %a.ext{:href => item.path} Visit
        - if item.try(:parent?) == false
          %li
            %a{:href => '#set-as-homepage'} Set as homepage



Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aura-0.0.1.pre10 app/views/base/crumbs.haml