Make it possible to assign/mention users from group members

This commit is contained in:
Dmitriy Zaporozhets 2013-06-22 00:02:09 +03:00
parent ede746bf07
commit fdf7fc044a
2 changed files with 3 additions and 3 deletions

View file

@ -101,7 +101,7 @@ class ProjectsController < ProjectResourceController
@suggestions = { @suggestions = {
emojis: Emoji.names, emojis: Emoji.names,
issues: @project.issues.select([:id, :title, :description]), issues: @project.issues.select([:id, :title, :description]),
members: @project.users.select([:username, :name]).order(:username) members: @project.team.members.sort_by(&:username).map { |user| { username: user.username, name: user.name } }
} }
respond_to do |format| respond_to do |format|

View file

@ -40,12 +40,12 @@
= f.label :assignee_id do = f.label :assignee_id do
%i.icon-user %i.icon-user
Assign to Assign to
.input= f.select(:assignee_id, @project.users.alphabetically.collect {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, {class: 'chosen span3'}) .input= f.select(:assignee_id, @project.team.members.sort_by(&:name).map {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, {class: 'chosen span3'})
.left .left
= f.label :milestone_id do = f.label :milestone_id do
%i.icon-time %i.icon-time
Milestone Milestone
.input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'}) .input= f.select(:milestone_id, @project.milestones.active.all.map {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'})
.control-group .control-group