mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-26 18:56:06 -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
41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
- content_for :breadcrumbs do
|
|
%li.breadcrumb-item= link_to 'Crops', crops_path
|
|
%li.breadcrumb-item.active= link_to 'Search', search_crops_path(term: @term)
|
|
|
|
- if @term
|
|
- content_for :title, "Crops matching \"#{@term}\""
|
|
%h1
|
|
Crops matching "#{@term}"
|
|
- if @crops
|
|
%span.text-muted Found #{@crops.size} total
|
|
- else
|
|
- content_for :title, "Crop search"
|
|
%h1 Crop search
|
|
|
|
= bootstrap_form_tag(url: search_crops_path, method: :get, html: { id: 'crop-search'}, layout: :inline) do |f|
|
|
= f.label :term, "Search crops:", class: 'sr-only'
|
|
= f.text_field 'term', class: 'search-query input-medium',
|
|
placeholder: 'Search crops',
|
|
label: 'crop',
|
|
value: @term
|
|
= f.submit "Search", class: 'btn btn-success'
|
|
|
|
- if @crops.empty?
|
|
%h2 No results found
|
|
%p
|
|
Sorry, we couldn't find any crops that matched your search for "#{@term}".
|
|
%p
|
|
Try
|
|
= link_to "browsing our crop database", crops_path
|
|
instead.
|
|
|
|
- else
|
|
= will_paginate @crops
|
|
|
|
.index-cards
|
|
- @crops.each do |crop|
|
|
= render 'crops/thumbnail', crop: crop
|
|
|
|
|
|
= will_paginate @crops
|