39 lines
1.2 KiB
Plaintext
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:210px;")
|
|
|
|
|
|
.clearfix
|
|
= f.label :description
|
|
.input= f.text_area :description, :placeholder => "project description", :style => "height:50px"
|
|
|
|
%br
|
|
|
|
.actions
|
|
= f.submit 'Save', :class => "btn primary"
|
|
= link_to 'Cancel', @project, :class => "btn"
|
|
- unless @project.new_record?
|
|
.right
|
|
= link_to 'Remove', @project, :confirm => 'Are you sure?', :method => :delete, :class => "btn danger"
|