Description:
before upgrading to rails 5.2
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r749:6336d013fbfd - - 2 files changed: 3 inserted, 2 deleted

@@ -1,51 +1,51
1 %h1 Bulk Manage User
1 %h1 Bulk Manage User
2
2
3 - = form_tag bulk_manage_user_admin_path
3 + = form_tag bulk_manage_user_admin_index_path
4 .row
4 .row
5 .col-md-6
5 .col-md-6
6 .panel.panel-primary
6 .panel.panel-primary
7 .panel-title.panel-heading
7 .panel-title.panel-heading
8 Filter User
8 Filter User
9 .panel-body
9 .panel-body
10 Filtering users whose login match the following MySQL regex
10 Filtering users whose login match the following MySQL regex
11 .form-group
11 .form-group
12 = label_tag "regex", 'Regex Pattern'
12 = label_tag "regex", 'Regex Pattern'
13 = text_field_tag "regex", params[:regex], class: 'form-control'
13 = text_field_tag "regex", params[:regex], class: 'form-control'
14 %p
14 %p
15 Example
15 Example
16 %ul
16 %ul
17 %li
17 %li
18 %code root
18 %code root
19 matches every user whose login contains "root"
19 matches every user whose login contains "root"
20 %li
20 %li
21 %code ^56
21 %code ^56
22 matches every user whose login starts with "56"
22 matches every user whose login starts with "56"
23 %li
23 %li
24 %code 21$
24 %code 21$
25 matches every user whose login ends with "21"
25 matches every user whose login ends with "21"
26 .col-md-6
26 .col-md-6
27 .panel.panel-primary
27 .panel.panel-primary
28 .panel-title.panel-heading
28 .panel-title.panel-heading
29 Action
29 Action
30 .panel-body
30 .panel-body
31 .row.form-group
31 .row.form-group
32 .col-md-6
32 .col-md-6
33 %label.checkbox-inline
33 %label.checkbox-inline
34 = check_box_tag "enabled", true, params[:enabled]
34 = check_box_tag "enabled", true, params[:enabled]
35 Change "Enabled" to
35 Change "Enabled" to
36 .col-md-3
36 .col-md-3
37 %label.radio-inline
37 %label.radio-inline
38 = radio_button_tag "enable", 1, params[:enable] == '1', id: 'enable-yes'
38 = radio_button_tag "enable", 1, params[:enable] == '1', id: 'enable-yes'
39 Yes
39 Yes
40 .col-md-3
40 .col-md-3
41 %label.radio-inline
41 %label.radio-inline
42 = radio_button_tag "enable", 0, params[:enable] == '0', id: 'enable-no'
42 = radio_button_tag "enable", 0, params[:enable] == '0', id: 'enable-no'
43 No
43 No
44 .row.form-group
44 .row.form-group
45 .col-md-6
45 .col-md-6
46 %label.checkbox-inline
46 %label.checkbox-inline
47 = check_box_tag "gen_password", true, params[:gen_password]
47 = check_box_tag "gen_password", true, params[:gen_password]
48 Generate new random password
48 Generate new random password
49 .row.form-group
49 .row.form-group
50 .col-md-4
50 .col-md-4
51 %label.checkbox-inline
51 %label.checkbox-inline
@@ -46,104 +46,105
46 post 'add_user', to: 'groups#add_user', as: 'add_user'
46 post 'add_user', to: 'groups#add_user', as: 'add_user'
47 delete 'remove_user/:user_id', to: 'groups#remove_user', as: 'remove_user'
47 delete 'remove_user/:user_id', to: 'groups#remove_user', as: 'remove_user'
48 delete 'remove_all_user', to: 'groups#remove_all_user', as: 'remove_all_user'
48 delete 'remove_all_user', to: 'groups#remove_all_user', as: 'remove_all_user'
49 post 'add_problem', to: 'groups#add_problem', as: 'add_problem'
49 post 'add_problem', to: 'groups#add_problem', as: 'add_problem'
50 delete 'remove_problem/:problem_id', to: 'groups#remove_problem', as: 'remove_problem'
50 delete 'remove_problem/:problem_id', to: 'groups#remove_problem', as: 'remove_problem'
51 delete 'remove_all_problem', to: 'groups#remove_all_problem', as: 'remove_all_problem'
51 delete 'remove_all_problem', to: 'groups#remove_all_problem', as: 'remove_all_problem'
52 end
52 end
53 collection do
53 collection do
54
54
55 end
55 end
56 end
56 end
57
57
58 resources :testcases, only: [] do
58 resources :testcases, only: [] do
59 member do
59 member do
60 get 'download_input'
60 get 'download_input'
61 get 'download_sol'
61 get 'download_sol'
62 end
62 end
63 collection do
63 collection do
64 get 'show_problem/:problem_id(/:test_num)' => 'testcases#show_problem', as: 'show_problem'
64 get 'show_problem/:problem_id(/:test_num)' => 'testcases#show_problem', as: 'show_problem'
65 end
65 end
66 end
66 end
67
67
68 resources :grader_configuration, controller: 'configurations'
68 resources :grader_configuration, controller: 'configurations'
69
69
70 resources :users do
70 resources :users do
71 member do
71 member do
72 get 'toggle_activate', 'toggle_enable'
72 get 'toggle_activate', 'toggle_enable'
73 get 'stat'
73 get 'stat'
74 end
74 end
75 end
75 end
76
76
77 resources :submissions do
77 resources :submissions do
78 member do
78 member do
79 get 'download'
79 get 'download'
80 get 'compiler_msg'
80 get 'compiler_msg'
81 get 'rejudge'
81 get 'rejudge'
82 end
82 end
83 collection do
83 collection do
84 get 'prob/:problem_id', to: 'submissions#index', as: 'problem'
84 get 'prob/:problem_id', to: 'submissions#index', as: 'problem'
85 get 'direct_edit_problem/:problem_id(/:user_id)', to: 'submissions#direct_edit_problem', as: 'direct_edit_problem'
85 get 'direct_edit_problem/:problem_id(/:user_id)', to: 'submissions#direct_edit_problem', as: 'direct_edit_problem'
86 get 'get_latest_submission_status/:uid/:pid', to: 'submissions#get_latest_submission_status', as: 'get_latest_submission_status'
86 get 'get_latest_submission_status/:uid/:pid', to: 'submissions#get_latest_submission_status', as: 'get_latest_submission_status'
87 end
87 end
88 end
88 end
89
89
90
90
91 #user admin
91 #user admin
92 resources :user_admin do
92 resources :user_admin do
93 collection do
93 collection do
94 - get 'bulk_manage'
94 + match 'bulk_manage', via: [:get, :post]
95 get 'user_stat'
95 get 'user_stat'
96 get 'import'
96 get 'import'
97 get 'new_list'
97 get 'new_list'
98 get 'admin'
98 get 'admin'
99 get 'random_all_passwords'
99 get 'random_all_passwords'
100 get 'active'
100 get 'active'
101 get 'mass_mailing'
101 get 'mass_mailing'
102 + match 'create_from_list', via: [:get, :post]
102 end
103 end
103 member do
104 member do
104 get 'clear_last_ip'
105 get 'clear_last_ip'
105 end
106 end
106 end
107 end
107
108
108 resources :contest_management, only: [:index] do
109 resources :contest_management, only: [:index] do
109 collection do
110 collection do
110 get 'user_stat'
111 get 'user_stat'
111 get 'clear_stat'
112 get 'clear_stat'
112 get 'clear_all_stat'
113 get 'clear_all_stat'
113 end
114 end
114 end
115 end
115
116
116 #get 'user_admin', to: 'user_admin#index'
117 #get 'user_admin', to: 'user_admin#index'
117 #get 'user_admin/bulk_manage', to: 'user_admin#bulk_manage', as: 'bulk_manage_user_admin'
118 #get 'user_admin/bulk_manage', to: 'user_admin#bulk_manage', as: 'bulk_manage_user_admin'
118 #post 'user_admin', to: 'user_admin#create'
119 #post 'user_admin', to: 'user_admin#create'
119 #delete 'user_admin/:id', to: 'user_admin#destroy', as: 'user_admin_destroy'
120 #delete 'user_admin/:id', to: 'user_admin#destroy', as: 'user_admin_destroy'
120
121
121 #singular resource
122 #singular resource
122 #---- BEWARE ---- singular resource maps to plural controller by default, we can override by provide controller name directly
123 #---- BEWARE ---- singular resource maps to plural controller by default, we can override by provide controller name directly
123 #report
124 #report
124 resource :report, only: [], controller: 'report' do
125 resource :report, only: [], controller: 'report' do
125 get 'login'
126 get 'login'
126 get 'multiple_login'
127 get 'multiple_login'
127 get 'problem_hof/:id', action: 'problem_hof'
128 get 'problem_hof/:id', action: 'problem_hof'
128 get 'current_score'
129 get 'current_score'
129 get 'max_score'
130 get 'max_score'
130 post 'show_max_score'
131 post 'show_max_score'
131 end
132 end
132 #get 'report/current_score', to: 'report#current_score', as: 'report_current_score'
133 #get 'report/current_score', to: 'report#current_score', as: 'report_current_score'
133 #get 'report/problem_hof(/:id)', to: 'report#problem_hof', as: 'report_problem_hof'
134 #get 'report/problem_hof(/:id)', to: 'report#problem_hof', as: 'report_problem_hof'
134 #get "report/login"
135 #get "report/login"
135 #get 'report/max_score', to: 'report#max_score', as: 'report_max_score'
136 #get 'report/max_score', to: 'report#max_score', as: 'report_max_score'
136 #post 'report/show_max_score', to: 'report#show_max_score', as: 'report_show_max_score'
137 #post 'report/show_max_score', to: 'report#show_max_score', as: 'report_show_max_score'
137
138
138 resource :main, only: [], controller: 'main' do
139 resource :main, only: [], controller: 'main' do
139 get 'list'
140 get 'list'
140 get 'submission(/:id)', action: 'submission', as: 'main_submission'
141 get 'submission(/:id)', action: 'submission', as: 'main_submission'
141 post 'submit'
142 post 'submit'
142 get 'announcements'
143 get 'announcements'
143 get 'help'
144 get 'help'
144 end
145 end
145 #main
146 #main
146 #get "main/list"
147 #get "main/list"
147 #get 'main/submission(/:id)', to: 'main#submission', as: 'main_submission'
148 #get 'main/submission(/:id)', to: 'main#submission', as: 'main_submission'
148 #post 'main/submit', to: 'main#submit'
149 #post 'main/submit', to: 'main#submit'
149 #get 'main/announcements', to: 'main#announcements'
150 #get 'main/announcements', to: 'main#announcements'
You need to be logged in to leave comments. Login now