diff --git a/app/views/contests/show.html.slim b/app/views/contests/show.html.slim
index 33b0bca..1541451 100644
--- a/app/views/contests/show.html.slim
+++ b/app/views/contests/show.html.slim
@@ -9,13 +9,13 @@
.row
.col.alert.alert-success
- = t("contests.show.public_scoreboard")
- = link_to root_url + "public/#{@contest.slug}", root_url + "public/#{@contest.slug}"
+ = t("contests.show.public_scoreboard")
+ = link_to root_url + "public/#{@contest.slug}", root_url + "public/#{@contest.slug}"
.row.mb-4
.col.alert.alert-success
- |> URL for the public scoreboard extension:
- = link_to "#{message_url}?token=#{@contest.generate_token_for(:token)}"
+ |> URL for the public scoreboard extension:
+ = link_to "#{message_url}?token=#{@contest.generate_token_for(:token)}"
.row.mb-4
.col-6
@@ -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
- a.btn.btn-sm.btn-secondary href=contest_message_convert_path(@contest, message) style="white-space: nowrap;"
- = t("helpers.buttons.add_completion")
+ - 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