Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the biomass estimate and temperature labels to include units #248

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/biodiversity_reports/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
= form.label :diversity_index, 'Shannon-Wiener Diversity Index'
= form.text_field :diversity_index, class: 'form-control'
.data
= form.label :biomass_estimate, 'Biomass Estimate'
= form.label :biomass_estimate, 'Biomass Estimate (grams per square meter)'
= form.text_field :biomass_estimate, class: 'form-control'
= render 'layouts/image_gallery', {form: form, entity: @biodiversity_report, phrase: 'Include reference pictures for the report'}
= render 'layouts/form_buttons', form: form
4 changes: 2 additions & 2 deletions app/views/biodiversity_reports/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
%th{scope: 'col'} ID
%th{scope: 'col'} Measured On
%th{scope: 'col'} Plot
%th{scope: 'col'} Temperature
%th{scope: 'col'} Temperature (celsius)
%th{scope: 'col'} Species Richness
%th{scope: 'col'} Diversity Index
%th{scope: 'col'} Species Evenness
%th{scope: 'col'} Biomass Estimate
%th{scope: 'col'} Biomass Estimate (grams per square meter)
%tbody
- @biodiversity_reports.each do |report|
%tr{:onclick => "location.href='#{url_for(report)}'"}
Expand Down
6 changes: 3 additions & 3 deletions app/views/biodiversity_reports/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
%th{scope: 'row'} Plot
%td= link_to(@biodiversity_report.plot)
%tr
%th{scope: 'row'} Temperature
%th{scope: 'row'} Temperature (celsius)
%td= @biodiversity_report.temperature
%tr
%th{scope: 'row'} Species Richness
Expand All @@ -37,7 +37,7 @@
%th{scope: 'row'} Species Evenness
%td= @biodiversity_report.species_evenness
%tr
%th{scope: 'row'} Biomass Estimate
%th{scope: 'row'} Biomass Estimate (grams per square meter)
%td= @biodiversity_report.biomass_estimate

- if @biodiversity_reports
Expand All @@ -61,4 +61,4 @@
%td= report.measured_on.to_formatted_s(:long)
%td= report.temperature
%td= report.species_richness
%td= report.diversity_index
%td= report.diversity_index
2 changes: 1 addition & 1 deletion app/views/plant_samples/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
= form.label :percent_cover, 'Coverage'
= form.text_field :percent_cover, class: 'form-control'
.data
= form.label :biomass_estimate, 'Biomass Estimate'
= form.label :biomass_estimate, 'Biomass Estimate (grams per square meter)'
= form.text_field :biomass_estimate, class: 'form-control'
= render 'layouts/image_gallery', {form: form, entity: @plant_sample, phrase: 'Include reference pictures for the sample'}
= render 'layouts/form_buttons', {form: form, text: 'Sample'}
Expand Down
2 changes: 1 addition & 1 deletion app/views/plant_samples/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
%th{scope: 'row'} Percent Cover
%td= @plant_sample.percent_cover
%tr
%th{scope: 'row'} Biomass Estimate
%th{scope: 'row'} Biomass Estimate (grams per square meter)
%td= @plant_sample.biomass_estimate
2 changes: 1 addition & 1 deletion app/views/plots/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
%thead
%tr
%th{scope: 'col'} Measured On
%th{scope: 'col'} Temperature
%th{scope: 'col'} Temperature (grams per square meter)
%th{scope: 'col'} Species Richness
%th{scope: 'col'} Diversity Index
%tbody
Expand Down
2 changes: 1 addition & 1 deletion spec/features/user_creates_biodiversity_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
fill_in('Species Richness', with: '10')
fill_in('Shannon-Wiener Diversity Index', with: '5.0')
fill_in('Species Evenness', with: '0.5')
fill_in('Biomass Estimate', with: '1.0')
fill_in('Biomass Estimate (grams per square meter)', with: '1.0')
click_button('Create Report')
expect(page).to have_selector '.alert', text: 'Biodiversity report was successfully created.'
end
Expand Down
2 changes: 1 addition & 1 deletion spec/features/user_creates_plant_sample_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
select('Plant Example', from: 'Plant')
fill_in('Abundance', with: 1)
fill_in('Coverage', with: 1)
fill_in('Biomass Estimate', with: 1.0)
fill_in('Biomass Estimate (grams per square meter)', with: 1.0)
click_on('Create Sample')
expect(page).to have_content('Plant sample was successfully created')
end
Expand Down