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

76 lines
1.9 KiB
Plaintext
Raw Normal View History

2012-07-27 23:42:44 +02:00
= form_for [:admin, project] do |f|
-if 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
2012-07-27 23:42:44 +02:00
- project.errors.full_messages.each do |msg|
2011-10-08 23:36:38 +02:00
%li= msg
2012-07-27 23:42:44 +02:00
.clearfix.project_name_holder
= f.label :name do
Project name is
2012-02-11 18:56:18 +01:00
.input
= f.text_field :name, placeholder: "Example Project", class: "xxlarge"
= f.submit project.new_record? ? 'Create project' : 'Save Project', class: "btn primary"
2011-11-07 19:38:54 +01:00
2012-07-27 23:42:44 +02:00
%hr
.alert.alert-info
%h5 Advanced settings:
.clearfix
= f.label :path do
Git Clone
.input
.input-prepend
%span.add-on= Gitlab.config.ssh_path
= f.text_field :path, placeholder: "example_project", disabled: !!project.id
2012-07-27 23:42:44 +02:00
%span.add-on= ".git"
.clearfix
2012-07-27 23:42:44 +02:00
= f.label :code do
URL
.input
.input-prepend
%span.add-on= web_app_url
= f.text_field :code, placeholder: "example"
2011-11-07 19:38:54 +01:00
2012-07-27 23:42:44 +02:00
- unless project.new_record?
2012-02-11 18:56:18 +01:00
.clearfix
2012-07-27 23:42:44 +02:00
= f.label :owner_id
.input= f.select :owner_id, User.all.map { |user| [user.name, user.id] }
2012-02-11 18:56:18 +01:00
2012-07-27 23:42:44 +02:00
- if project.repo_exists?
.clearfix
= f.label :default_branch, "Default Branch"
.input= f.select(:default_branch, project.heads.map(&:name), {}, style: "width:210px;")
2012-07-27 23:42:44 +02:00
- unless project.new_record?
.alert.alert-info
%h5 Features:
2012-02-11 18:56:18 +01:00
.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-07-27 23:42:44 +02:00
.clearfix
= f.label :wiki_enabled, "Wiki"
.input= f.check_box :wiki_enabled
- unless project.new_record?
.actions
= f.submit 'Save Project', class: "btn primary"
2012-07-27 23:42:44 +02:00
2011-11-07 19:38:54 +01:00
:javascript
$(function(){
$('#project_owner_id').chosen();
new Projects();
2011-11-15 09:34:30 +01:00
})
2012-07-27 23:42:44 +02:00