Description:
- fix link to user stat from user admin - add compiler message to submission view - fix some bugs
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r611:5599f91f430d - - 4 files changed: 25 inserted, 6 deleted

@@ -1,82 +1,82
1 - content_for :head do
1 - content_for :head do
2 <meta http-equiv ="refresh" content="60"/>
2 <meta http-equiv ="refresh" content="60"/>
3
3
4 %h1 Grader information
4 %h1 Grader information
5
5
6 %p
6 %p
7 = link_to 'Refresh', { :action => 'list' }, class: 'btn btn-info'
7 = link_to 'Refresh', { :action => 'list' }, class: 'btn btn-info'
8
8
9 .panel.panel-primary
9 .panel.panel-primary
10 .panel-heading
10 .panel-heading
11 Grader control:
11 Grader control:
12 .panel-body
12 .panel-body
13 =link_to 'Start Graders in grading env', { action: 'start_grading'}, class: 'btn btn-default', method: 'post'
13 =link_to 'Start Graders in grading env', { action: 'start_grading'}, class: 'btn btn-default', method: 'post'
14 =link_to 'Start Graders in exam env', { action: 'start_exam'}, class: 'btn btn-default', method: 'post'
14 =link_to 'Start Graders in exam env', { action: 'start_exam'}, class: 'btn btn-default', method: 'post'
15 =link_to 'Stop all running Graders', { action: 'stop_all'}, class: 'btn btn-default', method: 'post'
15 =link_to 'Stop all running Graders', { action: 'stop_all'}, class: 'btn btn-default', method: 'post'
16 =link_to 'Clear all data', { action: 'clear_all'}, class: 'btn btn-default', method: 'post'
16 =link_to 'Clear all data', { action: 'clear_all'}, class: 'btn btn-default', method: 'post'
17
17
18 .row
18 .row
19 .col-md-6
19 .col-md-6
20 - if @last_task
20 - if @last_task
21 Last task:
21 Last task:
22 = link_to "#{@last_task.id}", :action => 'view', :id => @last_task.id, :type => 'Task'
22 = link_to "#{@last_task.id}", :action => 'view', :id => @last_task.id, :type => 'Task'
23
23
24 %br/
24 %br/
25
25
26 - if @last_test_request
26 - if @last_test_request
27 Last test_request:
27 Last test_request:
28 = link_to "#{@last_test_request.id}", :action => 'view', :id => @last_test_request.id, :type => 'TestRequest'
28 = link_to "#{@last_test_request.id}", :action => 'view', :id => @last_test_request.id, :type => 'TestRequest'
29
29
30 %h2 Current graders
30 %h2 Current graders
31
31
32 = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes}
32 = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes}
33
33
34 %h2 Stalled graders
34 %h2 Stalled graders
35
35
36 = render :partial => 'grader_list', :locals => {:grader_list => @stalled_processes}
36 = render :partial => 'grader_list', :locals => {:grader_list => @stalled_processes}
37
37
38 %h2 Terminated graders
38 %h2 Terminated graders
39
39
40 %p= link_to 'Clear data for terminated graders', { action: 'clear_terminated'}, class: 'btn btn-default', method: 'post'
40 %p= link_to 'Clear data for terminated graders', { action: 'clear_terminated'}, class: 'btn btn-default', method: 'post'
41
41
42 = render :partial => 'grader_list', :locals => {:grader_list => @terminated_processes}
42 = render :partial => 'grader_list', :locals => {:grader_list => @terminated_processes}
43 .col-md-6
43 .col-md-6
44 %h2 Last 20 submissions
44 %h2 Last 20 submissions
45 %table.table.table-striped.table-condensed
45 %table.table.table-striped.table-condensed
46 %thead
46 %thead
47 %th ID
47 %th ID
48 %th User
48 %th User
49 %th Problem
49 %th Problem
50 %th Submitted
50 %th Submitted
51 %th Graded
51 %th Graded
52 %th Result
52 %th Result
53 %tbody
53 %tbody
54 - @submission.each do |sub|
54 - @submission.each do |sub|
55 %tr.inactive
55 %tr.inactive
56 %td= link_to sub.id, submission_path(sub.id)
56 %td= link_to sub.id, submission_path(sub.id)
57 - %td= ("" unless sub.user) || link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id)
57 + %td= ("" unless sub.user) || link_to(sub.try(:user).try(:full_name), stat_user_path(sub.user.id))
58 - %td= ("" unless sub.problem) || link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id)
58 + %td= ("" unless sub.problem) || link_to(sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id))
59 %td= "#{time_ago_in_words(sub.submitted_at)} ago"
59 %td= "#{time_ago_in_words(sub.submitted_at)} ago"
60 %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " "
60 %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " "
61 %td= sub.grader_comment
61 %td= sub.grader_comment
62 %h2 Ungraded submission
62 %h2 Ungraded submission
63 %table.table.table-striped.table-condensed
63 %table.table.table-striped.table-condensed
64 %thead
64 %thead
65 %th ID
65 %th ID
66 %th User
66 %th User
67 %th Problem
67 %th Problem
68 %th Submitted
68 %th Submitted
69 %th Graded
69 %th Graded
70 %th Result
70 %th Result
71 %tbody
71 %tbody
72 - @backlog_submission.each do |sub|
72 - @backlog_submission.each do |sub|
73 %tr.inactive
73 %tr.inactive
74 %td= link_to sub.id, submission_path(sub.id)
74 %td= link_to sub.id, submission_path(sub.id)
75 - %td= ("" unless sub.user) || link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id)
75 + %td= ("" unless sub.user) || link_to( sub.try(:user).try(:full_name), stat_user_path(sub.user.id))
76 - %td= ("" unless sub.problem) || link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id)
76 + %td= ("" unless sub.problem) || link_to( sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id))
77 %td= "#{time_ago_in_words(sub.submitted_at)} ago"
77 %td= "#{time_ago_in_words(sub.submitted_at)} ago"
78 %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " "
78 %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " "
79 %td= sub.grader_comment
79 %td= sub.grader_comment
80
80
81
81
82
82
@@ -1,87 +1,92
1 %header.navbar.navbar-default.navbar-fixed-top
1 %header.navbar.navbar-default.navbar-fixed-top
2 %nav
2 %nav
3 .container-fluid
3 .container-fluid
4 .navbar-header
4 .navbar-header
5 + %button.navbar-toggle.collapsed{ data: {toggle: 'collapse', target: '#navbar-collapse'} }
6 + %span.sr-only Togggle Navigation
7 + %span.icon-bar
8 + %span.icon-bar
9 + %span.icon-bar
5 %a.navbar-brand{href: main_list_path}
10 %a.navbar-brand{href: main_list_path}
6 %span.glyphicon.glyphicon-home
11 %span.glyphicon.glyphicon-home
7 MAIN
12 MAIN
8 - .collapse.navbar-collapse
13 + .collapse.navbar-collapse#navbar-collapse
9 %ul.nav.navbar-nav
14 %ul.nav.navbar-nav
10 - if (@current_user!=nil) and (GraderConfiguration.show_tasks_to?(@current_user))
15 - if (@current_user!=nil) and (GraderConfiguration.show_tasks_to?(@current_user))
11 //= add_menu("#{I18n.t 'menu.tasks'}", 'tasks', 'list')
16 //= add_menu("#{I18n.t 'menu.tasks'}", 'tasks', 'list')
12 %li.dropdown
17 %li.dropdown
13 %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
18 %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
14 = "#{I18n.t 'menu.submissions'}"
19 = "#{I18n.t 'menu.submissions'}"
15 %span.caret
20 %span.caret
16 %ul.dropdown-menu
21 %ul.dropdown-menu
17 = add_menu("View", 'main', 'submission')
22 = add_menu("View", 'main', 'submission')
18 = add_menu("Self Test", 'test', 'index')
23 = add_menu("Self Test", 'test', 'index')
19 - if GraderConfiguration['right.user_hall_of_fame']
24 - if GraderConfiguration['right.user_hall_of_fame']
20 = add_menu("#{I18n.t 'menu.hall_of_fame'}", 'report', 'problem_hof')
25 = add_menu("#{I18n.t 'menu.hall_of_fame'}", 'report', 'problem_hof')
21 / display MODE button (with countdown in contest mode)
26 / display MODE button (with countdown in contest mode)
22 - if GraderConfiguration.analysis_mode?
27 - if GraderConfiguration.analysis_mode?
23 %div.navbar-btn.btn.btn-success#countdown= "ANALYSIS MODE"
28 %div.navbar-btn.btn.btn-success#countdown= "ANALYSIS MODE"
24 - elsif GraderConfiguration.time_limit_mode?
29 - elsif GraderConfiguration.time_limit_mode?
25 - if @current_user.contest_finished?
30 - if @current_user.contest_finished?
26 %div.navbar-btn.btn.btn-danger#countdown= "Contest is over"
31 %div.navbar-btn.btn.btn-danger#countdown= "Contest is over"
27 - elsif !@current_user.contest_started?
32 - elsif !@current_user.contest_started?
28 %div.navbar-btn.btn.btn-primary#countdown= (t 'title_bar.contest_not_started')
33 %div.navbar-btn.btn.btn-primary#countdown= (t 'title_bar.contest_not_started')
29 - else
34 - else
30 %div.navbar-btn.btn.btn-primary#countdown asdf
35 %div.navbar-btn.btn.btn-primary#countdown asdf
31 :javascript
36 :javascript
32 $("#countdown").countdown({until: "+#{@current_user.contest_time_left.to_i}s", layout: 'Time left: {hnn}:{mnn}:{snn}'});
37 $("#countdown").countdown({until: "+#{@current_user.contest_time_left.to_i}s", layout: 'Time left: {hnn}:{mnn}:{snn}'});
33 / admin section
38 / admin section
34 - if (@current_user!=nil) and (session[:admin])
39 - if (@current_user!=nil) and (session[:admin])
35 / management
40 / management
36 %li.dropdown
41 %li.dropdown
37 %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
42 %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
38 Manage
43 Manage
39 %span.caret
44 %span.caret
40 %ul.dropdown-menu
45 %ul.dropdown-menu
41 = add_menu( 'Announcements', 'announcements', 'index')
46 = add_menu( 'Announcements', 'announcements', 'index')
42 = add_menu( 'Problems', 'problems', 'index')
47 = add_menu( 'Problems', 'problems', 'index')
43 = add_menu( 'Users', 'user_admin', 'index')
48 = add_menu( 'Users', 'user_admin', 'index')
44 = add_menu( 'Graders', 'graders', 'list')
49 = add_menu( 'Graders', 'graders', 'list')
45 = add_menu( 'Message ', 'messages', 'console')
50 = add_menu( 'Message ', 'messages', 'console')
46 %li.divider{role: 'separator'}
51 %li.divider{role: 'separator'}
47 = add_menu( 'System config', 'configurations', 'index')
52 = add_menu( 'System config', 'configurations', 'index')
48 %li.divider{role: 'separator'}
53 %li.divider{role: 'separator'}
49 = add_menu( 'Sites', 'sites', 'index')
54 = add_menu( 'Sites', 'sites', 'index')
50 = add_menu( 'Contests', 'contest_management', 'index')
55 = add_menu( 'Contests', 'contest_management', 'index')
51 / report
56 / report
52 %li.dropdown
57 %li.dropdown
53 %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
58 %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
54 Report
59 Report
55 %span.caret
60 %span.caret
56 %ul.dropdown-menu
61 %ul.dropdown-menu
57 = add_menu( 'Current Score', 'report', 'current_score')
62 = add_menu( 'Current Score', 'report', 'current_score')
58 = add_menu( 'Score Report', 'report', 'max_score')
63 = add_menu( 'Score Report', 'report', 'max_score')
59 = add_menu( 'Report', 'report', 'multiple_login')
64 = add_menu( 'Report', 'report', 'multiple_login')
60 - if (ungraded = Submission.where('graded_at is null').where('submitted_at < ?', 1.minutes.ago).count) > 0
65 - if (ungraded = Submission.where('graded_at is null').where('submitted_at < ?', 1.minutes.ago).count) > 0
61 =link_to "#{ungraded} backlogs!",
66 =link_to "#{ungraded} backlogs!",
62 grader_list_path,
67 grader_list_path,
63 class: 'navbar-btn btn btn-default btn-warning', data: {toggle: 'tooltip'},title: 'Number of ungraded submission'
68 class: 'navbar-btn btn btn-default btn-warning', data: {toggle: 'tooltip'},title: 'Number of ungraded submission'
64
69
65 %ul.nav.navbar-nav.navbar-right
70 %ul.nav.navbar-nav.navbar-right
66 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-question-sign')}".html_safe, 'main', 'help')
71 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-question-sign')}".html_safe, 'main', 'help')
67 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-comment')}".html_safe, 'messages', 'list', {title: I18n.t('menu.messages'), data: {toggle: 'tooltip'}})
72 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-comment')}".html_safe, 'messages', 'list', {title: I18n.t('menu.messages'), data: {toggle: 'tooltip'}})
68 - if GraderConfiguration['system.user_setting_enabled']
73 - if GraderConfiguration['system.user_setting_enabled']
69 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-cog')}".html_safe, 'users', 'index', {title: I18n.t('menu.settings'), data: {toggle: 'tooltip'}})
74 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-cog')}".html_safe, 'users', 'index', {title: I18n.t('menu.settings'), data: {toggle: 'tooltip'}})
70 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-log-out')} #{@current_user.full_name}".html_safe, 'main', 'login', {title: I18n.t('menu.log_out'), data: {toggle: 'tooltip'}})
75 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-log-out')} #{@current_user.full_name}".html_safe, 'main', 'login', {title: I18n.t('menu.log_out'), data: {toggle: 'tooltip'}})
71
76
72 /
77 /
73 - if (@current_user!=nil) and (session[:admin])
78 - if (@current_user!=nil) and (session[:admin])
74 %nav.navbar.navbar-fixed-top.navbar-inverse.secondnavbar
79 %nav.navbar.navbar-fixed-top.navbar-inverse.secondnavbar
75 .container-fluid
80 .container-fluid
76 .collapse.navbar-collapse
81 .collapse.navbar-collapse
77 %ul.nav.navbar-nav
82 %ul.nav.navbar-nav
78 = add_menu( '[Announcements]', 'announcements', 'index')
83 = add_menu( '[Announcements]', 'announcements', 'index')
79 = add_menu( '[Msg console]', 'messages', 'console')
84 = add_menu( '[Msg console]', 'messages', 'console')
80 = add_menu( '[Problems]', 'problems', 'index')
85 = add_menu( '[Problems]', 'problems', 'index')
81 = add_menu( '[Users]', 'user_admin', 'index')
86 = add_menu( '[Users]', 'user_admin', 'index')
82 = add_menu( '[Results]', 'user_admin', 'user_stat')
87 = add_menu( '[Results]', 'user_admin', 'user_stat')
83 = add_menu( '[Report]', 'report', 'multiple_login')
88 = add_menu( '[Report]', 'report', 'multiple_login')
84 = add_menu( '[Graders]', 'graders', 'list')
89 = add_menu( '[Graders]', 'graders', 'list')
85 = add_menu( '[Contests]', 'contest_management', 'index')
90 = add_menu( '[Contests]', 'contest_management', 'index')
86 = add_menu( '[Sites]', 'sites', 'index')
91 = add_menu( '[Sites]', 'sites', 'index')
87 = add_menu( '[System config]', 'configurations', 'index')
92 = add_menu( '[System config]', 'configurations', 'index')
@@ -1,89 +1,103
1 %h1= "Submission: #{@submission.id}"
1 %h1= "Submission: #{@submission.id}"
2
2
3 %textarea#data{style: "display:none;"}
3 %textarea#data{style: "display:none;"}
4 :preserve
4 :preserve
5 #{@submission.source}
5 #{@submission.source}
6
6
7 //%div.highlight{:style => "border: 1px solid black;"}
7 //%div.highlight{:style => "border: 1px solid black;"}
8 //=@formatted_code.html_safe
8 //=@formatted_code.html_safe
9 +
10 +
9 .containter
11 .containter
10 .row
12 .row
11 .col-md-7
13 .col-md-7
12 %h2 Source Code
14 %h2 Source Code
13 .col-md-5
15 .col-md-5
14 %h2 Stat
16 %h2 Stat
15 .row
17 .row
16 .col-md-7
18 .col-md-7
17 %div#editor{ style: "font-size: 14px; height: 400px; border-radius:5px;" }
19 %div#editor{ style: "font-size: 14px; height: 400px; border-radius:5px;" }
18 :javascript
20 :javascript
19 e = ace.edit("editor")
21 e = ace.edit("editor")
20 e.setOptions({ maxLines: Infinity })
22 e.setOptions({ maxLines: Infinity })
21 e.setValue($("#data").text())
23 e.setValue($("#data").text())
22 e.gotoLine(1)
24 e.gotoLine(1)
23 e.getSession().setMode("#{get_ace_mode(@submission.language)}")
25 e.getSession().setMode("#{get_ace_mode(@submission.language)}")
24 e.setReadOnly(true)
26 e.setReadOnly(true)
25 .col-md-5
27 .col-md-5
26 %table.table.table-striped
28 %table.table.table-striped
27 %tr
29 %tr
28 %td.text-right
30 %td.text-right
29 %strong User
31 %strong User
30 %td
32 %td
31 - if @submission.user
33 - if @submission.user
32 = link_to "#{@submission.user.login}", stat_user_path(@submission.user)
34 = link_to "#{@submission.user.login}", stat_user_path(@submission.user)
33 = @submission.user.full_name
35 = @submission.user.full_name
34 - else
36 - else
35 = "(n/a)"
37 = "(n/a)"
36 %tr
38 %tr
37 %td.text-right
39 %td.text-right
38 %strong Task
40 %strong Task
39 %td
41 %td
40 - if @submission.problem!=nil
42 - if @submission.problem!=nil
41 = link_to "[#{@submission.problem.name}]", stat_problem_path(@submission.problem)
43 = link_to "[#{@submission.problem.name}]", stat_problem_path(@submission.problem)
42 = @submission.problem.full_name
44 = @submission.problem.full_name
43 - else
45 - else
44 = "(n/a)"
46 = "(n/a)"
45 %tr
47 %tr
46 %td.text-right
48 %td.text-right
47 %strong Tries
49 %strong Tries
48 %td= @submission.number
50 %td= @submission.number
49 %tr
51 %tr
50 %td.text-right
52 %td.text-right
51 %strong Language
53 %strong Language
52 %td= @submission.language.pretty_name
54 %td= @submission.language.pretty_name
53 %tr
55 %tr
54 %td.text-right
56 %td.text-right
55 %strong Submitted
57 %strong Submitted
56 %td #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)})
58 %td #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)})
57 %tr
59 %tr
58 %td.text-right
60 %td.text-right
59 %strong Graded
61 %strong Graded
60 - if @submission.graded_at
62 - if @submission.graded_at
61 %td #{time_ago_in_words(@submission.graded_at)} ago (at #{@submission.graded_at.to_formatted_s(:long)})
63 %td #{time_ago_in_words(@submission.graded_at)} ago (at #{@submission.graded_at.to_formatted_s(:long)})
62 - else
64 - else
63 %td -
65 %td -
64 %tr
66 %tr
65 %td.text-right
67 %td.text-right
66 %strong Points
68 %strong Points
67 %td #{@submission.points}/#{@submission.problem.full_score}
69 %td #{@submission.points}/#{@submission.problem.full_score}
68 %tr
70 %tr
69 %td.text-right
71 %td.text-right
70 %strong Comment
72 %strong Comment
71 %td #{@submission.grader_comment}
73 %td #{@submission.grader_comment}
72 %tr
74 %tr
73 %td.text-right
75 %td.text-right
74 %strong Runtime (s)
76 %strong Runtime (s)
75 %td #{@submission.max_runtime}
77 %td #{@submission.max_runtime}
76 %tr
78 %tr
77 %td.text-right
79 %td.text-right
78 %strong Memory (kb)
80 %strong Memory (kb)
79 %td #{@submission.peak_memory}
81 %td #{@submission.peak_memory}
80 %tr
82 %tr
81 %td.text-right
83 %td.text-right
82 %strong Compiler result
84 %strong Compiler result
83 %td
85 %td
86 + %button.btn.btn-info.btn-xs{type: 'button', data: {toggle: 'modal', target: '#compiler'}}
87 + view
88 + .modal.fade#compiler{tabindex: -1,role: 'dialog'}
89 + .modal-dialog.modal-lg{role:'document'}
90 + .modal-content
91 + .modal-header
92 + %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}}
93 + %span{aria: {hidden: 'true'}, data: {dismiss: 'modal'}} &times;
94 + %h4 Compiler message
95 + .modal-body
84 %pre= @submission.compiler_message
96 %pre= @submission.compiler_message
97 + .modal-footer
98 + %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close
85 - if session[:admin]
99 - if session[:admin]
86 %tr
100 %tr
87 %td.text-right
101 %td.text-right
88 %strong IP
102 %strong IP
89 %td #{@submission.ip_address}
103 %td #{@submission.ip_address}
@@ -1,100 +1,100
1 %h1 Listing users
1 %h1 Listing users
2
2
3 .panel.panel-primary
3 .panel.panel-primary
4 .panel-title.panel-heading
4 .panel-title.panel-heading
5 Quick Add
5 Quick Add
6 .panel-body
6 .panel-body
7 = form_tag( {method: 'post'}, {class: 'form-inline'}) do
7 = form_tag( {method: 'post'}, {class: 'form-inline'}) do
8 .form-group
8 .form-group
9 = label_tag 'user_login', 'Login'
9 = label_tag 'user_login', 'Login'
10 = text_field 'user', 'login', :size => 10,class: 'form-control'
10 = text_field 'user', 'login', :size => 10,class: 'form-control'
11 .form-group
11 .form-group
12 = label_tag 'user_full_name', 'Full Name'
12 = label_tag 'user_full_name', 'Full Name'
13 = text_field 'user', 'full_name', :size => 10,class: 'form-control'
13 = text_field 'user', 'full_name', :size => 10,class: 'form-control'
14 .form-group
14 .form-group
15 = label_tag 'user_password', 'Password'
15 = label_tag 'user_password', 'Password'
16 = text_field 'user', 'password', :size => 10,class: 'form-control'
16 = text_field 'user', 'password', :size => 10,class: 'form-control'
17 .form-group
17 .form-group
18 = label_tag 'user_password_confirmation', 'Confirm'
18 = label_tag 'user_password_confirmation', 'Confirm'
19 = text_field 'user', 'password_confirmation', :size => 10,class: 'form-control'
19 = text_field 'user', 'password_confirmation', :size => 10,class: 'form-control'
20 .form-group
20 .form-group
21 = label_tag 'user_email', 'email'
21 = label_tag 'user_email', 'email'
22 = text_field 'user', 'email', :size => 10,class: 'form-control'
22 = text_field 'user', 'email', :size => 10,class: 'form-control'
23 =submit_tag "Create", class: 'btn btn-primary'
23 =submit_tag "Create", class: 'btn btn-primary'
24
24
25 .panel.panel-primary
25 .panel.panel-primary
26 .panel-title.panel-heading
26 .panel-title.panel-heading
27 Import from site management
27 Import from site management
28 .panel-body
28 .panel-body
29 = form_tag({:action => 'import'}, :multipart => true,class: 'form form-inline') do
29 = form_tag({:action => 'import'}, :multipart => true,class: 'form form-inline') do
30 .form-group
30 .form-group
31 = label_tag :file, 'File:'
31 = label_tag :file, 'File:'
32 .input-group
32 .input-group
33 %span.input-group-btn
33 %span.input-group-btn
34 %span.btn.btn-default.btn-file
34 %span.btn.btn-default.btn-file
35 Browse
35 Browse
36 = file_field_tag 'file'
36 = file_field_tag 'file'
37 = text_field_tag '' , nil, {readonly: true, class: 'form-control'}
37 = text_field_tag '' , nil, {readonly: true, class: 'form-control'}
38 = submit_tag 'Submit', class: 'btn btn-default'
38 = submit_tag 'Submit', class: 'btn btn-default'
39
39
40
40
41 %p
41 %p
42 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
42 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
43 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
43 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
44 = link_to 'View administrators',{ :action => 'admin'}, { class: 'btn btn-default '}
44 = link_to 'View administrators',{ :action => 'admin'}, { class: 'btn btn-default '}
45 = link_to 'Random passwords',{ :action => 'random_all_passwords'}, { class: 'btn btn-default '}
45 = link_to 'Random passwords',{ :action => 'random_all_passwords'}, { class: 'btn btn-default '}
46 = link_to 'View active users',{ :action => 'active'}, { class: 'btn btn-default '}
46 = link_to 'View active users',{ :action => 'active'}, { class: 'btn btn-default '}
47 = link_to 'Mass mailing',{ :action => 'mass_mailing'}, { class: 'btn btn-default '}
47 = link_to 'Mass mailing',{ :action => 'mass_mailing'}, { class: 'btn btn-default '}
48
48
49 - if GraderConfiguration.multicontests?
49 - if GraderConfiguration.multicontests?
50 %br/
50 %br/
51 %b Multi-contest:
51 %b Multi-contest:
52 = link_to '[Manage bulk users in contests]', :action => 'contest_management'
52 = link_to '[Manage bulk users in contests]', :action => 'contest_management'
53 View users in:
53 View users in:
54 - @contests.each do |contest|
54 - @contests.each do |contest|
55 = link_to "[#{contest.name}]", :action => 'contests', :id => contest.id
55 = link_to "[#{contest.name}]", :action => 'contests', :id => contest.id
56 = link_to "[no contest]", :action => 'contests', :id => 'none'
56 = link_to "[no contest]", :action => 'contests', :id => 'none'
57
57
58 Total #{@user_count} users |
58 Total #{@user_count} users |
59 - if !@paginated
59 - if !@paginated
60 Display all users.
60 Display all users.
61 \#{link_to '[show in pages]', :action => 'index', :page => '1'}
61 \#{link_to '[show in pages]', :action => 'index', :page => '1'}
62 - else
62 - else
63 Display in pages.
63 Display in pages.
64 \#{link_to '[display all]', :action => 'index', :page => 'all'} |
64 \#{link_to '[display all]', :action => 'index', :page => 'all'} |
65 \#{will_paginate @users, :container => false}
65 \#{will_paginate @users, :container => false}
66
66
67
67
68 %table.table.table-hover.table-condense
68 %table.table.table-hover.table-condense
69 %thead
69 %thead
70 %th Login
70 %th Login
71 %th Full name
71 %th Full name
72 %th email
72 %th email
73 %th Remark
73 %th Remark
74 %th
74 %th
75 Activated
75 Activated
76 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'User has already confirmed the email?' } [?]
76 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'User has already confirmed the email?' } [?]
77 %th
77 %th
78 Enabled
78 Enabled
79 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'Allow the user to login?' } [?]
79 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'Allow the user to login?' } [?]
80 %th Last IP
80 %th Last IP
81 %th
81 %th
82 %th
82 %th
83 %th
83 %th
84 %th
84 %th
85 - for user in @users
85 - for user in @users
86 %tr
86 %tr
87 - %td= link_to user.login, controller: :users, :action => 'profile', :id => user
87 + %td= link_to user.login, stat_user_path(user)
88 %td= user.full_name
88 %td= user.full_name
89 %td= user.email
89 %td= user.email
90 %td= user.remark
90 %td= user.remark
91 %td= toggle_button(user.activated?, toggle_activate_user_path(user),"toggle_activate_user_#{user.id}")
91 %td= toggle_button(user.activated?, toggle_activate_user_path(user),"toggle_activate_user_#{user.id}")
92 %td= toggle_button(user.enabled?, toggle_enable_user_path(user),"toggle_enable_user_#{user.id}")
92 %td= toggle_button(user.enabled?, toggle_enable_user_path(user),"toggle_enable_user_#{user.id}")
93 %td= user.last_ip
93 %td= user.last_ip
94 %td= link_to 'Clear IP', {:action => 'clear_last_ip', :id => user, :page=>params[:page]}, :confirm => 'This will reset last logging in ip of the user, are you sure?', class: 'btn btn-default btn-xs btn-block'
94 %td= link_to 'Clear IP', {:action => 'clear_last_ip', :id => user, :page=>params[:page]}, :confirm => 'This will reset last logging in ip of the user, are you sure?', class: 'btn btn-default btn-xs btn-block'
95 %td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block'
95 %td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block'
96 %td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block'
96 %td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block'
97 %td= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :delete, class: 'btn btn-danger btn-xs btn-block'
97 %td= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :delete, class: 'btn btn-danger btn-xs btn-block'
98 %br/
98 %br/
99 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
99 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
100 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
100 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
You need to be logged in to leave comments. Login now