Description:
fix link
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r794:67f10729d077 - - 1 file changed: 4 inserted, 4 deleted
@@ -1,107 +1,107 | |||
|
1 | 1 | - content_for :header do |
|
2 | 2 | = stylesheet_link_tag 'tablesorter-theme.cafe' |
|
3 | 3 | = javascript_include_tag 'local_jquery' |
|
4 | 4 | |
|
5 | 5 | %script{:type=>"text/javascript"} |
|
6 | 6 | $(function () { |
|
7 | 7 | $('#since_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); |
|
8 | 8 | $('#until_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); |
|
9 | 9 | $('#my_table').tablesorter({widthFixed: true, widgets: ['zebra']}); |
|
10 | 10 | $('#my_table2').tablesorter({widthFixed: true, widgets: ['zebra']}); |
|
11 | 11 | $('#sub_table').tablesorter({widthFixed: true, widgets: ['zebra']}); |
|
12 | 12 | }); |
|
13 | 13 | |
|
14 | 14 | %h1 Login status |
|
15 | 15 | |
|
16 | 16 | .panel.panel-primary |
|
17 | 17 | .panel-heading |
|
18 | 18 | User ID and time rnage |
|
19 | 19 | .panel-body |
|
20 | 20 | = form_tag({session: :url }) do |
|
21 | 21 | .row.form-group |
|
22 | 22 | .col-md-2 |
|
23 | 23 | From Date: |
|
24 | 24 | .col-md-4 |
|
25 | 25 | .input-group.date |
|
26 | 26 | = text_field_tag :since_datetime, @since_time, class: 'form-control' |
|
27 | 27 | %span.input-group-addon |
|
28 | 28 | %span.glyphicon.glyphicon-calendar |
|
29 | 29 | .row.form-group |
|
30 | 30 | .col-md-2 |
|
31 | 31 | Until Date: |
|
32 | 32 | .col-md-4 |
|
33 | 33 | .input-group.date |
|
34 | 34 | = text_field_tag :until_datetime, @until_time, class: 'form-control' |
|
35 | 35 | %span.input-group-addon |
|
36 | 36 | %span.glyphicon.glyphicon-calendar |
|
37 | 37 | .row.form-group |
|
38 | 38 | .col-md-2 |
|
39 | 39 | IDs (separated by space): |
|
40 | 40 | .col-md-10 |
|
41 | 41 | = text_field_tag 'SID', @sid, size: 40, class: 'form-control' |
|
42 | 42 | .row.form-group |
|
43 | 43 | .col-md-2 |
|
44 | 44 | .col-md-10 |
|
45 | 45 | =submit_tag 'query', class: 'btn btn-primary' |
|
46 | 46 | |
|
47 | 47 | -# |
|
48 | 48 | %table |
|
49 | 49 | %tr |
|
50 | 50 | %td{style: 'width: 120px; font-weight: bold'}= 'Login date range' |
|
51 | 51 | %td{align: 'right'} since: |
|
52 | 52 | %td= text_field_tag 'since_datetime', @since_time, class: 'form-control datetimepicker' |
|
53 | 53 | %tr |
|
54 | 54 | %td |
|
55 | 55 | %td{align: 'right'} until: |
|
56 | 56 | %td= text_field_tag 'until_datetime', @until_time |
|
57 | 57 | %tr |
|
58 | 58 | %td |
|
59 | 59 | %td |
|
60 | 60 | %td Blank mean no condition |
|
61 | 61 | %tr |
|
62 | 62 | %td{style: 'width: 120px; font-weight: bold'}= "ID" |
|
63 | 63 | %td{colspan: 2}= text_field_tag 'SID', @sid, size: 40 |
|
64 | 64 | %tr |
|
65 | 65 | %td |
|
66 | 66 | %td |
|
67 | 67 | %td= submit_tag 'query' |
|
68 | 68 | |
|
69 | 69 | |
|
70 | 70 | %h2 Logs |
|
71 | 71 | |
|
72 | 72 | - if @sid |
|
73 | 73 | %table |
|
74 | 74 | %tbody |
|
75 | 75 | - @sid.each do |id| |
|
76 | 76 | - user = User.where("login = ?",id).first |
|
77 | 77 | %tr |
|
78 | 78 | //%td= link_to id, controller: :user, action: :profile, id: id |
|
79 |
- %td= link_to id, |
|
|
79 | + %td= link_to id, stat_user_path(user.id) | |
|
80 | 80 | %td= user.full_name |
|
81 | 81 | |
|
82 | 82 | //%table.tablesorter-cafe#my_table |
|
83 | 83 | %table.info |
|
84 | 84 | %thead |
|
85 | 85 | %tr.info-head |
|
86 | 86 | %th Time |
|
87 | 87 | %th Action |
|
88 | 88 | %th IP |
|
89 | 89 | %th login |
|
90 | 90 | %th name |
|
91 | 91 | %th problem |
|
92 | 92 | %th score |
|
93 | 93 | %tbody |
|
94 | 94 | - if @logs |
|
95 | 95 | - @logs.each do |l| |
|
96 | 96 | %tr{class: cycle('info-even','info-odd')} |
|
97 | 97 | %td= l[:submitted_at].strftime "%Y.%b.%d %H:%M:%S" |
|
98 | 98 | //%td= l[:id] == -1 ? "LOGIN" : link_to("submit #{l[:id]}", controller: 'graders' , action: 'submission', id: l[:id]) |
|
99 |
- %td= l[:id] == -1 ? "LOGIN" : link_to( " |
|
|
99 | + %td= l[:id] == -1 ? "LOGIN" : link_to( "##{l[:id]}", submission_path(l[:id])) | |
|
100 | 100 | %td= l[:ip_address] |
|
101 | 101 | //%td= link_to l[:login], controller: 'users', action: 'profile', id: l[:id] |
|
102 |
- %td= link_to( l[:login], |
|
|
102 | + %td= link_to( l[:login], stat_user_path(l.user_id)) | |
|
103 | 103 | %td= l[:full_name] |
|
104 | 104 | %td= l[:id] == -1 ? "" : l.problem.name |
|
105 | - %td= l[:id] == -1 ? "" : l.points * 100/ l.problem.full_score | |
|
105 | + %td.text-right= l[:id] == -1 ? "" : l.points * 100/ l.problem.full_score | |
|
106 | 106 | |
|
107 | 107 |
You need to be logged in to leave comments.
Login now