Messages to completions conversion
This commit is contained in:
@@ -1,9 +1,21 @@
|
||||
= form_with model: completion, url: url, method: method do |form|
|
||||
- if @message
|
||||
.row.mb-3
|
||||
.col
|
||||
h4 = t("messages.singular").capitalize
|
||||
.alert.alert-secondary
|
||||
b
|
||||
= @message.author
|
||||
br
|
||||
= @message.text
|
||||
.row
|
||||
.col
|
||||
h4 = t("completions.singular").capitalize
|
||||
.row.mb-3
|
||||
.col
|
||||
.form-floating
|
||||
= form.text_field :time_seconds, autocomplete: "off", class: "form-control"
|
||||
= form.label :time_seconds, class: "required"
|
||||
= form.text_field :display_time_from_start, autocomplete: "off", class: "form-control"
|
||||
= form.label :display_time_from_start, class: "required"
|
||||
.row.mb-3
|
||||
.col
|
||||
.form-floating
|
||||
|
@@ -51,17 +51,21 @@
|
||||
tr
|
||||
th scope="col"
|
||||
| Time
|
||||
th scope="col"
|
||||
| Author
|
||||
th scope="col"
|
||||
| Text
|
||||
tbody
|
||||
- @messages.each do |message|
|
||||
tr.align-middle scope="row"
|
||||
td
|
||||
= message.time_seconds
|
||||
= message.display_time
|
||||
td
|
||||
= message.author
|
||||
td
|
||||
= message.text
|
||||
td
|
||||
a.btn.btn-sm.btn-secondary href="" style="white-space: nowrap;"
|
||||
a.btn.btn-sm.btn-secondary href=contest_message_convert_path(@contest, message) style="white-space: nowrap;"
|
||||
| Add completion
|
||||
td
|
||||
= link_to "Delete", contest_message_path(@contest, message), data: { turbo_method: :delete }, class: "btn btn-sm btn-danger"
|
||||
|
Reference in New Issue
Block a user