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