Sha256: 676b38b1f3c7a7777b071e5a333de9d890b41a1df3257aaaed38448c366a898e

Contents?: true

Size: 1.77 KB

Versions: 8

Compression:

Stored size: 1.77 KB

Contents

= breadcrumb[:current] 
- puts '###############################'
- puts breadcrumb[:parent_object].nil?
- puts breadcrumb[:parent_object].present?
- puts breadcrumb[:parent_object].class.name
- puts breadcrumb[:resource]
- puts '###############################'
%ul.dropdown-menu
  - if breadcrumb[:parent_object].present?
    - if breadcrumb[:parent_object].respond_to?(breadcrumb[:resource])
      - breadcrumb[:parent_object].send(breadcrumb[:resource]).limit(limit).each do |resource|
        %li= link_to resource, {controller: breadcrumb[:resource], action: 'show', id: resource} if can?(:read, resource)
      - - total_breadcrumb_data = breadcrumb[:parent_object].send(breadcrumb[:resource]).count
      - if total_breadcrumb_data > limit
        %li= link_to "- - #{t('see_all')} (#{total_breadcrumb_data} data) - -".html_safe, {controller: breadcrumb[:resource], action: 'index', "#{breadcrumb[:parent_object].class.name.underscore}_id" => breadcrumb[:parent_object].id} if can?(:read, breadcrumb[:resource].classify.constantize)
    - else
      - resource = breadcrumb[:parent_object].send(breadcrumb[:resource].singularize)
      %li= link_to resource, {controller: breadcrumb[:resource], action: 'show', id: resource} if can?(:read, resource)
  - else
    - breadcrumb[:resource].classify.constantize.limit(limit).each do |parent_resource|
      %li= link_to parent_resource, {controller: breadcrumb[:resource], action: 'show', id: parent_resource} if can?(:read, parent_resource)
    - total_breadcrumb_data = breadcrumb[:resource].classify.constantize.count
    - if total_breadcrumb_data > limit
      %li= link_to "- - #{t('see_all')} (#{total_breadcrumb_data} data) - -".html_safe, {controller: breadcrumb[:resource], action: 'index'} if can?(:read, breadcrumb[:resource].classify.constantize)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rich_table_component-0.0.30 app/views/rich_table_component/component/_breadcrumbs_dropdown.html.haml
rich_table_component-0.0.29 app/views/rich_table_component/component/_breadcrumbs_dropdown.html.haml
rich_table_component-0.0.28 app/views/rich_table_component/component/_breadcrumbs_dropdown.html.haml
rich_table_component-0.0.27 app/views/rich_table_component/component/_breadcrumbs_dropdown.html.haml
rich_table_component-0.0.26 app/views/rich_table_component/component/_breadcrumbs_dropdown.html.haml
rich_table_component-0.0.24 app/views/rich_table_component/component/_breadcrumbs_dropdown.html.haml
rich_table_component-0.0.22 app/views/rich_table_component/component/_breadcrumbs_dropdown.html.haml
rich_table_component-0.0.21 app/views/rich_table_component/component/_breadcrumbs_dropdown.html.haml