From 3f84f5abe1b00a14d068f434850569448da7eb4d Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 21 Jul 2019 19:16:22 +1200 Subject: [PATCH] harvest owner info --- app/views/harvests/_owner.html.haml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 app/views/harvests/_owner.html.haml diff --git a/app/views/harvests/_owner.html.haml b/app/views/harvests/_owner.html.haml new file mode 100644 index 000000000..f51da33f8 --- /dev/null +++ b/app/views/harvests/_owner.html.haml @@ -0,0 +1,18 @@ +.well + .row + .col-md-6 + %h4 + Harvested by + = link_to harvest.owner, harvest.owner + = link_to "view all #{harvest.owner}'s harvests", member_gardens_path(harvest.owner) + + - if harvest.planting.present? + %p + Harvested from + = link_to harvest.planting, harvest.planting + - if harvest.owner.location + %p + %small + View other harvests, members and more near + = link_to harvest.owner.location, place_path(harvest.owner.location, anchor: "harvests") + .col-md-6= render "members/avatar", member: harvest.owner \ No newline at end of file