Use name+username in team -> new
This commit is contained in:
parent
fa9a8c3847
commit
1587caa3e4
4 changed files with 6 additions and 6 deletions
|
@ -8,8 +8,4 @@ class UserDecorator < ApplicationDecorator
|
|||
def tm_of(project)
|
||||
project.team_member_by_id(self.id)
|
||||
end
|
||||
|
||||
def name_with_email
|
||||
"#{name} (#{email})"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -340,4 +340,8 @@ class User < ActiveRecord::Base
|
|||
def owned_teams
|
||||
UserTeam.where(owner_id: self.id)
|
||||
end
|
||||
|
||||
def name_with_username
|
||||
"#{name} (#{username})"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
%h6 1. Choose people you want in the team
|
||||
.clearfix
|
||||
= f.label :user_ids, "People"
|
||||
.input= select_tag(:user_ids, options_from_collection_for_select(User.active.not_in_project(@project).alphabetically, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true})
|
||||
.input= select_tag(:user_ids, options_from_collection_for_select(User.active.not_in_project(@project).alphabetically, :id, :name_with_username), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true})
|
||||
|
||||
%h6 2. Set access level for them
|
||||
.clearfix
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
%td= @team.admin?(member) ? "Admin" : "Member"
|
||||
%td
|
||||
%tr
|
||||
%td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name_with_email), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
|
||||
%td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name_with_username), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
|
||||
%td= select_tag :default_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" }
|
||||
%td
|
||||
%span= check_box_tag :group_admin
|
||||
|
|
Loading…
Reference in a new issue