Add contestant export feature
This commit is contained in:
4
app/views/contestants/export.csv.slim
Normal file
4
app/views/contestants/export.csv.slim
Normal file
@@ -0,0 +1,4 @@
|
||||
= CSV.generate_line [t("helpers.rank"), t("activerecord.attributes.contestant.name"), t("activerecord.attributes.contestant.display_time"), t("activerecord.attributes.contestant.completions")]
|
||||
|
||||
- @contestants.each_with_index do |contestant, index|
|
||||
= CSV.generate_line([index + 1, contestant.name, contestant.display_time, contestant.completions.length])
|
||||
@@ -40,8 +40,10 @@ javascript:
|
||||
= 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"
|
||||
a.ms-2.btn.btn-sm.btn.btn-primary href=contest_import_path(@contest) style="margin-top: -3px"
|
||||
| #{t("helpers.buttons.import")}
|
||||
a.ms-2.btn.btn-sm.btn.btn-primary href="/contests/#{@contest.id}/export.csv" style="margin-top: -3px"
|
||||
| #{t("helpers.buttons.export")}
|
||||
- if @contest.categories.size > 0
|
||||
.row
|
||||
.col
|
||||
|
||||
Reference in New Issue
Block a user