From ae5082fff66856f5db1f1293be07aa4720e3b215 Mon Sep 17 00:00:00 2001 From: sto Date: Thu, 6 Nov 2025 11:05:09 +0100 Subject: [PATCH] Contestant view: show offline participation images --- app/views/contestants/_form.html.slim | 20 ++++++++++++++++++++ config/locales/en.yml | 4 ++++ config/locales/fr.yml | 4 ++++ 3 files changed, 28 insertions(+) diff --git a/app/views/contestants/_form.html.slim b/app/views/contestants/_form.html.slim index 0d1ea77..8925e76 100644 --- a/app/views/contestants/_form.html.slim +++ b/app/views/contestants/_form.html.slim @@ -72,3 +72,23 @@ .col a.btn.btn-primary href=new_contest_completion_path(@contest, contestant_id: contestant.id) = t("helpers.buttons.add") + +- if contestant.offline.present? + .row.mt-5.mb-2 + .col + h3 = t("contestants.edit.offline_participation") + .row.mb-5 + .col-6 + h4 = t("contestants.edit.start_image") + - if contestant.offline.images.length > 0 + .mt-3.mb-1 + = contestant.offline.start_time.to_fs(:rfc822) + = image_tag(contestant.offline.images[0], class: "img-fluid", style: "max-height: 400px") + .col-6 + h4 = t("contestants.edit.end_image") + - if contestant.offline.images.length > 1 + .mt-3.mb-1 + = contestant.offline.end_time.to_fs(:rfc822) + = image_tag(contestant.offline.images[1], class: "img-fluid", style: "max-height: 400px") + - else + = t("contestants.edit.not_finished") \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index bcd254a..a8dafe7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -188,7 +188,11 @@ en: destroy: notice: Participant deleted edit: + end_image: End image notice: Participant updated + not_finished: Not yet finished + offline_participation: Offline participation + start_image: Start image title: Participant team_title: Teams finalize_import: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 56f4bfb..423f42c 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -159,7 +159,11 @@ fr: destroy: notice: Participant.e supprimé.e edit: + end_image: Image de fin notice: Participant.e modifié.e + not_finished: Non terminé + offline_participation: Participation hors-ligne + start_time: Image de début title: Participant.e team_title: Équipe finalize_import: