gitlabhq/app/views/admin/team_members/_form.html.haml
2011-11-21 02:26:10 -05:00

38 lines
1.2 KiB
Plaintext

= 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
.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
%b Access:
.span-6
= f.check_box :read
Web Access (Browse Repo)
.span-6
= f.check_box :write
Git Access (User will be added to commiters list)
.span-6
= f.check_box :admin
Admin (Can manage project)
%br
.actions
= f.submit 'Save', :class => "grey-button"
:javascript
$('select#team_member_user_id').selectmenu({width:300});
$('select#team_member_project_id').selectmenu({width:300});