Sha256: be43434584c9330dbeaa7b11ad49f1d707c06738f77a7ce1516936af7abdd109

Contents?: true

Size: 1.76 KB

Versions: 6

Compression:

Stored size: 1.76 KB

Contents

%table
  %thead
    %tr
      - model.columns(:display).each do |column|
        %th= sort_link_to(model, column)
      - unless model.disabled?(:edit) && model.disabled?(:delete)
        %th Actions
  %tbody
    - records.each do |record|
      %tr{:class=>cycle('odd', 'even')}
        - model.columns(:display).each do |column|
          %td= model.column_linked?(column) ? link_to(sanitize(model.display_for(record, column.name).to_s), url_for(:controller => 'admin/kitsune/records', :action => :show, :model_id => model.object_class, :id => record.id)): sanitize(model.display_for(record, column.name).to_s)
        - unless model.disabled?(:edit) && model.disabled?(:delete)
          %td
            - unless model.disabled?(:edit)
              - if parent
                = link_to 'Edit', :controller => 'admin/kitsune/records', :action => :edit, :model_id => model.object_class, :id => record.id, (parent.class.to_s.underscore+'_id').to_sym => parent.id
              - else
                = link_to 'Edit', :controller => 'admin/kitsune/records', :action => :edit, :model_id => model.object_class, :id => record.id
            - unless model.disabled?(:edit) || model.disabled?(:delete)
              \- 
            - unless model.disabled?(:delete)
              - if parent
                = link_to('Delete', url_for(:controller => 'admin/kitsune/records', :model_id => model.object_class, :id => record.id, :action => :destroy, :redirect => (parent.class.to_s.underscore+'_id'), :redirect_id => parent.id), :method => :delete, :confirm => "Are you sure?")
              - else
                = link_to('Delete', url_for(:controller => 'admin/kitsune/records', :model_id => model.object_class, :id => record.id, :action => :destroy), :method => :delete, :confirm => "Are you sure?")

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ds-kitsune-0.2.5 app/views/admin/kitsune/records/_list.html.haml
ds-kitsune-0.2.3 app/views/admin/kitsune/records/_list.html.haml
kitsune-0.2.1 app/views/admin/kitsune/records/_list.html.haml
kitsune-0.2.0 app/views/admin/kitsune/records/_list.html.haml
kitsune-0.1.5 app/views/admin/kitsune/records/_list.html.haml
kitsune-0.1.4 app/views/admin/kitsune/records/_list.html.haml