53 lines
2.6 KiB
Plaintext
53 lines
2.6 KiB
Plaintext
= render "contest_nav"
|
|
|
|
.row.mb-4 style="height: calc(100vh - 280px)"
|
|
.col.d-flex.flex-column style="height: 100%"
|
|
|
|
.row.mb-4
|
|
.col
|
|
- if @messages.length == 0
|
|
.alert.alert-warning
|
|
= t("messages.index.no_messages")
|
|
- else
|
|
- if @puzzles.size == 0
|
|
.row
|
|
.col.alert.alert-danger
|
|
= t("messages.warning")
|
|
.d-flex.flex-column style="overflow-y: auto"
|
|
table.table.table-striped.table-hover
|
|
thead
|
|
tr
|
|
th scope="col" style="white-space: nowrap"
|
|
= t("activerecord.attributes.message.processed")
|
|
th scope="col"
|
|
= t("activerecord.attributes.message.time")
|
|
th scope="col"
|
|
= t("activerecord.attributes.message.author")
|
|
th.w-25 scope="col"
|
|
= t("activerecord.attributes.message.text")
|
|
th.w-25 scope="col"
|
|
tbody
|
|
- @messages.each do |message|
|
|
tr.align-middle scope="row"
|
|
td style="text-align: center"
|
|
- if message.completions.size > 0
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-square" viewBox="0 0 16 16">
|
|
<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/>
|
|
<path d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z"/>
|
|
</svg>
|
|
td
|
|
= message.display_time
|
|
td
|
|
= message.author
|
|
td
|
|
= message.text
|
|
td
|
|
.d-inline-flex
|
|
- if @puzzles.size > 0
|
|
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")
|
|
= link_to "x", contest_message_path(@contest, message), data: { turbo_method: :delete }, class: "btn btn-sm btn-danger ms-2"
|