- @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, Activity)
      %th.action-links

  - @attributes = @attributes - ['name', 'client_id', 'project_state_id']
  %tbody
    - collection.each do |r|
      %tr
        %td= link_to r.name, r, {'data-href-container' => '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, Activity), new_project_activity_url(r)
        %td.action-links
          = list_link_for(:show, r)
          = list_link_for(:edit, r)
          = list_link_for(:delete, r)

- @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.action-links

  - @attributes = @attributes - ['name', 'client_id', 'project_state_id']
  %tbody
    - collection.each do |r|
      %tr
        %td= link_to r.name, r, {'data-href-container' => 'tr'}
        - @attributes.each do |field|
          %td= r.send(field) if r.respond_to?(field)
        %td= r.client
        %td= r.project_state
        %td.action-links
          = list_link_for(:show, r)
          = list_link_for(:edit, r)
          = list_link_for(:delete, r)

Drop direct action to create new activity in project list.
Drop direct action to create new activity in project list.
