Show More
Commit Description:
NEED TESTING...
Commit Description:
NEED TESTING
move to stronger parameter for xxx.new(params[
References:
File last commit:
Show/Diff file:
Action:
app/views/report/_score_table.html.haml
| 34 lines
| 1013 B
| text/x-haml
| HamlLexer
|
r601 | %table.table.sortable.table-striped.table-bordered.table-condensed | |||
%thead | ||||
%tr | ||||
%th Login | ||||
%th Name | ||||
r610 | / %th Activated? | |||
/ %th Logged_in | ||||
/ %th Contest(s) | ||||
r601 | %th Remark | |||
- @problems.each do |p| | ||||
r610 | %th.text-right= p.name.gsub('_',' ') | |||
r601 | %th.text-right Total | |||
%th.text-right Passed | ||||
%tbody | ||||
- @scorearray.each do |sc| | ||||
%tr | ||||
- total,num_passed = 0,0 | ||||
- sc.each_index do |i| | ||||
- if i == 0 | ||||
r619 | %td= link_to sc[i].login, stat_user_path(sc[i]) | |||
r601 | %td= sc[i].full_name | |||
r610 | / %td= sc[i].activated | |||
/ %td= sc[i].try(:contest_stat).try(:started_at) ? 'yes' : 'no' | ||||
/ %td= sc[i].contests.collect {|c| c.name}.join(', ') | ||||
r601 | %td= sc[i].remark | |||
- else | ||||
%td.text-right= sc[i][0] | ||||
- total += sc[i][0] | ||||
- num_passed += 1 if sc[i][1] | ||||
%td.text-right= total | ||||
%td.text-right= num_passed | ||||
:javascript | ||||
$.bootstrapSortable(true,'reversed') | ||||