diff --git a/app/views/crops/_find_seeds.html.haml b/app/views/crops/_find_seeds.html.haml
index 9b7797144..66990ed69 100644
--- a/app/views/crops/_find_seeds.html.haml
+++ b/app/views/crops/_find_seeds.html.haml
@@ -1,4 +1,4 @@
-%h4 Find seeds
+%h4 Find #{ crop.name } seeds
- if crop.seeds.empty?
%p
There are no seeds available to trade.
diff --git a/app/views/crops/_harvests.html.haml b/app/views/crops/_harvests.html.haml
index bac61e580..003e72bfa 100644
--- a/app/views/crops/_harvests.html.haml
+++ b/app/views/crops/_harvests.html.haml
@@ -1,4 +1,4 @@
-%h4 Harvests
+%h4 #{ crop.name.capitalize } harvests
- if crop.harvests.empty?
%p
Nobody has harvested this crop yet.
diff --git a/app/views/crops/_plantings.html.haml b/app/views/crops/_plantings.html.haml
index 85a2ff88a..621a6d125 100644
--- a/app/views/crops/_plantings.html.haml
+++ b/app/views/crops/_plantings.html.haml
@@ -1,4 +1,4 @@
-%h4 Plantings
+%h4 See who's planted #{ crop.name.pluralize }
- if crop.plantings.empty?
%p
Nobody has planted this crop yet.
diff --git a/app/views/crops/show.html.haml b/app/views/crops/show.html.haml
index 7aae050c7..8ef425ecd 100644
--- a/app/views/crops/show.html.haml
+++ b/app/views/crops/show.html.haml
@@ -13,6 +13,8 @@
.row
.col-md-9
+ - unless current_member
+ Learn how to grow #{ @crop.name.pluralize } from growers around the world. #{ ENV['GROWSTUFF_SITE_NAME'] } has tips and advice from real-life growers, including when to plant #{ @crop.name.pluralize }, how to harvest #{ @crop.name.pluralize }, and more.
= render :partial => 'photos', :locals => { :crop => @crop }
@@ -34,37 +36,46 @@
%div#cropmap
%a{:name => 'posts'}
- %div.pagination
- = page_entries_info @posts, :model => "posts"
- = will_paginate @posts, :params => {:anchor => "posts"}
+ %h2 What people are saying about #{ @crop.name.pluralize }
- - unless @posts.empty?
+ - if @posts.empty?
+ %p
+ Nobody has posted about #{ @crop.name.pluralize } yet.
+ %p
+ - if can? :create, Post
+ = link_to "Post something", new_post_path, :class => 'btn btn-default'
+ - else
+ = render :partial => "shared/signin_signup", :locals => { :to => "post your tips and experiences growing #{ @crop.name.pluralize }" }
+ - else
+ %div.pagination
+ = page_entries_info @posts, :model => "posts"
+ = will_paginate @posts, :params => {:anchor => "posts"}
- @posts.each do |post|
= render :partial => "posts/single", :locals => { :post => post, :subject => true }
- %div.pagination
- = page_entries_info @posts, :model => "posts"
- = will_paginate @posts, :params => {:anchor => "posts"}
+ %div.pagination
+ = page_entries_info @posts, :model => "posts"
+ = will_paginate @posts, :params => {:anchor => "posts"}
.col-md-3
= render :partial => 'wrangle', :locals => { :crop => @crop }
- = render :partial => 'scientific_names', :locals => { :crop => @crop }
- = render :partial => 'alternate_names', :locals => { :crop => @crop }
- %h4 Planting advice
+ %h4 How to grow #{ @crop.name.pluralize }
= render :partial => 'grown_for', :locals => { :crop => @crop }
= render :partial => 'planting_advice', :locals => { :crop => @crop }
- %h4 Varieties
+ = render :partial => 'scientific_names', :locals => { :crop => @crop }
+ = render :partial => 'alternate_names', :locals => { :crop => @crop }
+
+ %h4 #{ @crop.name.capitalize } varieties
= render :partial => 'varieties', :locals => { :crop => @crop }
-
- %h4 More information
- %ul
- %li= link_to 'Wikipedia (English)', @crop.en_wikipedia_url
-
= render :partial => 'plantings', :locals => { :crop => @crop }
= render :partial => 'harvests', :locals => { :crop => @crop }
= render :partial => 'find_seeds', :locals => { :crop => @crop }
+
+ %h4 Learn more about #{ @crop.name.pluralize }
+ %ul
+ %li= link_to 'Wikipedia (English)', @crop.en_wikipedia_url
diff --git a/spec/features/crops/crop_detail_page_spec.rb b/spec/features/crops/crop_detail_page_spec.rb
index a9740c131..437d3e786 100644
--- a/spec/features/crops/crop_detail_page_spec.rb
+++ b/spec/features/crops/crop_detail_page_spec.rb
@@ -28,5 +28,34 @@ feature "crop detail page" do
end
end
+
+ context "SEO" do
+
+ background do
+ visit crop_path(crop)
+ end
+
+ scenario "has seed heading with SEO" do
+ expect(page).to have_content "Find #{ crop.name } seeds"
+ end
+
+ scenario "has harvest heading with SEO" do
+ expect(page).to have_content "#{ crop.name.capitalize } harvests"
+ end
+
+ scenario "has planting heading with SEO" do
+ expect(page).to have_content "See who's planted #{ crop.name.pluralize }"
+ end
+
+ scenario "has planting advice with SEO" do
+ expect(page).to have_content "How to grow #{ crop.name }"
+ end
+
+ scenario "has a link to Wikipedia with SEO" do
+ expect(page).to have_content "Learn more about #{ crop.name }"
+ expect(page).to have_link "Wikipedia (English)", crop.en_wikipedia_url
+ end
+
+ end
end
end