Description:
change login box fix add user, delete user
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r679:043258f318f9 - - 11 files changed: 47 inserted, 30 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'
@@ -546,3 +546,9
546 margin-top: 5px;
546 margin-top: 5px;
547 margin-bottom: 5px;
547 margin-bottom: 5px;
548 }
548 }
549 +
550 +
551 +
552 + .grader-comment {
553 + word-wrap: break-word;
554 + }
@@ -15,7 +15,7
15
15
16 <p>
16 <p>
17 <b>Body:</b>
17 <b>Body:</b>
18 - <%=h @announcement.body %>
18 + <%=h markdown(@announcement.body) %>
19 </p>
19 </p>
20
20
21 <p>
21 <p>
@@ -12,22 +12,26
12 %hr/
12 %hr/
13
13
14 %div{ :style => "border: solid 1px gray; padding: 4px; background: #eeeeff;"}
14 %div{ :style => "border: solid 1px gray; padding: 4px; background: #eeeeff;"}
15 - = form_tag login_login_path do
15 + = form_tag login_login_path, {class: 'form-horizontal'} do
16 - %table
16 + .form-group
17 - %tr
17 + =label_tag :login, "Login",class: 'col-sm-3 control-label'
18 - %td{:align => "right"}
18 + .col-sm-9
19 - ="#{t 'login_label'}:"
19 + =text_field_tag :login, nil, class: 'form-control'
20 - %td= text_field_tag 'login'
20 + .form-group
21 - %tr
21 + =label_tag :password, "Password", class: 'col-sm-3 control-label'
22 - %td{:align => "right"}
22 + .col-sm-9
23 - ="#{t 'password_label'}:"
23 + =password_field_tag :password, nil, class: 'form-control'
24 - %td= password_field_tag
25 - unless GraderConfiguration['right.bypass_agreement']
24 - unless GraderConfiguration['right.bypass_agreement']
26 - %tr
25 + .form-group
27 - %td{:align => "right"}= check_box_tag 'accept_agree'
26 + .col-sm-offset-3.col-sm-9
28 - %td ยอมรับข้อตกลงการใช้งาน
27 + .checkbox
28 + %label
29 + = check_box_tag 'accept_agree'
30 + ยอมรับข้อตกลงการใช้งาน
29
31
30 - = submit_tag t('login.login_submit')
32 + .form-group
33 + .col-sm-offset-3.col-sm-9
34 + = submit_tag t('login.login_submit'), class: 'btn btn-primary'
31 %br/
35 %br/
32
36
33 - if GraderConfiguration['system.online_registration']
37 - if GraderConfiguration['system.online_registration']
@@ -11,7 +11,7
11 = link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, problem
11 = link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, problem
12 %td
12 %td
13 = @prob_submissions[problem.id][:count]
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 %td
15 %td
16 = render :partial => 'submission_short',
16 = render :partial => 'submission_short',
17 :locals => {:submission => @prob_submissions[problem.id][:submission], :problem_name => problem.name, :problem_id => problem.id }
17 :locals => {:submission => @prob_submissions[problem.id][:submission], :problem_name => problem.name, :problem_id => problem.id }
@@ -13,7 +13,7
13 %strong=t 'main.score'
13 %strong=t 'main.score'
14 = "#{(submission.points*100/submission.problem.full_score).to_i} "
14 = "#{(submission.points*100/submission.problem.full_score).to_i} "
15 = " ["
15 = " ["
16 - %tt
16 + %tt.grader-comment
17 = submission.grader_comment
17 = submission.grader_comment
18 = "]"
18 = "]"
19 %br
19 %br
@@ -1,12 +1,11
1 %h1= GraderConfiguration['ui.front.title']
1 %h1= GraderConfiguration['ui.front.title']
2
2
3 - %table
3 + .row
4 - %tr
4 + .col-md-6
5 - %td
6 - if @announcements.length!=0
5 - if @announcements.length!=0
7 .announcementbox{:style => 'margin-top: 0px'}
6 .announcementbox{:style => 'margin-top: 0px'}
8 %span{:class => 'title'}
7 %span{:class => 'title'}
9 Announcements
8 Announcements
10 = render :partial => 'announcement', :collection => @announcements
9 = render :partial => 'announcement', :collection => @announcements
11 - %td{:style => 'vertical-align: top; width: 40%; padding-left: 20px;'}
10 + .col-md-4{style: "padding-left: 20px;"}
12 = render :partial => 'login_box'
11 = render :partial => 'login_box'
@@ -4,28 +4,35
4 %label.col-md-2.control-label{for: :login} Login
4 %label.col-md-2.control-label{for: :login} Login
5 .col-md-4
5 .col-md-4
6 = text_field 'user', 'login', class: 'form-control'
6 = text_field 'user', 'login', class: 'form-control'
7 + .col-md-6
7 .form-group
8 .form-group
8 %label.col-md-2.control-label{for: :full_name} Full name
9 %label.col-md-2.control-label{for: :full_name} Full name
9 .col-md-4
10 .col-md-4
10 = text_field 'user', 'full_name', class: 'form-control'
11 = text_field 'user', 'full_name', class: 'form-control'
12 + .col-md-6
11 .form-group
13 .form-group
12 %label.col-md-2.control-label{for: :password} Password
14 %label.col-md-2.control-label{for: :password} Password
13 .col-md-4
15 .col-md-4
14 = password_field 'user', 'password', class: 'form-control'
16 = password_field 'user', 'password', class: 'form-control'
17 + .col-md-6
15 .form-group
18 .form-group
16 %label.col-md-2.control-label{for: :password_confirmation} Password (confirm)
19 %label.col-md-2.control-label{for: :password_confirmation} Password (confirm)
17 .col-md-4
20 .col-md-4
18 = password_field 'user', 'password_confirmation', class: 'form-control'
21 = password_field 'user', 'password_confirmation', class: 'form-control'
22 + .col-md-6
19 .form-group
23 .form-group
20 %label.col-md-2.control-label{for: :email} E-mail
24 %label.col-md-2.control-label{for: :email} E-mail
21 .col-md-4
25 .col-md-4
22 = email_field 'user', 'email', class: 'form-control'
26 = email_field 'user', 'email', class: 'form-control'
27 + .col-md-6
23 .form-group
28 .form-group
24 %label.col-md-2.control-label{for: :alias} Alias
29 %label.col-md-2.control-label{for: :alias} Alias
25 .col-md-4
30 .col-md-4
26 = text_field 'user', 'alias', class: 'form-control'
31 = text_field 'user', 'alias', class: 'form-control'
32 + .col-md-6
27 .form-group
33 .form-group
28 %label.col-md-2.control-label{for: :remark} Remark
34 %label.col-md-2.control-label{for: :remark} Remark
29 .col-md-4
35 .col-md-4
30 = text_field 'user', 'remark', class: 'form-control'
36 = text_field 'user', 'remark', class: 'form-control'
37 + .col-md-6
31 / [eoform:user]
38 / [eoform:user]
@@ -95,7 +95,7
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'
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 %td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block'
96 %td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block'
97 %td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block'
97 %td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block'
98 - %td= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :delete, class: 'btn btn-danger btn-xs btn-block'
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 %br/
99 %br/
100 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
100 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
101 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
101 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
@@ -80,6 +80,8
80
80
81 #user admin
81 #user admin
82 get 'user_admin/bulk_manage', to: 'user_admin#bulk_manage', as: 'bulk_manage_user_admin'
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 #report
86 #report
85 get 'report/current_score', to: 'report#current_score', as: 'report_current_score'
87 get 'report/current_score', to: 'report#current_score', as: 'report_current_score'
deleted file
You need to be logged in to leave comments. Login now