gitlabhq/app/views/projects/_form.html.haml
2012-01-28 00:51:02 +02:00

39 lines
1.2 KiB
Plaintext

= form_for(@project, :remote => true) do |f|
- if @project.errors.any?
.alert-message.block-message.error
%ul
- @project.errors.full_messages.each do |msg|
%li= msg
.clearfix
= f.label :name
.input= f.text_field :name, :placeholder => "Example Project"
.clearfix
= f.label :path do
Path
%cite= "git@#{GIT_HOST["host"]}:"
.input= f.text_field :path, :placeholder => "example_project", :disabled => !@project.new_record?
.clearfix
= f.label :code do
Code
%cite= "http://#{GIT_HOST["host"]}/"
.input= f.text_field :code, :placeholder => "example"
- unless @project.new_record? || @project.heads.empty?
.clearfix
= f.label :default_branch, "Default Branch"
.input= f.select(:default_branch, @project.heads.map(&:name), {}, :style => "width:300px;")
.clearfix
= f.label :description
.input= f.text_area :description, :placeholder => "project description", :style => "height:50px"
%br
.merge-tabs
= f.submit 'Save', :class => "btn primary"
 
- unless @project.new_record?
.right
= link_to 'Remove', @project, :confirm => 'Are you sure?', :method => :delete, :class => "btn"