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
2012-02-11 18:56:18 +01:00
= f.label :path do
Path
.input
.input-prepend
%span.add-on= "#{GIT_HOST["git_user"]}@#{GIT_HOST["host"]}:"
2012-02-11 18:56:18 +01:00
= f.text_field :path, :placeholder => "example_project", :disabled => !@admin_project.new_record?
.clearfix
2012-02-11 18:56:18 +01:00
= f.label :code do
Code
.input
.input-prepend
%span.add-on= "http://#{GIT_HOST["host"]}/"
= 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"
= 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(){
taggifyForm();
$('#project_owner_id').chosen();
2012-02-11 18:56:18 +01:00
$('#project_default_branch').chosen();
2011-11-15 09:34:30 +01:00
})