osu-cascades/ecotone-web

View on GitHub
app/views/lichen_samples/index.html.haml

Summary

Maintainability
Test Coverage
- content_for_title('Lichen Samples')
- content_for(:subnav) do
  = link_to('Add Sample', new_lichen_sample_path, class: 'button primary', title: 'Add a new lichen sample', method: 'get')

= paginate @lichen_samples

%section
  %table.table.list
    %thead
      %tr
        %th{scope: 'col'} ID
        %th{scope: 'col'} Collection Date
        %th{scope: 'col'} Plot
        %th{scope: 'col'} Location in Plot
        %th{scope: 'col'} Description
    %tbody
      - @lichen_samples.each do |sample|
        %tr{:onclick => "location.href='#{url_for(sample)}'"}
          %td= sample.id
          %td= sample.datestamp
          %td= sample.plot
          %td= sample.location_within_plot
          %td= sample.description

= paginate @lichen_samples