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

67 lines
1.9 KiB
Plaintext
Raw Normal View History

2011-10-08 23:36:38 +02:00
= form_for [:admin, @admin_project] do |f|
-if @admin_project.errors.any?
2012-02-11 18:56:18 +01:00
.alert-message.block-message.error
2011-10-08 23:36:38 +02:00
%ul
- @admin_project.errors.full_messages.each do |msg|
%li= msg
.clearfix
2011-11-07 19:38:54 +01:00
= f.label :name
.input= f.text_field :name
.clearfix
= f.label :path do
2012-02-11 18:56:18 +01:00
Path
.input
.input-prepend
%span.add-on= Gitlab.config.ssh_path
2012-02-11 18:56:18 +01:00
= f.text_field :path, :placeholder => "example_project", :disabled => !@admin_project.new_record?
.clearfix
= f.label :code do
2012-02-11 18:56:18 +01:00
Code
.input
.input-prepend
2012-03-22 19:02:38 +01:00
%span.add-on= web_app_url
2012-02-11 18:56:18 +01:00
= f.text_field :code, :placeholder => "example"
2011-11-07 19:38:54 +01:00
- unless @admin_project.new_record?
.clearfix
= f.label :owner_id
.input= f.select :owner_id, User.all.map { |user| [user.name, user.id] }
2011-11-07 19:38:54 +01:00
- if @admin_project.repo_exists?
2012-02-11 18:56:18 +01:00
.clearfix
= f.label :default_branch, "Default Branch"
.input= f.select(:default_branch, @admin_project.heads.map(&:name), {}, :style => "width:210px;")
.well
%h5 Features
.clearfix
= f.label :issues_enabled, "Issues"
.input= f.check_box :issues_enabled
.clearfix
= f.label :merge_requests_enabled, "Merge Requests"
.input= f.check_box :merge_requests_enabled
.clearfix
= f.label :wall_enabled, "Wall"
.input= f.check_box :wall_enabled
.clearfix
2011-11-07 19:38:54 +01:00
= f.label :description
2012-02-11 18:56:18 +01:00
.input= f.text_area :description, :class => "xxlarge"
2011-10-08 23:36:38 +02:00
.clear
%br
2011-10-08 23:36:38 +02:00
.actions
2012-02-11 18:56:18 +01:00
= f.submit 'Save', :class => "btn primary"
= link_to 'Cancel', [:admin, @admin_project], :class => "btn"
- unless @admin_project.new_record?
= link_to 'Destroy', [:admin, @admin_project], :confirm => 'Are you sure?', :method => :delete, :class => "btn danger right"
2011-11-07 19:38:54 +01:00
:javascript
$(function(){
$('#project_owner_id').chosen();
new Projects();
2011-11-15 09:34:30 +01:00
})