osu-cascades/ecotone-web

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

Summary

Maintainability
Test Coverage
- content_for_title('Mycorrhizal Fungi Samples')
- content_for(:subnav) do
  = link_to('Add Sample', new_mycorrhizal_fungi_sample_path, class: 'button primary', title: 'Add a new mycorrhizal fungi sample', method: 'get')

= paginate @mycorrhizal_fungi_samples

%section
  %table.table.list
    %thead
      %tr
        %th{scope: 'col'} ID
        %th{scope: 'col'} Collection Date
        %th{scope: 'col'} Plot
        %th{scope: 'col'} Sample Length (cm)
        %th{scope: 'col'} Magnification
        %th{scope: 'col'} Vesicle Count
        %th{scope: 'col'} Arbuscule Count
        %th{scope: 'col'} Visible Hyphae?
        %th{scope: 'col'} Hyphae Coverage
    %tbody
      - @mycorrhizal_fungi_samples.each do |sample|
        %tr{:onclick => "location.href='#{url_for(sample)}'"}
          %td= sample.id
          %td= sample.datestamp
          %td= sample.plot
          %td= "#{sample.length}cm"
          %td= sample.magnification
          %td= sample.vesicle_count
          %td= sample.arbuscule_count
          %td= sample.visible_hyphae ? 'Yes' : 'No'
          %td= sample.hyphae_coverage ? "#{sample.hyphae_coverage}%" : 'unmeasured'

= paginate @mycorrhizal_fungi_samples