132 lines
6.5 KiB
Plaintext
132 lines
6.5 KiB
Plaintext
= render "worlds_nav"
|
|
|
|
.alert.alert-primary role="alert"
|
|
= t("worlds.collab.details_message")
|
|
.mt-3
|
|
= t("worlds.collab.error_message")
|
|
|
|
.alert.alert-warning role="alert"
|
|
= t("worlds.collab.rank_message")
|
|
|
|
h4.mt-4 Round A
|
|
|
|
- @participants.each do |p|
|
|
- if p.round == 'a'
|
|
.row.mt-3
|
|
.col
|
|
= form_with model: WorldParticipant, url: "/wjpc_bets/update/#{p.id}", method: :patch do |form|
|
|
.input-group
|
|
.input-group-text style="width: 350px;" #{Flags.get_flag(p.world_country.code) + " " + p.name}
|
|
.input-group-text = t("worlds.main.rank")
|
|
= form.text_field :qualifier_result, value: p.qualifier_result, autocomplete: "off", class: "form-control", style: "color: orange; max-width: 60px;"
|
|
.input-group-text = t("worlds.main.points")
|
|
.input-group-text style="color: green; width: 60px;" #{WorldBet.points(p.qualifier_result)}
|
|
= form.submit t("helpers.buttons.validate"), class: "btn btn-primary", onclick: "updateScrollPos()"
|
|
|
|
javascript:
|
|
function updateScrollPos() {
|
|
wsy = window.scrollY;
|
|
setTimeout(() => window.scrollTo(0, wsy), 25);
|
|
setTimeout(() => window.scrollTo(0, wsy), 50);
|
|
setTimeout(() => window.scrollTo(0, wsy), 75);
|
|
setTimeout(() => window.scrollTo(0, wsy), 100);
|
|
setTimeout(() => window.scrollTo(0, wsy), 125);
|
|
setTimeout(() => window.scrollTo(0, wsy), 150);
|
|
setTimeout(() => window.scrollTo(0, wsy), 175);
|
|
setTimeout(() => window.scrollTo(0, wsy), 200);
|
|
setTimeout(() => window.scrollTo(0, wsy), 225);
|
|
setTimeout(() => window.scrollTo(0, wsy), 250);
|
|
}
|
|
|
|
|
|
h4.mt-5 Round B
|
|
|
|
- @participants.each do |p|
|
|
- if p.round == 'b'
|
|
.row.mt-3
|
|
.col
|
|
= form_with model: WorldParticipant, url: "/wjpc_bets/update/#{p.id}", method: :patch do |form|
|
|
.input-group
|
|
.input-group-text style="width: 350px;" #{Flags.get_flag(p.world_country.code) + " " + p.name}
|
|
.input-group-text = t("worlds.main.rank")
|
|
= form.text_field :qualifier_result, value: p.qualifier_result, autocomplete: "off", class: "form-control", style: "color: orange; max-width: 60px;"
|
|
.input-group-text = t("worlds.main.points")
|
|
.input-group-text style="color: green; width: 60px;" #{WorldBet.points(p.qualifier_result)}
|
|
= form.submit t("helpers.buttons.validate"), class: "btn btn-primary", onclick: "updateScrollPos()"
|
|
|
|
h4.mt-5 Round C
|
|
|
|
- @participants.each do |p|
|
|
- if p.round == 'c'
|
|
.row.mt-3
|
|
.col
|
|
= form_with model: WorldParticipant, url: "/wjpc_bets/update/#{p.id}", method: :patch do |form|
|
|
.input-group
|
|
.input-group-text style="width: 350px;" #{Flags.get_flag(p.world_country.code) + " " + p.name}
|
|
.input-group-text = t("worlds.main.rank")
|
|
= form.text_field :qualifier_result, value: p.qualifier_result, autocomplete: "off", class: "form-control", style: "color: orange; max-width: 60px;"
|
|
.input-group-text = t("worlds.main.points")
|
|
.input-group-text style="color: green; width: 60px;" #{WorldBet.points(p.qualifier_result)}
|
|
= form.submit t("helpers.buttons.validate"), class: "btn btn-primary", onclick: "updateScrollPos()"
|
|
|
|
h4.mt-5 Round D
|
|
|
|
- @participants.each do |p|
|
|
- if p.round == 'd'
|
|
.row.mt-3
|
|
.col
|
|
= form_with model: WorldParticipant, url: "/wjpc_bets/update/#{p.id}", method: :patch do |form|
|
|
.input-group
|
|
.input-group-text style="width: 350px;" #{Flags.get_flag(p.world_country.code) + " " + p.name}
|
|
.input-group-text = t("worlds.main.rank")
|
|
= form.text_field :qualifier_result, value: p.qualifier_result, autocomplete: "off", class: "form-control", style: "color: orange; max-width: 60px;"
|
|
.input-group-text = t("worlds.main.points")
|
|
.input-group-text style="color: green; width: 60px;" #{WorldBet.points(p.qualifier_result)}
|
|
= form.submit t("helpers.buttons.validate"), class: "btn btn-primary", onclick: "updateScrollPos()"
|
|
|
|
h4.mt-5 = "#{t("worlds.collab.semifinal")} 1"
|
|
|
|
- @participants.each do |p|
|
|
- if p.round == 'a' || p.round == 'b'
|
|
.row.mt-3
|
|
.col
|
|
= form_with model: WorldParticipant, url: "/wjpc_bets/update/#{p.id}", method: :patch do |form|
|
|
.input-group
|
|
.input-group-text style="width: 350px;" #{Flags.get_flag(p.world_country.code) + " " + p.name}
|
|
.input-group-text = t("worlds.main.rank")
|
|
= form.text_field :semifinal_result, value: p.semifinal_result, autocomplete: "off", class: "form-control", style: "color: orange; max-width: 60px;"
|
|
.input-group-text = t("worlds.main.points")
|
|
.input-group-text style="color: green; width: 60px;" #{WorldBet.points(p.semifinal_result) * 2}
|
|
= form.submit t("helpers.buttons.validate"), class: "btn btn-primary", onclick: "updateScrollPos()"
|
|
|
|
h4.mt-5 = "#{t("worlds.collab.semifinal")} 2"
|
|
|
|
- @participants.each do |p|
|
|
- if p.round == 'c' || p.round == 'd'
|
|
.row.mt-3
|
|
.col
|
|
= form_with model: WorldParticipant, url: "/wjpc_bets/update/#{p.id}", method: :patch do |form|
|
|
.input-group
|
|
.input-group-text style="width: 350px;" #{Flags.get_flag(p.world_country.code) + " " + p.name}
|
|
.input-group-text = t("worlds.main.rank")
|
|
= form.text_field :semifinal_result, value: p.semifinal_result, autocomplete: "off", class: "form-control", style: "color: orange; max-width: 60px;"
|
|
.input-group-text = t("worlds.main.points")
|
|
.input-group-text style="color: green; width: 60px;" #{WorldBet.points(p.semifinal_result) * 2}
|
|
= form.submit t("helpers.buttons.validate"), class: "btn btn-primary", onclick: "updateScrollPos()"
|
|
|
|
h4.mt-5 = "#{t("worlds.collab.final")}"
|
|
|
|
- @participants.each do |p|
|
|
.row.mt-3
|
|
.col
|
|
= form_with model: WorldParticipant, url: "/wjpc_bets/update/#{p.id}", method: :patch do |form|
|
|
.input-group
|
|
.input-group-text style="width: 350px;" #{Flags.get_flag(p.world_country.code) + " " + p.name}
|
|
.input-group-text = t("worlds.main.rank")
|
|
= form.text_field :final_result, value: p.final_result, autocomplete: "off", class: "form-control", style: "color: orange; max-width: 60px;"
|
|
.input-group-text = t("worlds.main.points")
|
|
.input-group-text style="color: green; width: 60px;" #{WorldBet.points(p.final_result) * 4}
|
|
= form.submit t("helpers.buttons.validate"), class: "btn btn-primary", onclick: "updateScrollPos()"
|
|
|
|
.mb-5
|