Sha256: 3ff80a35ce9238875d39ebba5777064d5a1897d8f969ccbaa7e11e475c9805f5

Contents?: true

Size: 1.3 KB

Versions: 20

Compression:

Stored size: 1.3 KB

Contents

- object = delete_notice

%li{style: 'display:block; margin-top:10px'}
  %span.label.label-default= @abstract_model.pretty_name
  - wording = object.send(@model_config.object_label_method)
  - if show_action = action(:show, @abstract_model, object)
    = link_to(wording, url_for(action: show_action.action_name, model_name: @abstract_model.to_param, id: object.id), class: 'pjax')
  - else
    = wording
  %ul
    - @abstract_model.each_associated_children(object) do |association, children|
      - humanized_association = @abstract_model.model.human_attribute_name association.name
      - limit = children.count > 12 ? 10 : children.count
      - children.first(limit).each do |child|
        = content_tag :li, class: dom_class(child) do
          - child_config = RailsAdmin.config(child)
          = humanized_association.singularize
          - wording = child.send(child_config.object_label_method)
          - if child.id && (show_action = action(:show, child_config.abstract_model, child))
            = link_to(wording, url_for(action: show_action.action_name, model_name: child_config.abstract_model.to_param, id: child.id), class: 'pjax')
          - else
            = wording
      - if children.count > limit
        %li= t('admin.misc.more', count: children.count - limit, models_name: humanized_association)

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rails_admin-2.3.1 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-2.3.0 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-2.2.1 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-2.2.0 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-2.1.1 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-2.1.0 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-2.0.2 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-1.4.3 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-2.0.1 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-2.0.0 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-2.0.0.rc app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-2.0.0.beta app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-1.4.2 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-1.4.1 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-1.4.0 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-1.3.0 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-1.2.0 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-1.1.1 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-1.1.0 app/views/rails_admin/main/_delete_notice.html.haml
rails_admin-1.0.0 app/views/rails_admin/main/_delete_notice.html.haml