Events: initial implementation
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-26 14:01:29 +02:00
parent fa8880abfc
commit 35b304d913
26 changed files with 389 additions and 24 deletions

View File

@@ -0,0 +1,36 @@
.row
.col
h4.mb-3
= t("events.index.subtitle")
.float-end
a.btn.btn-primary.mb-4 href=new_event_path
= t("events.index.new")
.alert.alert-primary role="alert"
= t("events.index.message")
- @events.each do |event|
.row.mt-3
.col
css:
.card:hover { background-color: lightblue; }
.card.h-100
.card-header
= event.name
.card-body
.card-text.mb-2
= "#{event.contests.size} " + t("events.index.contests") if event.contests.size > 1
= "#{event.contests.size} " + t("events.index.contest") if event.contests.size <= 1
a.stretched-link href=event_path(event)
.row.mt-3
.col
css:
.card:hover { background-color: lightblue; }
.card.h-100
.card-header
= t("events.index.my_contests_outside_events")
.card-body
.card-text.mb-2
= "#{@contests_without_event} " + t("events.index.contests") if @contests_without_event > 1
= "#{@contests_without_event} " + t("events.index.contest") if @contests_without_event <= 1
a.stretched-link href=contests_path