mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-11 01:05:01 -04:00
54 lines
1.8 KiB
Plaintext
54 lines
1.8 KiB
Plaintext
- content_for :breadcrumbs do
|
|
- if @owner
|
|
%li.breadcrumb-item= link_to 'Seeds', seeds_path
|
|
%li.breadcrumb-item.active= link_to "#{@owner}'s seeds", member_seeds_path(@owner)
|
|
- else
|
|
%li.breadcrumb-item.active= link_to 'Seeds', seeds_path
|
|
|
|
- content_for :title, title('seeds', @owner, @crop, @planting)
|
|
- content_for :meta_description, "Browse and search for seeds."
|
|
|
|
.row
|
|
.col-md-2
|
|
%h1
|
|
= seed_icon
|
|
= title('seeds', @owner, @crop, @planting)
|
|
= render 'layouts/nav', model: Seed
|
|
= link_to show_inactive_tickbox_path('seeds', owner: @owner, crop: @crop, show_all: @show_all) do
|
|
= check_box_tag 'active', 'all', @show_all
|
|
include finished
|
|
%hr/
|
|
%section.filters
|
|
%h2 Tradeable
|
|
%ul.nav.flex-column
|
|
%li.nav-item= link_to "All tradable seeds", seeds_path(tradeable_to: ['locally', 'nationally', 'internationally'])
|
|
- Seed::TRADABLE_TO_VALUES.each do |value|
|
|
- unless value == 'nowhere'
|
|
%li.nav-item= link_to value.capitalize, seeds_path(tradeable_to: value)
|
|
%hr/
|
|
- if @owner
|
|
= render @owner
|
|
- if @crop
|
|
= render @crop
|
|
|
|
%section.open-data
|
|
%h2 Open Data
|
|
%p= t('label.data')
|
|
- ['csv', 'json', 'rss'].each do |format|
|
|
.badge.badge-info
|
|
= link_to (@owner ? member_seeds_path(@owner, format: format) : seeds_path(format: format)) do
|
|
= icon 'fas', format.to_s
|
|
= format.upcase
|
|
.badge.badge-success= link_to 'API Methods', '/api-docs'
|
|
.col-md-10
|
|
%section
|
|
%h2= title('seeds', @owner, @crop, @planting)
|
|
= will_paginate @seeds
|
|
- if @seeds.blank?
|
|
%p No seeds recorded yet
|
|
.index-cards
|
|
- @seeds.each do |s|
|
|
= render 'seeds/card', seed: s
|
|
|
|
= will_paginate @seeds
|