Show More
Commit Description:
start moving to importmap
Commit Description:
start moving to importmap
References:
File last commit:
Show/Diff file:
Action:
app/views/users/stat.html.haml
| 70 lines
| 1.7 KiB
| text/x-haml
| HamlLexer
|
r606 | - content_for :header do | |||
= javascript_include_tag 'local_jquery' | ||||
:javascript | ||||
$(function () { | ||||
$('#submission_table').tablesorter({widgets: ['zebra']}); | ||||
}); | ||||
:css | ||||
.fix-width { | ||||
font-family: Droid Sans Mono,Consolas, monospace, mono, Courier New, Courier; | ||||
} | ||||
%h1= @user.full_name | ||||
<b>Login:</b> #{@user.login} <br/> | ||||
<b>Full name:</b> #{@user.full_name} <br /> | ||||
%h2 Problem Stat | ||||
%table.info | ||||
%thead | ||||
%tr.info-head | ||||
%th Stat | ||||
%th Value | ||||
%tbody | ||||
%tr{class: cycle('info-even','info-odd')} | ||||
%td.info_param Submissions | ||||
%td= @summary[:count] | ||||
%tr{class: cycle('info-even','info-odd')} | ||||
%td.info_param Solved/Attempted Problem | ||||
%td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%) | ||||
%h2 Submission History | ||||
=render partial: 'application/bar_graph', locals: {histogram: @histogram, param: {bar_width: 7}} | ||||
r694 | %table#submission_table.table.table-striped | |||
r606 | %thead | |||
%tr | ||||
%th ID | ||||
%th Problem code | ||||
%th Problem full name | ||||
%th Language | ||||
%th Submitted at | ||||
%th Result | ||||
%th Score | ||||
- if session[:admin] | ||||
%th IP | ||||
%tbody | ||||
- @submission.each do |s| | ||||
- next unless s.problem | ||||
%tr | ||||
%td= link_to s.id, submission_path(s) | ||||
%td= link_to s.problem.name, stat_problem_path(s.problem) | ||||
%td= s.problem.full_name | ||||
%td= s.language.pretty_name | ||||
%td #{s.submitted_at.strftime('%Y-%m-%d %H:%M')} (#{time_ago_in_words(s.submitted_at)} ago) | ||||
%td.fix-width= s.grader_comment | ||||
%td= ( s.try(:points) ? (s.points*100/s.problem.full_score) : '' ) | ||||
- if session[:admin] | ||||
%td= s.ip_address | ||||
r694 | :javascript | |||
$("#submission_table").DataTable({ | ||||
paging: false | ||||
}); | ||||