.row .col h3 Informations = form_with model: contestant, url: url, method: method do |form| .row.mb-3 .col .form-floating = form.text_field :name, autocomplete: "off", class: "form-control" = form.label :name, class: "required" .row.mb-3 .col .form-floating = form.text_field :email, autocomplete: "off", class: "form-control" = form.label :email .form-text = t("activerecord.attributes.contestant.email_description") .row.mt-4 .col - if method == :patch = link_to t("helpers.buttons.delete"), contest_contestant_path(contest, contestant), data: { turbo_method: :delete }, class: "btn btn-danger me-2" = form.submit submit_text, class: "btn btn-primary" - if method == :patch .row.mt-5 .col h3 Completions table.table.table-striped.table-hover thead tr - if @contest.puzzles.size > 1 th scope="col" = t("activerecord.attributes.completion.display_time_from_start") th scope="col" = t("activerecord.attributes.completion.display_relative_time") - else th scope="col" = t("activerecord.attributes.completion.display_time") th scope="col" = t("activerecord.attributes.completion.puzzle") tbody - @completions.each do |completion| tr scope="row" td = completion.display_time_from_start - if @contest.puzzles.size > 1 td = completion.display_relative_time td - if !completion.puzzle.brand.blank? | #{completion.puzzle.name} - #{completion.puzzle.brand} - else | #{completion.puzzle.name} td a.btn.btn-sm.btn-secondary.me-2 href=edit_contest_completion_path(@contest, completion, contestant_id: contestant.id) = t("helpers.buttons.edit") = link_to t("helpers.buttons.delete"), contest_completion_path(contest, completion, contestant_id: contestant.id), data: { turbo_method: :delete }, class: "btn btn-sm btn-secondary" .row .col a.btn.btn-primary href=new_contest_completion_path(@contest, contestant_id: contestant.id) = t("helpers.buttons.add")