Sha256: d716b9eb960585765570e3e87746975ce424d8961af21d63b352fc4bfc8aa9fc

Contents?: true

Size: 798 Bytes

Versions: 6

Compression:

Stored size: 798 Bytes

Contents

- @attributes ||= collection.first.attribute_names - ['id', 'created_at', 'updated_at']
%table.list{:class => "#{collection.first.class.to_s.downcase.pluralize} collection"}
  %thead
    %tr
      - @attributes.each do |field|
        %th= t_attr field, collection.first.class
      %th.new-task= t_title(:new, Task)
      %th.action-links

  - @attributes = @attributes - ['client_id', 'project_state_id']
  %tbody
    - collection.each do |r|
      %tr
        - @attributes.each do |field|
          %td= r.send(field) if r.respond_to?(field)
        %td= r.client
        %td= r.project_state
        %td= link_to t_title(:new, Task), new_project_task_url(r)
        %td.action-links
          = list_link_for(:show, r)
          = list_link_for(:edit, r)
          = list_link_for(:delete, r)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bookyt_projects-0.3.2 app/views/projects/_list.html.haml
bookyt_projects-0.3.1 app/views/projects/_list.html.haml
bookyt_projects-0.3.0 app/views/projects/_list.html.haml
bookyt_projects-0.2.3 app/views/projects/_list.html.haml
bookyt_projects-0.2.2 app/views/projects/_list.html.haml
bookyt_projects-0.2.1 app/views/projects/_list.html.haml