diff --git a/app/views/submissions/index.html.haml b/app/views/submissions/index.html.haml new file mode 100644 --- /dev/null +++ b/app/views/submissions/index.html.haml @@ -0,0 +1,29 @@ +.panel.panel-info + .panel-heading + Select Problems + .panel-body + .form-inline + = select 'submission', + 'problem_id', + @problems.collect {|p| ["[#{p.name}] #{p.full_name}", problem_submissions_url(p.id)]}, + { selected: (@problem ? problem_submissions_url(@problem) : -1) }, + { class: 'select2 form-control'} + %button.btn.btn-primary.btn-sm.go-button#problem_go{data: {source: '#submission_problem_id'}} Go + +- if @problem!=nil + %h2= "Task: #{@problem.full_name} (#{@problem.name})" + +- if @submissions!=nil + - if @submissions.length>0 + %table.table + %thead + %th No. + %th # + %th At + %th Source + %th Result + %th{:width => "300px"} Compiler message + %th + = render :partial => 'submission', :collection => @submissions + - else + No submission