Show More
Commit Description:
fix link
Commit Description:
fix link
References:
File last commit:
Show/Diff file:
Action:
app/views/report/cheat_scrutinize.html.haml
| 107 lines
| 3.4 KiB
| text/x-haml
| HamlLexer
|
r793 | - content_for :header do | |||
= stylesheet_link_tag 'tablesorter-theme.cafe' | ||||
= javascript_include_tag 'local_jquery' | ||||
%script{:type=>"text/javascript"} | ||||
$(function () { | ||||
$('#since_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); | ||||
$('#until_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); | ||||
$('#my_table').tablesorter({widthFixed: true, widgets: ['zebra']}); | ||||
$('#my_table2').tablesorter({widthFixed: true, widgets: ['zebra']}); | ||||
$('#sub_table').tablesorter({widthFixed: true, widgets: ['zebra']}); | ||||
}); | ||||
%h1 Login status | ||||
.panel.panel-primary | ||||
.panel-heading | ||||
User ID and time rnage | ||||
.panel-body | ||||
= form_tag({session: :url }) do | ||||
.row.form-group | ||||
.col-md-2 | ||||
From Date: | ||||
.col-md-4 | ||||
.input-group.date | ||||
= text_field_tag :since_datetime, @since_time, class: 'form-control' | ||||
%span.input-group-addon | ||||
%span.glyphicon.glyphicon-calendar | ||||
.row.form-group | ||||
.col-md-2 | ||||
Until Date: | ||||
.col-md-4 | ||||
.input-group.date | ||||
= text_field_tag :until_datetime, @until_time, class: 'form-control' | ||||
%span.input-group-addon | ||||
%span.glyphicon.glyphicon-calendar | ||||
.row.form-group | ||||
.col-md-2 | ||||
IDs (separated by space): | ||||
.col-md-10 | ||||
= text_field_tag 'SID', @sid, size: 40, class: 'form-control' | ||||
.row.form-group | ||||
.col-md-2 | ||||
.col-md-10 | ||||
=submit_tag 'query', class: 'btn btn-primary' | ||||
-# | ||||
%table | ||||
%tr | ||||
%td{style: 'width: 120px; font-weight: bold'}= 'Login date range' | ||||
%td{align: 'right'} since: | ||||
%td= text_field_tag 'since_datetime', @since_time, class: 'form-control datetimepicker' | ||||
%tr | ||||
%td | ||||
%td{align: 'right'} until: | ||||
%td= text_field_tag 'until_datetime', @until_time | ||||
%tr | ||||
%td | ||||
%td | ||||
%td Blank mean no condition | ||||
%tr | ||||
%td{style: 'width: 120px; font-weight: bold'}= "ID" | ||||
%td{colspan: 2}= text_field_tag 'SID', @sid, size: 40 | ||||
%tr | ||||
%td | ||||
%td | ||||
%td= submit_tag 'query' | ||||
%h2 Logs | ||||
- if @sid | ||||
%table | ||||
%tbody | ||||
- @sid.each do |id| | ||||
- user = User.where("login = ?",id).first | ||||
%tr | ||||
//%td= link_to id, controller: :user, action: :profile, id: id | ||||
r794 | %td= link_to id, stat_user_path(user.id) | |||
r793 | %td= user.full_name | |||
//%table.tablesorter-cafe#my_table | ||||
%table.info | ||||
%thead | ||||
%tr.info-head | ||||
%th Time | ||||
%th Action | ||||
%th IP | ||||
%th login | ||||
%th name | ||||
%th problem | ||||
%th score | ||||
%tbody | ||||
- if @logs | ||||
- @logs.each do |l| | ||||
%tr{class: cycle('info-even','info-odd')} | ||||
%td= l[:submitted_at].strftime "%Y.%b.%d %H:%M:%S" | ||||
//%td= l[:id] == -1 ? "LOGIN" : link_to("submit #{l[:id]}", controller: 'graders' , action: 'submission', id: l[:id]) | ||||
r794 | %td= l[:id] == -1 ? "LOGIN" : link_to( "##{l[:id]}", submission_path(l[:id])) | |||
r793 | %td= l[:ip_address] | |||
//%td= link_to l[:login], controller: 'users', action: 'profile', id: l[:id] | ||||
r794 | %td= link_to( l[:login], stat_user_path(l.user_id)) | |||
r793 | %td= l[:full_name] | |||
%td= l[:id] == -1 ? "" : l.problem.name | ||||
r794 | %td.text-right= l[:id] == -1 ? "" : l.points * 100/ l.problem.full_score | |||
r793 | ||||