Prevent the user from converting messages and warn them, if there are no puzzles
This commit is contained in:
parent
baea71b312
commit
17a1af4e9f
@ -50,6 +50,10 @@
|
||||
.row.mt-5
|
||||
.col
|
||||
h4 = t("messages.plural").capitalize
|
||||
- if !@puzzles.size
|
||||
.row
|
||||
.col.alert.alert-danger
|
||||
| You first need to add a puzzle before converting messages to completions
|
||||
table.table.table-striped.table-hover
|
||||
thead
|
||||
tr
|
||||
@ -69,8 +73,12 @@
|
||||
td
|
||||
= message.text
|
||||
td
|
||||
- if @puzzles.size
|
||||
a.btn.btn-sm.btn-secondary href=contest_message_convert_path(@contest, message) style="white-space: nowrap;"
|
||||
= t("helpers.buttons.add_completion")
|
||||
- else
|
||||
a.btn.btn-sm.btn-secondary.disabled href=contest_message_convert_path(@contest, message) style="white-space: nowrap;"
|
||||
= t("helpers.buttons.add_completion")
|
||||
td
|
||||
= link_to t("helpers.buttons.delete"), contest_message_path(@contest, message), data: { turbo_method: :delete }, class: "btn btn-sm btn-danger"
|
||||
.col-6
|
||||
|
Loading…
x
Reference in New Issue
Block a user