Integrate shared scoreboard links in contests
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
sto
2026-07-30 16:10:56 +02:00
parent 949f2de4b6
commit c221563618
5 changed files with 19 additions and 7 deletions

View File

@@ -2,6 +2,8 @@
.col
h4.mb-3
= t("contests.index.manage_contests")
a.ms-3.btn.btn-primary href="/events"
= t("events.show.back_to_events")
.float-end
a.btn.btn-primary.mb-4 href=new_contest_path
= t("contests.index.new_contest")
@@ -9,7 +11,7 @@
.alert.alert-primary role="alert"
= t("contests.index.message")
.row.row-cols-1.row-cols-md-3.g-4
.mt-3.row.row-cols-1.row-cols-md-3.g-4
- @contests.each do |contest|
.col
css:

View File

@@ -91,12 +91,20 @@ html
startAutoRefresh(200);
- elsif active_page("/contests") == "active"
= @contest.name
- if @contest.public
a.ms-4.btn.btn-success href="/public/#{@contest.slug}" style="margin-top: -6px;"
= t("contests.show.open_public_scoreboard")
- if @contest.event && @contest.event.shared_scoreboard
- if @contest.public
a.ms-4.btn.btn-success href="/public/event/#{@contest.event.slug}?contest_id=#{@contest.id}" style="margin-top: -6px;"
= t("events.show.open_shared_scoreboard")
- else
a.ms-4.btn.btn-success.disabled style="margin-top: -6px;"
= t("contests.show.shared_scoreboard_disabled")
- else
a.ms-4.btn.btn-success.disabled style="margin-top: -6px;"
= t("contests.show.public_scoreboard_disabled")
- if @contest.public
a.ms-4.btn.btn-success href="/public/#{@contest.slug}" style="margin-top: -6px;"
= t("contests.show.open_public_scoreboard")
- else
a.ms-4.btn.btn-success.disabled style="margin-top: -6px;"
= t("contests.show.public_scoreboard_disabled")
- else
= @contest.name
- else