Description:
user_admin ok
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r748:ff7f37009e5e - - 3 files changed: 15 inserted, 7 deleted
@@ -12,13 +12,13 | |||||
|
12 | has_many :groups_users, class_name: GroupUser |
|
12 | has_many :groups_users, class_name: GroupUser |
|
13 | has_many :groups, :through => :groups_users |
|
13 | has_many :groups, :through => :groups_users |
|
14 |
|
14 | ||
|
15 |
- has_many :test_requests, -> {order(submitted_at: |
|
15 | + has_many :test_requests, -> {order(submitted_at: :desc)} |
|
16 |
|
16 | ||
|
17 |
- has_many :messages, -> { order(created_at: |
|
17 | + has_many :messages, -> { order(created_at: :desc) }, |
|
18 | :class_name => "Message", |
|
18 | :class_name => "Message", |
|
19 | :foreign_key => "sender_id" |
|
19 | :foreign_key => "sender_id" |
|
20 |
|
20 | ||
|
21 |
- has_many :replied_messages, -> { order(created_at: |
|
21 | + has_many :replied_messages, -> { order(created_at: :desc) }, |
|
22 | :class_name => "Message", |
|
22 | :class_name => "Message", |
|
23 | :foreign_key => "receiver_id" |
|
23 | :foreign_key => "receiver_id" |
|
24 |
|
24 |
@@ -41,7 +41,7 | |||||
|
41 | %p |
|
41 | %p |
|
42 | = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '} |
|
42 | = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '} |
|
43 | = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '} |
|
43 | = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '} |
|
44 |
- = link_to 'Bulk Manage', bulk_manage |
|
44 | + = link_to 'Bulk Manage', { action: :bulk_manage} , { class: 'btn btn-default btn-info'} |
|
45 | = link_to 'View administrators',{ :action => 'admin'}, { class: 'btn btn-default '} |
|
45 | = link_to 'View administrators',{ :action => 'admin'}, { class: 'btn btn-default '} |
|
46 | = link_to 'Random passwords',{ :action => 'random_all_passwords'}, { class: 'btn btn-default '} |
|
46 | = link_to 'Random passwords',{ :action => 'random_all_passwords'}, { class: 'btn btn-default '} |
|
47 | = link_to 'View active users',{ :action => 'active'}, { class: 'btn btn-default '} |
|
47 | = link_to 'View active users',{ :action => 'active'}, { class: 'btn btn-default '} |
@@ -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', |
|
98 | + %td= link_to 'Destroy', {action: :destroy, id: 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 '} |
@@ -91,9 +91,17 | |||||
|
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 | + get 'bulk_manage' |
|
95 | - delete ':id', to: 'user_admin#destroy', as: 'user_admin_destroy' |
|
||
|
96 | get 'user_stat' |
|
95 | get 'user_stat' |
|
|
96 | + get 'import' | ||
|
|
97 | + get 'new_list' | ||
|
|
98 | + get 'admin' | ||
|
|
99 | + get 'random_all_passwords' | ||
|
|
100 | + get 'active' | ||
|
|
101 | + get 'mass_mailing' | ||
|
|
102 | + end | ||
|
|
103 | + member do | ||
|
|
104 | + get 'clear_last_ip' | ||
|
97 | end |
|
105 | end |
|
98 | end |
|
106 | end |
|
99 |
|
107 |
You need to be logged in to leave comments.
Login now