Description:
update user profile and user list
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r450:fd6c259da216 - - 2 files changed: 6 inserted, 3 deleted
@@ -65,14 +65,15 | |||||
|
65 | <th></th> |
|
65 | <th></th> |
|
66 | <th></th> |
|
66 | <th></th> |
|
67 | </tr> |
|
67 | </tr> |
|
68 |
|
68 | ||
|
69 | <% for user in @users %> |
|
69 | <% for user in @users %> |
|
70 | <tr class="info-<%= cycle("odd","even") %>"> |
|
70 | <tr class="info-<%= cycle("odd","even") %>"> |
|
|
71 | + <td><%= link_to user.login, controller: :users, :action => 'profile', :id => user %></td> | ||
|
71 | <% for column in User.content_columns %> |
|
72 | <% for column in User.content_columns %> |
|
72 | - <% if !@hidden_columns.index(column.name) %> |
|
73 | + <% if !@hidden_columns.index(column.name) and column.name != 'login' %> |
|
73 | <td><%=h user.send(column.name) %></td> |
|
74 | <td><%=h user.send(column.name) %></td> |
|
74 | <% end %> |
|
75 | <% end %> |
|
75 | <% end %> |
|
76 | <% end %> |
|
76 | <td><%= link_to 'Show', :action => 'show', :id => user %></td> |
|
77 | <td><%= link_to 'Show', :action => 'show', :id => user %></td> |
|
77 | <td><%= link_to 'Edit', :action => 'edit', :id => user %></td> |
|
78 | <td><%= link_to 'Edit', :action => 'edit', :id => user %></td> |
|
78 | <td><%= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post %></td> |
|
79 | <td><%= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post %></td> |
@@ -1,12 +1,12 | |||||
|
1 | - content_for :header do |
|
1 | - content_for :header do |
|
2 | = javascript_include_tag 'new' |
|
2 | = javascript_include_tag 'new' |
|
3 |
|
3 | ||
|
4 | %script{:type=>"text/javascript"} |
|
4 | %script{:type=>"text/javascript"} |
|
5 | $(function () { |
|
5 | $(function () { |
|
6 |
- $('#submission_table').tablesorter({widgets: ['zebra' |
|
6 | + $('#submission_table').tablesorter({widgets: ['zebra']}); |
|
7 | }); |
|
7 | }); |
|
8 |
|
8 | ||
|
9 | :css |
|
9 | :css |
|
10 | .fix-width { |
|
10 | .fix-width { |
|
11 | font-family: Droid Sans Mono,Consolas, monospace, mono, Courier New, Courier; |
|
11 | font-family: Droid Sans Mono,Consolas, monospace, mono, Courier New, Courier; |
|
12 | } |
|
12 | } |
@@ -24,26 +24,28 | |||||
|
24 |
|
24 | ||
|
25 | %table.tablesorter-cafe#submission_table |
|
25 | %table.tablesorter-cafe#submission_table |
|
26 | %thead |
|
26 | %thead |
|
27 | %tr |
|
27 | %tr |
|
28 | %th ID |
|
28 | %th ID |
|
29 | %th Problem code |
|
29 | %th Problem code |
|
30 | - %th Problem name |
|
30 | + %th Problem full name |
|
31 | %th Language |
|
31 | %th Language |
|
|
32 | + %th Submitted at | ||
|
32 | %th Result |
|
33 | %th Result |
|
33 | %th Score |
|
34 | %th Score |
|
34 | - if session[:admin] |
|
35 | - if session[:admin] |
|
35 | %th IP |
|
36 | %th IP |
|
36 | %tbody |
|
37 | %tbody |
|
37 | - @submission.each do |s| |
|
38 | - @submission.each do |s| |
|
38 | - next unless s.problem |
|
39 | - next unless s.problem |
|
39 | %tr |
|
40 | %tr |
|
40 | %td= link_to "#{s.id}", controller: "graders", action: "submission", id: s.id |
|
41 | %td= link_to "#{s.id}", controller: "graders", action: "submission", id: s.id |
|
41 | %td= s.problem.name |
|
42 | %td= s.problem.name |
|
42 | %td= s.problem.full_name |
|
43 | %td= s.problem.full_name |
|
43 | %td= s.language.pretty_name |
|
44 | %td= s.language.pretty_name |
|
|
45 | + %td #{s.submitted_at.strftime('%Y-%m-%d %H:%M')} (#{time_ago_in_words(s.submitted_at)} ago) | ||
|
44 | %td.fix-width= s.grader_comment |
|
46 | %td.fix-width= s.grader_comment |
|
45 | %td= (s.points*100)/s.problem.full_score |
|
47 | %td= (s.points*100)/s.problem.full_score |
|
46 | - if session[:admin] |
|
48 | - if session[:admin] |
|
47 | %td= s.ip_address |
|
49 | %td= s.ip_address |
|
48 |
|
50 | ||
|
49 |
|
51 |
You need to be logged in to leave comments.
Login now