Show More
Commit Description:
still upgrading
Commit Description:
still upgrading
References:
File last commit:
Show/Diff file:
Action:
app/views/problems/stat.html.haml | 59 lines | 1.5 KiB | text/x-haml | HamlLexer |
update problem stat to show all submissions...
r448 :css
.fix-width {
font-family: "Consolas, Monaco, Droid Sans Mono,Mono, Monospace,Courier"
}
%h1 Problem stat: #{@problem.name}
%h2 Overview
add more problem stat
r457
%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 }
update problem stat to show all submissions...
r448 %h2 Submissions
- if @submissions and @submissions.count > 0
use datatable
r694 %table#main_table.table.table-condensed.table-striped
update problem stat to show all submissions...
r448 %thead
use datatable
r694 %tr
update problem stat to show all submissions...
r448 %th ID
%th Login
%th Name
%th Submitted_at
add language
r697 %th language
update problem stat to show all submissions...
r448 %th Points
%th comment
grafted from 2b2663ff0e59
r501 %th IP
update problem stat to show all submissions...
r448 %tbody
- row_odd,curr = true,''
- @submissions.each do |sub|
- next unless sub.user
- row_odd,curr = !row_odd, sub.user if curr != sub.user
use datatable
r694 %tr
- clean up link to problem stat and user stat
r606 %td= link_to sub.id, submission_path(sub)
%td= link_to sub.user.login, stat_user_path(sub.user)
update problem stat to show all submissions...
r448 %td= sub.user.full_name
use datatable
r694 %td{data: {order: sub.submitted_at}}= time_ago_in_words(sub.submitted_at) + " ago"
add language
r697 %td= sub.language.name
update problem stat to show all submissions...
r448 %td= sub.points
%td.fix-width= sub.grader_comment
grafted from 2b2663ff0e59
r501 %td= sub.ip_address
update problem stat to show all submissions...
r448 - else
No submission
use datatable
r694 :javascript
$("#main_table").DataTable({
paging: false
});