gitlabhq/app/views/admin/team_members/_form.html.haml

43 lines
1.4 KiB
Plaintext
Raw Normal View History

2011-10-08 23:36:38 +02:00
= form_for @admin_team_member, :as => :team_member, :url => @admin_team_member.new_record? ? admin_team_members_path(@admin_team_member) : admin_team_member_path(@admin_team_member) do |f|
-if @admin_team_member.errors.any?
#error_explanation
%h2= "#{pluralize(@admin_team_member.errors.count, "error")} prohibited this admin_project from being saved:"
%ul
- @admin_team_member.errors.full_messages.each do |msg|
%li= msg
- if @admin_team_member.new_record?
.span-6
= f.label :user_id
2011-10-08 23:36:38 +02:00
.span-6
= f.select :user_id, User.all.map { |user| [user.name, user.id] }
.span-6
= f.label :project_id
.span-6
= f.select :project_id, Project.all.map { |user| [user.name, user.id] }
.span-6
2011-12-07 09:04:57 +01:00
%b Project Access:
.span-6
2011-12-07 09:04:57 +01:00
= f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, :class => "project-access-select"
.span-6
2011-12-07 09:04:57 +01:00
%b Repository Access:
.span-6
2011-12-07 09:04:57 +01:00
= f.select :repo_access, options_for_select(Repository.access_options, @admin_team_member.repo_access), {}, :class => "repo-access-select"
%br
2011-10-08 23:36:38 +02:00
.actions
2012-01-27 08:19:55 +01:00
= f.submit 'Save', :class => "btn"
2011-12-07 09:04:57 +01:00
:css
form select {
width:300px;
}
:javascript
2011-12-07 09:04:57 +01:00
$('select#team_member_user_id').chosen();
$('select#team_member_project_id').chosen();
$('select#team_member_repo_access').chosen();
$('select#team_member_project_access').chosen();