Description:
fix bug with duplicate logins are given
also increase dropdown size on group view
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r809:e8c8ed4696af - - 3 files changed: 7 inserted, 3 deleted
@@ -10,7 +10,7 | |||
|
10 | 10 | |
|
11 | 11 | def add_users_skip_existing(users_list) |
|
12 | 12 | new_list = [] |
|
13 | - users_list.each do |u| | |
|
13 | + users_list.uniq.each do |u| | |
|
14 | 14 | new_list << u unless users.include? u |
|
15 | 15 | end |
|
16 | 16 | users << new_list |
@@ -82,6 +82,10 | |||
|
82 | 82 | end |
|
83 | 83 | end |
|
84 | 84 | |
|
85 | + def login_with_name | |
|
86 | + "[#{login}] #{full_name}" | |
|
87 | + end | |
|
88 | + | |
|
85 | 89 | def admin? |
|
86 | 90 | has_role?('admin') |
|
87 | 91 | end |
@@ -27,7 +27,7 | |||
|
27 | 27 | =form_tag add_user_group_path(@group), class: 'form-inline' do |
|
28 | 28 | .form-group |
|
29 | 29 | =label_tag :user_id, "User" |
|
30 |
- =select_tag :user_id, options_from_collection_for_select(User.all,'id',' |
|
|
30 | + =select_tag :user_id, options_from_collection_for_select(User.all,'id','login_with_name'), class: 'select2', style: 'width: 25em'; | |
|
31 | 31 | =submit_tag "Add",class: 'btn btn-primary' |
|
32 | 32 | |
|
33 | 33 | |
@@ -59,7 +59,7 | |||
|
59 | 59 | =form_tag add_problem_group_path(@group), class: 'form-inline' do |
|
60 | 60 | .form-group |
|
61 | 61 | =label_tag :problem_id, "Problem" |
|
62 |
- =select_tag :problem_id, options_from_collection_for_select(Problem.all,'id',' |
|
|
62 | + =select_tag :problem_id, options_from_collection_for_select(Problem.all,'id','long_name'), class: 'select2', style: 'width: 25em'; | |
|
63 | 63 | =submit_tag "Add",class: 'btn btn-primary' |
|
64 | 64 | |
|
65 | 65 |
You need to be logged in to leave comments.
Login now