diff --git a/app/views/crops/show.html.haml b/app/views/crops/show.html.haml index 50da44eac..45be7da6f 100644 --- a/app/views/crops/show.html.haml +++ b/app/views/crops/show.html.haml @@ -87,18 +87,18 @@ .list-group-item.list-group-flush.d-flex.justify-content-between.align-items-center = link_to crop_plantings_path(@crop), class: 'card-link' do = planting_icon - #{@crop.name} plantings + #{@crop.name.capitalize} plantings %span.badge.badge-primary.badge-pill=@crop.plantings.size .list-group-item.d-flex.justify-content-between.align-items-center = link_to crop_harvests_path(@crop) do = harvest_icon - #{@crop.name} harvests + #{@crop.name.capitalize} harvests %span.badge.badge-primary.badge-pill=@crop.harvests.size .list-group-item.d-flex.justify-content-between.align-items-center = link_to crop_seeds_path(@crop) do = seed_icon - #{@crop.name} seeds + #{@crop.name.capitalize} seeds %span.badge.badge-primary.badge-pill=@crop.seeds.size - if member_signed_in? @@ -109,10 +109,20 @@ .card-body = render 'scientific_names', crop: @crop = render 'alternate_names', crop: @crop + .card-body + %h3 See who's planted #{@crop.name.pluralize} + %ul.list-group.list-group-flush + - @crop.plantings.order(planted_at: :desc).limit(5).each do |planting| + %li.list-group-item + = link_to planting do + = planting_icon + = planting + - if planting.owner.location.present? + %small=planting.owner.location + %hr/ - = render 'find_seeds', crop: @crop %hr/ diff --git a/app/views/members/_bio.html.haml b/app/views/members/_bio.html.haml index 3858d224c..f22d7eeb0 100644 --- a/app/views/members/_bio.html.haml +++ b/app/views/members/_bio.html.haml @@ -1,7 +1,7 @@ %h2 All about #{member.login_name} - if member.bio.blank? - if can? :edit, member - = link_to "Add a bio to complete your profile." + = link_to "Add a bio to complete your profile.", edit_member_path(member) - else #{member.login_name} hasn't written a bio yet. - else diff --git a/script/percy-new.sh b/script/percy-new.sh new file mode 100755 index 000000000..e5db82272 --- /dev/null +++ b/script/percy-new.sh @@ -0,0 +1,4 @@ +#!/bin/bash +bundle exec rails assets:precompile +export PERCY_TOKEN=047f5b0ecf3ca0a2bc94a6cfc837e625ace93ef0d81cc8ac82e3fb3aebd5c17f +PERCY_TARGET_BRANCH=dev npx percy exec -- bundle exec rspec spec/features/percy/