app/views/plant_samples/show.html.haml
- content_for_title("Plant Sample ##{@plant_sample.id}")
- content_for(:subnav) do
.btn-public
= link_to('« Samples', plant_samples_path, class: 'button primary', method: 'get')
- if @plant_sample.editable_by?(current_user)
.btn-admin
= link_to(content_tag(:i, '', :class => "icon-edit"), edit_plant_sample_path(@plant_sample), class: 'btn-icon')
- if current_user&.admin?
= link_to(content_tag(:i, '', :class => "icon-trash"), @plant_sample, method: :delete, data: { confirm: "Delete plant sample #{@plant_sample.id}?" }, class: 'btn-icon')
.content
= render 'layouts/image_carousel', entity: @plant_sample
.info
%h2.heading#table-heading Information
%table.table#vertical-table
%thead
%th.citation.italic{colspan: '2'}= last_updated(@plant_sample)
%tbody
%tr
%th{scope: 'row'} Collection Date
%td= @plant_sample.datestamp
%tr
%th{scope: 'row'} Plot
%td= link_to("#{@plant_sample.plot}", @plant_sample.plot)
%tr
%th{scope: 'row'} Plant
%td= link_to("#{@plant_sample.plant.common_name.titleize}", @plant_sample.plant)
%tr
%th{scope: 'row'} Abundance
%td= @plant_sample.abundance
%tr
%th{scope: 'row'} Percent Cover
%td= @plant_sample.percent_cover
%tr
%th{scope: 'row'} Biomass Estimate
%td= @plant_sample.biomass_estimate