2011-10-09 00:36:38 +03:00
|
|
|
= form_for [:admin, @admin_project] do |f|
|
|
|
|
-if @admin_project.errors.any?
|
2012-02-11 19:56:18 +02:00
|
|
|
.alert-message.block-message.error
|
2011-10-09 00:36:38 +03:00
|
|
|
%ul
|
|
|
|
- @admin_project.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
|
|
|
|
2012-01-29 23:59:12 +02:00
|
|
|
.clearfix
|
2011-11-07 20:38:54 +02:00
|
|
|
= f.label :name
|
2012-01-29 23:59:12 +02:00
|
|
|
.input= f.text_field :name
|
|
|
|
.clearfix
|
2012-06-04 01:37:27 +03:00
|
|
|
= f.label :path do
|
2012-02-11 19:56:18 +02:00
|
|
|
Path
|
|
|
|
.input
|
|
|
|
.input-prepend
|
2012-03-06 17:39:07 -06:00
|
|
|
%span.add-on= "#{GIT_HOST["git_user"]}@#{GIT_HOST["host"]}:"
|
2012-02-11 19:56:18 +02:00
|
|
|
= f.text_field :path, :placeholder => "example_project", :disabled => !@admin_project.new_record?
|
2012-01-29 23:59:12 +02:00
|
|
|
.clearfix
|
2012-06-04 01:37:27 +03:00
|
|
|
= f.label :code do
|
2012-02-11 19:56:18 +02:00
|
|
|
Code
|
|
|
|
.input
|
|
|
|
.input-prepend
|
2012-03-22 20:02:38 +02:00
|
|
|
%span.add-on= web_app_url
|
2012-02-11 19:56:18 +02:00
|
|
|
= f.text_field :code, :placeholder => "example"
|
2011-11-07 20:38:54 +02:00
|
|
|
|
2012-01-29 23:59:12 +02: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 20:38:54 +02:00
|
|
|
|
2012-06-04 01:37:27 +03:00
|
|
|
- if @admin_project.repo_exists?
|
2012-02-11 19:56:18 +02: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
|
|
|
|
|
2012-01-29 23:59:12 +02:00
|
|
|
.clearfix
|
2011-11-07 20:38:54 +02:00
|
|
|
= f.label :description
|
2012-02-11 19:56:18 +02:00
|
|
|
.input= f.text_area :description, :class => "xxlarge"
|
2011-10-09 00:36:38 +03:00
|
|
|
.clear
|
2011-11-21 02:26:10 -05:00
|
|
|
%br
|
2011-10-09 00:36:38 +03:00
|
|
|
.actions
|
2012-02-11 19:56:18 +02:00
|
|
|
= f.submit 'Save', :class => "btn primary"
|
|
|
|
= link_to 'Cancel', [:admin, @admin_project], :class => "btn"
|
2012-04-17 20:27:18 +03:00
|
|
|
- unless @admin_project.new_record?
|
|
|
|
= link_to 'Destroy', [:admin, @admin_project], :confirm => 'Are you sure?', :method => :delete, :class => "btn danger right"
|
2011-11-07 20:38:54 +02:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
$(function(){
|
2012-01-29 23:59:12 +02:00
|
|
|
$('#project_owner_id').chosen();
|
2012-04-17 20:27:18 +03:00
|
|
|
new Projects();
|
2011-11-15 12:34:30 +04:00
|
|
|
})
|