From 5ff505d246d649a33f770c6ff9fb7f68e20ecc39 Mon Sep 17 00:00:00 2001 From: Tocho Tochev Date: Sat, 1 Jun 2024 12:31:38 +0300 Subject: [PATCH] Add indication for unverified volunteers (#45) We want to have some indication for that some volunteers haven't confirmed their email. Perhaps "unverified" is bad terminology, but until we have proper "verification" it will suffice. (Ideally there would also be a filter, but my rails is way too rusty...) Reviewed-on: https://git.openfest.org/Site/clarion/pulls/45 Co-authored-by: Tocho Tochev Co-committed-by: Tocho Tochev --- app/views/management/volunteers/index.csv.erb | 2 +- app/views/management/volunteers/index.html.slim | 2 +- app/views/management/volunteers/show.html.slim | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/management/volunteers/index.csv.erb b/app/views/management/volunteers/index.csv.erb index 090bcfd..9de9aa4 100644 --- a/app/views/management/volunteers/index.csv.erb +++ b/app/views/management/volunteers/index.csv.erb @@ -3,7 +3,7 @@ <%- @volunteers.each do |volunteer| -%> <%= CSV.generate_line([volunteer.id, volunteer.name, - volunteer.email, + "#{volunteer.confirmed_at.nil? ? '(unverified) ' : ''}#{volunteer.email}", volunteer.language, volunteer.unique_id, volunteer.phone, diff --git a/app/views/management/volunteers/index.html.slim b/app/views/management/volunteers/index.html.slim index e989e9b..bce6967 100644 --- a/app/views/management/volunteers/index.html.slim +++ b/app/views/management/volunteers/index.html.slim @@ -48,7 +48,7 @@ h4.media-heading = volunteer.name p - = icon(:envelope, volunteer.email) + = icon(volunteer.confirmed_at.present? ? "envelope" : "envelope-o", "#{volunteer.confirmed_at.nil? ? '(unverified) ' : ''}#{volunteer.email}") td = volunteer.volunteer_team.name td.actions diff --git a/app/views/management/volunteers/show.html.slim b/app/views/management/volunteers/show.html.slim index 0f4287a..0e69502 100644 --- a/app/views/management/volunteers/show.html.slim +++ b/app/views/management/volunteers/show.html.slim @@ -38,7 +38,7 @@ h4 = t '.other_info' = icon(:language, t("locales.#{@volunteer.language}")) br - = icon(:envelope, @volunteer.email) + = icon(@volunteer.confirmed_at.present? ? "envelope" : "envelope-o", @volunteer.email) br = icon(:phone, @volunteer.phone.try(:phony_formatted, format: :international)) br