Improve dashboard display
This commit is contained in:
parent
0599def237
commit
ee476ab81b
@ -33,7 +33,42 @@ javascript:
|
|||||||
=< t("contests.show.copy_extension_url")
|
=< t("contests.show.copy_extension_url")
|
||||||
|
|
||||||
.row.mb-4 style="height: calc(100vh - 280px)"
|
.row.mb-4 style="height: calc(100vh - 280px)"
|
||||||
.col-7.d-flex.flex-column style="height: 100%"
|
.col-6.d-flex.flex-column style="height: 100%"
|
||||||
|
.row
|
||||||
|
.col
|
||||||
|
h4
|
||||||
|
= t("contestants.plural").capitalize
|
||||||
|
a.ms-3.btn.btn-sm.btn-primary href=new_contest_contestant_path(@contest) style="margin-top: -3px"
|
||||||
|
| + #{t("helpers.buttons.add")}
|
||||||
|
a.ms-2.btn-sm.btn.btn-primary href=contest_import_path(@contest) style="margin-top: -3px"
|
||||||
|
| #{t("helpers.buttons.import")}
|
||||||
|
.d-flex.flex-column style="overflow-y: auto"
|
||||||
|
table.table.table-striped.table-hover
|
||||||
|
thead
|
||||||
|
tr
|
||||||
|
th scope="col"
|
||||||
|
= t("helpers.rank")
|
||||||
|
th scope="col"
|
||||||
|
= t("activerecord.attributes.contestant.name")
|
||||||
|
th scope="col"
|
||||||
|
= t("activerecord.attributes.contestant.completions")
|
||||||
|
th scope="col"
|
||||||
|
= t("activerecord.attributes.contestant.display_time")
|
||||||
|
tbody
|
||||||
|
- @contestants.each_with_index do |contestant, index|
|
||||||
|
tr scope="row"
|
||||||
|
td
|
||||||
|
= index + 1
|
||||||
|
td
|
||||||
|
= contestant.name
|
||||||
|
td
|
||||||
|
= contestant.completions.length
|
||||||
|
td
|
||||||
|
= contestant.display_time
|
||||||
|
td
|
||||||
|
a.btn.btn-sm.btn-secondary href=edit_contest_contestant_path(@contest, contestant)
|
||||||
|
= t("helpers.buttons.open")
|
||||||
|
.col-6.d-flex.flex-column style="height: 100%"
|
||||||
.row
|
.row
|
||||||
.col
|
.col
|
||||||
h4
|
h4
|
||||||
@ -102,46 +137,11 @@ javascript:
|
|||||||
td
|
td
|
||||||
= message.text
|
= message.text
|
||||||
td
|
td
|
||||||
- if @puzzles.size > 0
|
.d-inline-flex
|
||||||
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"
|
= link_to t("helpers.buttons.delete"), contest_message_path(@contest, message), data: { turbo_method: :delete }, class: "btn btn-sm btn-danger ms-2"
|
||||||
.col-5.d-flex.flex-column style="height: 100%"
|
|
||||||
.row
|
|
||||||
.col
|
|
||||||
h4
|
|
||||||
= t("contestants.plural").capitalize
|
|
||||||
a.ms-3.btn.btn-sm.btn-primary href=new_contest_contestant_path(@contest) style="margin-top: -3px"
|
|
||||||
| + #{t("helpers.buttons.add")}
|
|
||||||
a.ms-3.btn-sm.btn.btn-primary href=contest_import_path(@contest) style="margin-top: -3px"
|
|
||||||
| #{t("helpers.buttons.import")}
|
|
||||||
.d-flex.flex-column style="overflow-y: auto"
|
|
||||||
table.table.table-striped.table-hover
|
|
||||||
thead
|
|
||||||
tr
|
|
||||||
th scope="col"
|
|
||||||
= t("helpers.rank")
|
|
||||||
th scope="col"
|
|
||||||
= t("activerecord.attributes.contestant.name")
|
|
||||||
th scope="col"
|
|
||||||
= t("activerecord.attributes.contestant.completions")
|
|
||||||
th scope="col"
|
|
||||||
= t("activerecord.attributes.contestant.display_time")
|
|
||||||
tbody
|
|
||||||
- @contestants.each_with_index do |contestant, index|
|
|
||||||
tr scope="row"
|
|
||||||
td
|
|
||||||
= index + 1
|
|
||||||
td
|
|
||||||
= contestant.name
|
|
||||||
td
|
|
||||||
= contestant.completions.length
|
|
||||||
td
|
|
||||||
= contestant.display_time
|
|
||||||
td
|
|
||||||
a.btn.btn-sm.btn-secondary href=edit_contest_contestant_path(@contest, contestant)
|
|
||||||
= t("helpers.buttons.open")
|
|
||||||
|
@ -46,7 +46,7 @@ html
|
|||||||
h1.mb-4
|
h1.mb-4
|
||||||
= @title
|
= @title
|
||||||
- if @action_path
|
- if @action_path
|
||||||
a.ms-4.btn.btn-primary href=@action_path style="margin-top: -4px"
|
a.ms-4.btn.btn-primary href=@action_path style="margin-top: -6px"
|
||||||
= @action_name
|
= @action_name
|
||||||
|
|
||||||
= yield
|
= yield
|
@ -155,7 +155,7 @@ fr:
|
|||||||
team: "équipes"
|
team: "équipes"
|
||||||
buttons:
|
buttons:
|
||||||
add: "Ajouter"
|
add: "Ajouter"
|
||||||
add_completion: "Ajouter une complétion"
|
add_completion: "Convertir"
|
||||||
back: "⬅ Revenir au concours"
|
back: "⬅ Revenir au concours"
|
||||||
back_to_contestant: "⬅ Revenir au/à la participant.e"
|
back_to_contestant: "⬅ Revenir au/à la participant.e"
|
||||||
confirm: "Confirmer"
|
confirm: "Confirmer"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user