Integrate shared scoreboard links in contests
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user