Show More
Commit Description:
Merge pull request #15 from nattee/master...
Commit Description:
Merge pull request #15 from nattee/master finalizing merge of nattee's master
References:
File last commit:
Show/Diff file:
Action:
app/views/problems/stat.html.haml | 51 lines | 1.4 KiB | text/x-haml | HamlLexer |
:css
.fix-width {
font-family: "Consolas, Monaco, Droid Sans Mono,Mono, Monospace,Courier"
}
%h1 Problem stat: #{@problem.name}
%h2 Overview
%table.info
%thead
%tr.info-head
%th Stat
%th Value
%tbody
%tr{class: cycle('info-even','info-odd')}
%td Submissions
%td= @submissions.count
%tr{class: cycle('info-even','info-odd')}
%td Solved/Attempted User
%td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%)
%h2 Submissions Count
= render partial: 'application/bar_graph', locals: { histogram: @histogram }
%h2 Submissions
- if @submissions and @submissions.count > 0
%table.info#main_table
%thead
%tr.info-head
%th ID
%th Login
%th Name
%th Submitted_at
%th Points
%th comment
%tbody
- row_odd,curr = true,''
- @submissions.each do |sub|
- next unless sub.user
- row_odd,curr = !row_odd, sub.user if curr != sub.user
%tr{class: row_odd ? "info-odd" : "info-even"}
%td= link_to sub.id, controller: 'graders', action: 'submission', id: sub.id
%td= link_to sub.user.login, controller: :users, action: :profile, id: sub.user.id
%td= sub.user.full_name
%td= time_ago_in_words(sub.submitted_at) + " ago"
%td= sub.points
%td.fix-width= sub.grader_comment
- else
No submission