2012-02-08 00:00:49 +01:00
|
|
|
%h3= "New Team member"
|
|
|
|
%hr
|
2012-08-11 00:07:50 +02:00
|
|
|
= form_for @team_member, as: :team_member, url: project_team_members_path(@project, @team_member) do |f|
|
2012-01-14 18:54:41 +01:00
|
|
|
-if @team_member.errors.any?
|
2012-02-08 00:00:49 +01:00
|
|
|
.alert-message.block-message.error
|
|
|
|
%ul
|
|
|
|
- @team_member.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
|
|
|
|
|
|
|
.clearfix
|
|
|
|
= f.label :user_id, "Name"
|
2012-08-11 00:07:50 +02:00
|
|
|
.input= f.select(:user_id, User.not_in_project(@project).all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, { style: "width:300px" })
|
2012-02-08 00:00:49 +01:00
|
|
|
|
2012-02-15 22:51:04 +01:00
|
|
|
|
2012-02-08 00:00:49 +01:00
|
|
|
.clearfix
|
|
|
|
= f.label :project_access, "Project Access"
|
2012-08-11 00:07:50 +02:00
|
|
|
.input= f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, class: "project-access-select"
|
2012-02-08 00:00:49 +01:00
|
|
|
|
2012-02-15 22:51:04 +01:00
|
|
|
|
2012-02-08 00:00:49 +01:00
|
|
|
.actions
|
2012-08-11 00:07:50 +02:00
|
|
|
= f.submit 'Save', class: "btn primary"
|
|
|
|
= link_to "Cancel", team_project_path(@project), class: "btn"
|
2012-01-14 18:54:41 +01:00
|
|
|
|
2012-02-08 00:00:49 +01:00
|
|
|
:css
|
2012-06-04 00:37:27 +02:00
|
|
|
form select {
|
2012-02-08 00:00:49 +01:00
|
|
|
width:300px;
|
|
|
|
}
|
2011-12-07 09:04:57 +01:00
|
|
|
|
2012-02-08 00:00:49 +01:00
|
|
|
:javascript
|
|
|
|
$('select#team_member_user_id').chosen();
|
2012-02-16 08:03:55 +01:00
|
|
|
$('select#team_member_project_access').chosen();
|
2012-02-15 22:51:04 +01:00
|
|
|
//$('select#team_member_repo_access').chosen();
|
|
|
|
//$('select#team_member_project_access').chosen();
|