Description:
change login box
fix add user, delete user
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r679:043258f318f9 - - 11 files changed: 55 inserted, 38 deleted
@@ -0,0 +1,7 | |||
|
1 | + %h1 New user | |
|
2 | + = form_tag( {action: 'create'}, { class: 'form-horizontal'}) do | |
|
3 | + = render :partial => 'form' | |
|
4 | + .form-group | |
|
5 | + .col-md-offset-2.col-md-10 | |
|
6 | + = submit_tag "Create", class: 'btn btn-primary' | |
|
7 | + = link_to 'Back', :action => 'index' |
@@ -543,6 +543,12 | |||
|
543 | 543 | } |
|
544 | 544 | |
|
545 | 545 | h2.contest-title { |
|
546 | 546 | margin-top: 5px; |
|
547 | 547 | margin-bottom: 5px; |
|
548 | 548 | } |
|
549 | + | |
|
550 | + | |
|
551 | + | |
|
552 | + .grader-comment { | |
|
553 | + word-wrap: break-word; | |
|
554 | + } |
@@ -12,13 +12,13 | |||
|
12 | 12 | <b>Notes:</b> |
|
13 | 13 | <%=h @announcement.notes %> |
|
14 | 14 | </p> |
|
15 | 15 | |
|
16 | 16 | <p> |
|
17 | 17 | <b>Body:</b> |
|
18 | - <%=h @announcement.body %> | |
|
18 | + <%=h markdown(@announcement.body) %> | |
|
19 | 19 | </p> |
|
20 | 20 | |
|
21 | 21 | <p> |
|
22 | 22 | <b>Published:</b> |
|
23 | 23 | <%=h @announcement.published %> |
|
24 | 24 | </p> |
@@ -9,28 +9,32 | |||
|
9 | 9 | - if flash[:notice] |
|
10 | 10 | %hr/ |
|
11 | 11 | %b= flash[:notice] |
|
12 | 12 | %hr/ |
|
13 | 13 | |
|
14 | 14 | %div{ :style => "border: solid 1px gray; padding: 4px; background: #eeeeff;"} |
|
15 | - = form_tag login_login_path do | |
|
16 | - %table | |
|
17 | - %tr | |
|
18 | - %td{:align => "right"} | |
|
19 | - ="#{t 'login_label'}:" | |
|
20 | - %td= text_field_tag 'login' | |
|
21 | - %tr | |
|
22 | - %td{:align => "right"} | |
|
23 | - ="#{t 'password_label'}:" | |
|
24 | - %td= password_field_tag | |
|
25 | - - unless GraderConfiguration['right.bypass_agreement'] | |
|
26 | - %tr | |
|
27 | - %td{:align => "right"}= check_box_tag 'accept_agree' | |
|
28 | - %td ยอมรับข้อตกลงการใช้งาน | |
|
29 | - | |
|
30 | - = submit_tag t('login.login_submit') | |
|
15 | + = form_tag login_login_path, {class: 'form-horizontal'} do | |
|
16 | + .form-group | |
|
17 | + =label_tag :login, "Login",class: 'col-sm-3 control-label' | |
|
18 | + .col-sm-9 | |
|
19 | + =text_field_tag :login, nil, class: 'form-control' | |
|
20 | + .form-group | |
|
21 | + =label_tag :password, "Password", class: 'col-sm-3 control-label' | |
|
22 | + .col-sm-9 | |
|
23 | + =password_field_tag :password, nil, class: 'form-control' | |
|
24 | + - unless GraderConfiguration['right.bypass_agreement'] | |
|
25 | + .form-group | |
|
26 | + .col-sm-offset-3.col-sm-9 | |
|
27 | + .checkbox | |
|
28 | + %label | |
|
29 | + = check_box_tag 'accept_agree' | |
|
30 | + ยอมรับข้อตกลงการใช้งาน | |
|
31 | + | |
|
32 | + .form-group | |
|
33 | + .col-sm-offset-3.col-sm-9 | |
|
34 | + = submit_tag t('login.login_submit'), class: 'btn btn-primary' | |
|
31 | 35 | %br/ |
|
32 | 36 | |
|
33 | 37 | - if GraderConfiguration['system.online_registration'] |
|
34 | 38 | =t 'login.participation' |
|
35 | 39 | %b |
|
36 | 40 | = "#{t 'login.please'} " |
@@ -8,13 +8,13 | |||
|
8 | 8 | = "#{problem.full_name}" |
|
9 | 9 | |
|
10 | 10 | %br |
|
11 | 11 | = link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, problem |
|
12 | 12 | %td |
|
13 | 13 | = @prob_submissions[problem.id][:count] |
|
14 | - = link_to "[subs]", main_submission_path(problem.id) | |
|
14 | + -#= link_to "[subs]", main_submission_path(problem.id) | |
|
15 | 15 | %td |
|
16 | 16 | = render :partial => 'submission_short', |
|
17 | 17 | :locals => {:submission => @prob_submissions[problem.id][:submission], :problem_name => problem.name, :problem_id => problem.id } |
|
18 | 18 | %td |
|
19 | 19 | - if @prob_submissions[problem.id][:submission] |
|
20 | 20 | = link_to 'Edit', edit_submission_path(@prob_submissions[problem.id][:submission]), class: 'btn btn-success' |
@@ -10,13 +10,13 | |||
|
10 | 10 | = "#{format_short_time(submission.graded_at.localtime)} " |
|
11 | 11 | %br |
|
12 | 12 | - if GraderConfiguration['ui.show_score'] |
|
13 | 13 | %strong=t 'main.score' |
|
14 | 14 | = "#{(submission.points*100/submission.problem.full_score).to_i} " |
|
15 | 15 | = " [" |
|
16 | - %tt | |
|
16 | + %tt.grader-comment | |
|
17 | 17 | = submission.grader_comment |
|
18 | 18 | = "]" |
|
19 | 19 | %br |
|
20 | 20 | %strong View: |
|
21 | 21 | - if GraderConfiguration.show_grading_result |
|
22 | 22 | = link_to '[detailed result]', :action => 'result', :id => submission.id |
@@ -1,12 +1,11 | |||
|
1 | 1 | %h1= GraderConfiguration['ui.front.title'] |
|
2 | 2 | |
|
3 | - %table | |
|
4 | - %tr | |
|
5 | - %td | |
|
6 | - - if @announcements.length!=0 | |
|
7 | - .announcementbox{:style => 'margin-top: 0px'} | |
|
8 | - %span{:class => 'title'} | |
|
9 | - Announcements | |
|
10 | - = render :partial => 'announcement', :collection => @announcements | |
|
11 | - %td{:style => 'vertical-align: top; width: 40%; padding-left: 20px;'} | |
|
12 | - = render :partial => 'login_box' | |
|
3 | + .row | |
|
4 | + .col-md-6 | |
|
5 | + - if @announcements.length!=0 | |
|
6 | + .announcementbox{:style => 'margin-top: 0px'} | |
|
7 | + %span{:class => 'title'} | |
|
8 | + Announcements | |
|
9 | + = render :partial => 'announcement', :collection => @announcements | |
|
10 | + .col-md-4{style: "padding-left: 20px;"} | |
|
11 | + = render :partial => 'login_box' |
@@ -1,31 +1,38 | |||
|
1 | 1 | = error_messages_for 'user' |
|
2 | 2 | / [form:user] |
|
3 | 3 | .form-group |
|
4 | 4 | %label.col-md-2.control-label{for: :login} Login |
|
5 | 5 | .col-md-4 |
|
6 | 6 | = text_field 'user', 'login', class: 'form-control' |
|
7 | + .col-md-6 | |
|
7 | 8 | .form-group |
|
8 | 9 | %label.col-md-2.control-label{for: :full_name} Full name |
|
9 | 10 | .col-md-4 |
|
10 | 11 | = text_field 'user', 'full_name', class: 'form-control' |
|
12 | + .col-md-6 | |
|
11 | 13 | .form-group |
|
12 | 14 | %label.col-md-2.control-label{for: :password} Password |
|
13 | 15 | .col-md-4 |
|
14 | 16 | = password_field 'user', 'password', class: 'form-control' |
|
17 | + .col-md-6 | |
|
15 | 18 | .form-group |
|
16 | 19 | %label.col-md-2.control-label{for: :password_confirmation} Password (confirm) |
|
17 | 20 | .col-md-4 |
|
18 | 21 | = password_field 'user', 'password_confirmation', class: 'form-control' |
|
22 | + .col-md-6 | |
|
19 | 23 | .form-group |
|
20 | 24 | %label.col-md-2.control-label{for: :email} E-mail |
|
21 | 25 | .col-md-4 |
|
22 | 26 | = email_field 'user', 'email', class: 'form-control' |
|
27 | + .col-md-6 | |
|
23 | 28 | .form-group |
|
24 | 29 | %label.col-md-2.control-label{for: :alias} Alias |
|
25 | 30 | .col-md-4 |
|
26 | 31 | = text_field 'user', 'alias', class: 'form-control' |
|
32 | + .col-md-6 | |
|
27 | 33 | .form-group |
|
28 | 34 | %label.col-md-2.control-label{for: :remark} Remark |
|
29 | 35 | .col-md-4 |
|
30 | 36 | = text_field 'user', 'remark', class: 'form-control' |
|
37 | + .col-md-6 | |
|
31 | 38 | / [eoform:user] |
@@ -92,10 +92,10 | |||
|
92 | 92 | %td= toggle_button(user.activated?, toggle_activate_user_path(user),"toggle_activate_user_#{user.id}") |
|
93 | 93 | %td= toggle_button(user.enabled?, toggle_enable_user_path(user),"toggle_enable_user_#{user.id}") |
|
94 | 94 | %td= user.last_ip |
|
95 | 95 | %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' |
|
96 | 96 | %td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block' |
|
97 | 97 | %td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block' |
|
98 |
- %td= link_to 'Destroy', |
|
|
98 | + %td= link_to 'Destroy', user_admin_destroy_path(user), data: {confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-danger btn-xs btn-block' | |
|
99 | 99 | %br/ |
|
100 | 100 | = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '} |
|
101 | 101 | = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '} |
@@ -77,12 +77,14 | |||
|
77 | 77 | #main |
|
78 | 78 | get "main/list" |
|
79 | 79 | get 'main/submission(/:id)', to: 'main#submission', as: 'main_submission' |
|
80 | 80 | |
|
81 | 81 | #user admin |
|
82 | 82 | get 'user_admin/bulk_manage', to: 'user_admin#bulk_manage', as: 'bulk_manage_user_admin' |
|
83 | + post 'user_admin', to: 'user_admin#create' | |
|
84 | + delete 'user_admin/:id', to: 'user_admin#destroy', as: 'user_admin_destroy' | |
|
83 | 85 | |
|
84 | 86 | #report |
|
85 | 87 | get 'report/current_score', to: 'report#current_score', as: 'report_current_score' |
|
86 | 88 | get 'report/problem_hof(/:id)', to: 'report#problem_hof', as: 'report_problem_hof' |
|
87 | 89 | get "report/login" |
|
88 | 90 | get 'report/max_score', to: 'report#max_score', as: 'report_max_score' |
deleted file |
You need to be logged in to leave comments.
Login now