1 = form_for(@project, remote: true) do |f|
2 - if @project.errors.any?
5 - @project.errors.full_messages.each do |msg|
7 .clearfix.project_name_holder
11 = f.text_field :name, placeholder: "Example Project", class: "xxlarge"
12 - unless @repository.heads.empty?
14 = f.label :default_branch, "Default Branch"
15 .input= f.select(:default_branch, @repository.heads.map(&:name), {}, style: "width:210px;")
22 = f.label :issues_enabled, "Issues", class: 'control-label'
24 = f.check_box :issues_enabled
25 %span.descr Lightweight issue tracking system for this project
28 = f.label :merge_requests_enabled, "Merge Requests", class: 'control-label'
30 = f.check_box :merge_requests_enabled
31 %span.descr Submit changes to be merged upstream.
34 = f.label :wall_enabled, "Wall", class: 'control-label'
36 = f.check_box :wall_enabled
37 %span.descr Simple chat system for broadcasting inside project
40 = f.label :wiki_enabled, "Wiki", class: 'control-label'
42 = f.check_box :wiki_enabled
43 %span.descr Pages for project documentation
45 - if can?(current_user, :change_public_mode, @project)
51 = f.label :public, class: 'control-label' do
52 %span Public clone access
56 If checked, this project can be cloned
59 It will also be listed on the #{link_to "public access directory", public_root_path}.
62 - if can? current_user, :change_namespace, @project
66 = f.label :namespace_id do
69 = f.select :namespace_id, namespaces_options(@project.namespace_id || Namespace::global_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'}
71 %ul.prepend-top-10.cred
72 %li Be careful. Changing project namespace can have unintended side effects
73 %li You can transfer project only to namespaces you can manage
74 %li You will need to update your local repositories to point to the new location.
80 = f.submit 'Save', class: "btn btn-save"
81 = link_to 'Cancel', @project, class: "btn"
82 - unless @project.new_record?
83 - if can?(current_user, :remove_project, @project)
85 = link_to 'Remove Project', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn btn-remove"