Description:
- panel the main page - bootstrapize user_admin
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r577:41b47d07f81f - - 2 files changed: 33 inserted, 47 deleted

@@ -1,57 +1,52
1 - content_for :head do
1 - content_for :head do
2 = javascript_include_tag "announcement_refresh"
2 = javascript_include_tag "announcement_refresh"
3
3
4 = user_title_bar(@user)
4 = user_title_bar(@user)
5
5
6 - if (GraderConfiguration.contest_mode?) and (@user.site!=nil) and (@user.site.started!=true)
6 - if (GraderConfiguration.contest_mode?) and (@user.site!=nil) and (@user.site.started!=true)
7 %p=t 'main.start_soon'
7 %p=t 'main.start_soon'
8
8
9 .row
9 .row
10 .col-md-7
10 .col-md-7
11 - if GraderConfiguration.show_submitbox_to?(@user)
11 - if GraderConfiguration.show_submitbox_to?(@user)
12 - .submitbox
12 + .panel.panel-primary
13 - = render :partial => 'submission_box'
13 + .panel-heading
14 + Submission
15 + .panel-body
16 + = render :partial => 'submission_box'
14 - if GraderConfiguration.show_tasks_to?(@user)
17 - if GraderConfiguration.show_tasks_to?(@user)
15 - if not GraderConfiguration.multicontests?
18 - if not GraderConfiguration.multicontests?
16 %table.table.table-striped.table-condensed
19 %table.table.table-striped.table-condensed
17 %thead
20 %thead
18 %tr
21 %tr
19 %th Task name
22 %th Task name
20 %th Full name
23 %th Full name
21 %th # of sub(s)
24 %th # of sub(s)
22 %th Results
25 %th Results
23 %th
26 %th
24 %tbody
27 %tbody
25 = render :partial => 'problem', :collection => @problems
28 = render :partial => 'problem', :collection => @problems
26 - else
29 - else
27 - @contest_problems.each do |cp|
30 - @contest_problems.each do |cp|
28 - if cp[:problems].length > 0
31 - if cp[:problems].length > 0
29 %h2{:class =>'contest-title'}
32 %h2{:class =>'contest-title'}
30 = "#{cp[:contest] ? cp[:contest].title : 'Public problems'}"
33 = "#{cp[:contest] ? cp[:contest].title : 'Public problems'}"
31 %table.info
34 %table.info
32 %tr.info-head
35 %tr.info-head
33 %th Task name
36 %th Task name
34 %th Full name
37 %th Full name
35 %th # of sub(s)
38 %th # of sub(s)
36 %th Results
39 %th Results
37 %th
40 %th
38 = render :partial => 'problem', :collection => cp[:problems]
41 = render :partial => 'problem', :collection => cp[:problems]
39 .col-md-5
42 .col-md-5
40 .panel.panel-info
43 .panel.panel-info
41 .panel-heading
44 .panel-heading
42 Announcement
45 Announcement
43 %ul.list-group
46 %ul.list-group
44 = render :partial => 'announcement', :collection => @announcements
47 = render :partial => 'announcement', :collection => @announcements
45
48
46 -
47 -
48 - %hr/
49 -
50 -
51 -
52 - %hr/
53 -
54 %script{:type => 'text/javascript'}
49 %script{:type => 'text/javascript'}
55 = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';"
50 = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';"
56 Announcement.registerRefreshEventTimer();
51 Announcement.registerRefreshEventTimer();
57
52
@@ -5,105 +5,96
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( {method: 'post',multipart: true, action: 'import'}, {class: 'form-inline'}) do
29 + = form_tag({:action => 'import'}, :multipart => true,class: 'form form-inline') do
30 - .form-group
31 - = label_tag 'user_login', 'Login'
32 - = text_field 'user', 'login', :size => 10,class: 'form-control'
33 - .form-group
34 - = label_tag 'user_full_name', 'Full Name'
35 - = text_field 'user', 'full_name', :size => 10,class: 'form-control'
36 .form-group
30 .form-group
37 - = label_tag 'user_password', 'Password'
31 + = label_tag :file, 'File:'
38 - = text_field 'user', 'password', :size => 10,class: 'form-control'
32 + .input-group
39 - .form-group
33 + %span.input-group-btn
40 - = label_tag 'user_password_confirmation', 'Confirm'
34 + %span.btn.btn-default.btn-file
41 - = text_field 'user', 'password_confirmation', :size => 10,class: 'form-control'
35 + Browse
42 - .form-group
36 + = file_field_tag 'file'
43 - = label_tag 'user_email', 'email'
37 + = text_field_tag '' , nil, {readonly: true, class: 'form-control'}
44 - = text_field 'user', 'email', :size => 10,class: 'form-control'
38 + = submit_tag 'Submit', class: 'btn btn-default'
45 - =submit_tag "Create", class: 'btn btn-primary'
39 +
46
40
47 - .submitbox
41 + %p
48 - %b Import from site management
42 + = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
49 - = form_tag({:action => 'import'}, :multipart => true) do
43 + = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
50 - File: #{file_field_tag 'file'} #{submit_tag 'Import'}
44 + = link_to 'View administrators',{ :action => 'admin'}, { 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 '}
47 + = link_to 'Mass mailing',{ :action => 'mass_mailing'}, { class: 'btn btn-default '}
48 +
49 + - if GraderConfiguration.multicontests?
51 %br/
50 %br/
52 - %b What else:
51 + %b Multi-contest:
53 - = link_to 'New user', {:action => 'new'}, { class: 'btn btn-default btn-sm'}
52 + = link_to '[Manage bulk users in contests]', :action => 'contest_management'
54 - = link_to 'New list of users',{ :action => 'new_list'}, { class: 'btn btn-default btn-sm'}
53 + View users in:
55 - = link_to 'View administrators',{ :action => 'admin'}, { class: 'btn btn-default btn-sm'}
54 + - @contests.each do |contest|
56 - = link_to 'Random passwords',{ :action => 'random_all_passwords'}, { class: 'btn btn-default btn-sm'}
55 + = link_to "[#{contest.name}]", :action => 'contests', :id => contest.id
57 - = link_to 'View active users',{ :action => 'active'}, { class: 'btn btn-default btn-sm'}
56 + = link_to "[no contest]", :action => 'contests', :id => 'none'
58 - = link_to 'Mass mailing',{ :action => 'mass_mailing'}, { class: 'btn btn-default btn-sm'}
57 +
59 - - if GraderConfiguration.multicontests?
60 - %br/
61 - %b Multi-contest:
62 - = link_to '[Manage bulk users in contests]', :action => 'contest_management'
63 - View users in:
64 - - @contests.each do |contest|
65 - = link_to "[#{contest.name}]", :action => 'contests', :id => contest.id
66 - = link_to "[no contest]", :action => 'contests', :id => 'none'
67 Total #{@user_count} users |
58 Total #{@user_count} users |
68 - if !@paginated
59 - if !@paginated
69 Display all users.
60 Display all users.
70 \#{link_to '[show in pages]', :action => 'index', :page => '1'}
61 \#{link_to '[show in pages]', :action => 'index', :page => '1'}
71 - else
62 - else
72 Display in pages.
63 Display in pages.
73 \#{link_to '[display all]', :action => 'index', :page => 'all'} |
64 \#{link_to '[display all]', :action => 'index', :page => 'all'} |
74 \#{will_paginate @users, :container => false}
65 \#{will_paginate @users, :container => false}
75
66
76
67
77 %table.table.table-hover.table-condense
68 %table.table.table-hover.table-condense
78 %thead
69 %thead
79 %th Login
70 %th Login
80 %th Full name
71 %th Full name
81 %th email
72 %th email
82 %th Remark
73 %th Remark
83 %th
74 %th
84 Activated
75 Activated
85 %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?' } [?]
86 %th
77 %th
87 Enabled
78 Enabled
88 %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?' } [?]
89 %th Last IP
80 %th Last IP
90 %th
81 %th
91 %th
82 %th
92 %th
83 %th
93 %th
84 %th
94 - for user in @users
85 - for user in @users
95 %tr
86 %tr
96 %td= link_to user.login, controller: :users, :action => 'profile', :id => user
87 %td= link_to user.login, controller: :users, :action => 'profile', :id => user
97 %td= user.full_name
88 %td= user.full_name
98 %td= user.email
89 %td= user.email
99 %td= user.remark
90 %td= user.remark
100 %td= toggle_button(user.activated?, toggle_activate_user_url(user),"toggle_activate_user_#{user.id}")
91 %td= toggle_button(user.activated?, toggle_activate_user_url(user),"toggle_activate_user_#{user.id}")
101 %td= toggle_button(user.enabled?, toggle_enable_user_url(user),"toggle_enable_user_#{user.id}")
92 %td= toggle_button(user.enabled?, toggle_enable_user_url(user),"toggle_enable_user_#{user.id}")
102 %td= user.last_ip
93 %td= user.last_ip
103 %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'
104 %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'
105 %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'
106 %td= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post, class: 'btn btn-danger btn-xs btn-block'
97 %td= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post, class: 'btn btn-danger btn-xs btn-block'
107 %br/
98 %br/
108 - = link_to '[New user]', :action => 'new'
99 + = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
109 - = link_to '[New list of users]', :action => 'new_list'
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