mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-29 19:26:30 -04:00
* Pull in openfarm icons, photos, info * Truncating member location * tidying up harvest display, and reducing duplication in css styles * Tiny crop chip * only show crop charts if there is data to show * Make the styles more Growstuff * Fixed links to openfarm * Updating specs to cope with new photo sources fix broken garden timeline on some pages * Update homepage blurb * Import crop companions * More fluid page * use thumbnail unless the source is flickr * Messing with homepage * Added crop growing_degree_days * expect full size url on photos helper spec * formatted dates from seeds#show * tidy up places#show * Move progress bar * Quicker buttons for approve/reject crops * Remove kaminari gem * use crop cards on hierarchy page * more crops on crops#index * Wrap photo creation in transaction * Wrap crop companions in a transaction
53 lines
1.8 KiB
Plaintext
53 lines
1.8 KiB
Plaintext
- content_for :title, "#{ENV['GROWSTUFF_SITE_NAME']} community near #{@place}"
|
|
- content_for :opengraph do
|
|
= tag("meta", property: "og:title", content: "#{ENV['GROWSTUFF_SITE_NAME']} community near #{@place}")
|
|
= tag("meta", property: "og:type", content: "website")
|
|
= tag("meta", property: "og:url", content: request.original_url)
|
|
= tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])
|
|
|
|
|
|
%h1 #{ENV['GROWSTUFF_SITE_NAME']} community near #{@place}
|
|
= render partial: 'search_form'
|
|
|
|
%section.map#placesmap{ style: "height:300px" }
|
|
|
|
%section.members
|
|
%h2#members= "Nearby members"
|
|
|
|
- if @nearby_members.any?
|
|
.index-cards.members
|
|
- @nearby_members.first(30).each do |member|
|
|
= render partial: "members/thumbnail", locals: { member: member }
|
|
- else
|
|
%p No nearby members
|
|
= link_to "View all members >>", members_path
|
|
|
|
%section.seeds
|
|
%h2#seeds Seeds available for trade near #{@place}
|
|
- crop_id = []
|
|
- @nearby_members.first(10).each do |member|
|
|
- member.seeds.first(5).each do |seed|
|
|
- crop_id.push seed.crop.id
|
|
- if crop_id.present?
|
|
.index-cards.crops
|
|
- crop_id.uniq.first(20).each do |crop|
|
|
= render partial: "crops/thumbnail", locals: { crop: Crop.find(crop) }
|
|
- else
|
|
%p No nearby seeds found
|
|
= link_to "View all seeds >>", seeds_path
|
|
|
|
%section#plantings
|
|
%h2 Recent plantings near #{@place}
|
|
|
|
- plantings = []
|
|
- @nearby_members.first(10).each do |member|
|
|
- member.plantings.first(5).each do |planting|
|
|
- plantings << planting
|
|
- if plantings.any?
|
|
.index-cards.plantings
|
|
- plantings.first(10).each.with_index do |planting, index|
|
|
= render partial: "plantings/card", locals: { planting: planting, index: index }
|
|
- else
|
|
%p No nearby plantings found
|
|
= link_to "View all plantings >>", plantings_path
|