Flexify the contest dashboard
This commit is contained in:
parent
f27b43ef45
commit
ca7399f490
@ -28,8 +28,8 @@ javascript:
|
|||||||
</svg>
|
</svg>
|
||||||
=< t("contests.show.copy_extension_url")
|
=< t("contests.show.copy_extension_url")
|
||||||
|
|
||||||
.row.mb-4
|
.row.mb-4 style="height: calc(100vh - 320px)"
|
||||||
.col-7
|
.col-7.d-flex.flex-column style="height: 100%"
|
||||||
.row
|
.row
|
||||||
.col
|
.col
|
||||||
h4
|
h4
|
||||||
@ -65,43 +65,44 @@ javascript:
|
|||||||
.row
|
.row
|
||||||
.col.alert.alert-danger
|
.col.alert.alert-danger
|
||||||
= t("messages.warning")
|
= t("messages.warning")
|
||||||
table.table.table-striped.table-hover
|
.d-flex.flex-column style="overflow-y: auto"
|
||||||
thead
|
table.table.table-striped.table-hover
|
||||||
tr
|
thead
|
||||||
th scope="col" style="white-space: nowrap"
|
tr
|
||||||
= t("activerecord.attributes.message.processed")
|
th scope="col" style="white-space: nowrap"
|
||||||
th scope="col"
|
= t("activerecord.attributes.message.processed")
|
||||||
= t("activerecord.attributes.message.time")
|
th scope="col"
|
||||||
th scope="col"
|
= t("activerecord.attributes.message.time")
|
||||||
= t("activerecord.attributes.message.author")
|
th scope="col"
|
||||||
th.w-25 scope="col"
|
= t("activerecord.attributes.message.author")
|
||||||
= t("activerecord.attributes.message.text")
|
th.w-25 scope="col"
|
||||||
th.w-25 scope="col"
|
= t("activerecord.attributes.message.text")
|
||||||
tbody
|
th.w-25 scope="col"
|
||||||
- @messages.each do |message|
|
tbody
|
||||||
tr.align-middle scope="row"
|
- @messages.each do |message|
|
||||||
td style="text-align: center"
|
tr.align-middle scope="row"
|
||||||
- if message.completions.size > 0
|
td style="text-align: center"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-square" viewBox="0 0 16 16">
|
- if message.completions.size > 0
|
||||||
<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"/>
|
<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="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"/>
|
<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"/>
|
||||||
</svg>
|
<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"/>
|
||||||
td
|
</svg>
|
||||||
= message.display_time
|
td
|
||||||
td
|
= message.display_time
|
||||||
= message.author
|
td
|
||||||
td
|
= message.author
|
||||||
= message.text
|
td
|
||||||
td
|
= message.text
|
||||||
- if @puzzles.size > 0
|
td
|
||||||
a.btn.btn-sm.btn-secondary href=contest_message_convert_path(@contest, message) style="white-space: nowrap;"
|
- if @puzzles.size > 0
|
||||||
= t("helpers.buttons.add_completion")
|
a.btn.btn-sm.btn-secondary href=contest_message_convert_path(@contest, message) style="white-space: nowrap;"
|
||||||
- else
|
= t("helpers.buttons.add_completion")
|
||||||
a.btn.btn-sm.btn-secondary.disabled href=contest_message_convert_path(@contest, message) style="white-space: nowrap;"
|
- else
|
||||||
= t("helpers.buttons.add_completion")
|
a.btn.btn-sm.btn-secondary.disabled href=contest_message_convert_path(@contest, message) style="white-space: nowrap;"
|
||||||
td
|
= t("helpers.buttons.add_completion")
|
||||||
= link_to t("helpers.buttons.delete"), contest_message_path(@contest, message), data: { turbo_method: :delete }, class: "btn btn-sm btn-danger"
|
td
|
||||||
.col-5
|
= link_to t("helpers.buttons.delete"), contest_message_path(@contest, message), data: { turbo_method: :delete }, class: "btn btn-sm btn-danger"
|
||||||
|
.col-5.d-flex.flex-column style="height: 100%"
|
||||||
.row
|
.row
|
||||||
.col
|
.col
|
||||||
h4
|
h4
|
||||||
@ -110,28 +111,29 @@ javascript:
|
|||||||
| + #{t("helpers.buttons.add")}
|
| + #{t("helpers.buttons.add")}
|
||||||
a.ms-3.btn-sm.btn.btn-primary href=contest_import_path(@contest) style="margin-top: -3px"
|
a.ms-3.btn-sm.btn.btn-primary href=contest_import_path(@contest) style="margin-top: -3px"
|
||||||
| #{t("helpers.buttons.import")}
|
| #{t("helpers.buttons.import")}
|
||||||
table.table.table-striped.table-hover
|
.d-flex.flex-column style="overflow-y: auto"
|
||||||
thead
|
table.table.table-striped.table-hover
|
||||||
tr
|
thead
|
||||||
th scope="col"
|
tr
|
||||||
= t("helpers.rank")
|
th scope="col"
|
||||||
th scope="col"
|
= t("helpers.rank")
|
||||||
= t("activerecord.attributes.contestant.name")
|
th scope="col"
|
||||||
th scope="col"
|
= t("activerecord.attributes.contestant.name")
|
||||||
= t("activerecord.attributes.contestant.completions")
|
th scope="col"
|
||||||
th scope="col"
|
= t("activerecord.attributes.contestant.completions")
|
||||||
= t("activerecord.attributes.contestant.display_time")
|
th scope="col"
|
||||||
tbody
|
= t("activerecord.attributes.contestant.display_time")
|
||||||
- @contestants.each_with_index do |contestant, index|
|
tbody
|
||||||
tr scope="row"
|
- @contestants.each_with_index do |contestant, index|
|
||||||
td
|
tr scope="row"
|
||||||
= index + 1
|
td
|
||||||
td
|
= index + 1
|
||||||
= contestant.name
|
td
|
||||||
td
|
= contestant.name
|
||||||
= contestant.completions.length
|
td
|
||||||
td
|
= contestant.completions.length
|
||||||
= contestant.display_time
|
td
|
||||||
td
|
= contestant.display_time
|
||||||
a.btn.btn-sm.btn-secondary href=edit_contest_contestant_path(@contest, contestant)
|
td
|
||||||
= t("helpers.buttons.open")
|
a.btn.btn-sm.btn-secondary href=edit_contest_contestant_path(@contest, contestant)
|
||||||
|
= t("helpers.buttons.open")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user