From 42e1dbb4da98cf626cb513a7f745c81b3ee61aa8 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Sun, 18 Feb 2024 03:23:30 +0000 Subject: [PATCH] Rearrange member profile so that current progress is reported first, harvests second --- app/views/home/index.html.haml | 5 +++++ app/views/members/_full_summary.html.haml | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index adc174fc8..91cf7530e 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -8,6 +8,11 @@ %p= render 'stats', cached: true .col + %p + - if current_member.plantings.active.any? + = link_to member_path(current_member), class: 'btn btn-dark' do + = image_icon 'plantings' + Track my plantings %p = link_to member_gardens_path(current_member), class: 'btn btn-dark' do = image_icon 'gardens' diff --git a/app/views/members/_full_summary.html.haml b/app/views/members/_full_summary.html.haml index d855d74cb..5b1f55a12 100644 --- a/app/views/members/_full_summary.html.haml +++ b/app/views/members/_full_summary.html.haml @@ -5,13 +5,6 @@ - @harvesting.each do |planting| = render 'plantings/thumbnail', planting: planting -- if @harvests.any? - %section.havests - %h2 Recent Harvests - .index-cards - - @harvests.each do |harvest| - = render 'harvests/thumbnail', harvest: harvest - - if @others.size.positive? %section.planting-progress %h2 Progress report @@ -44,4 +37,10 @@ = link_to planting.crop_name, planting_url(slug: planting.slug) planted on #{planting.planted_at.to_date} +- if @harvests.any? + %section.havests + %h2 Recent Harvests + .index-cards + - @harvests.each do |harvest| + = render 'harvests/thumbnail', harvest: harvest