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
|
2012-08-11 00:07:50 +02:00
|
|
|
= f.text_field :name, placeholder: "Example Project", class: "xxlarge"
|
2011-11-07 19:38:54 +01:00
|
|
|
|
2012-11-23 05:31:09 +01:00
|
|
|
%fieldset.adv_settings
|
|
|
|
%legend Advanced settings:
|
2012-07-27 23:42:44 +02:00
|
|
|
.clearfix
|
|
|
|
= f.label :path do
|
2012-08-31 08:05:44 +02:00
|
|
|
Path
|
2012-07-27 23:42:44 +02:00
|
|
|
.input
|
2012-11-23 05:31:09 +01:00
|
|
|
= text_field_tag :ppath, @project.path_to_repo, class: "xlarge", disabled: true
|
2011-11-07 19:38:54 +01:00
|
|
|
|
2012-07-27 23:42:44 +02:00
|
|
|
- unless project.new_record?
|
2012-11-23 05:31:09 +01:00
|
|
|
.clearfix
|
|
|
|
= f.label :namespace_id
|
2012-11-29 05:29:11 +01:00
|
|
|
.input= f.select :namespace_id, namespaces_options(@project.namespace_id), {}, {class: 'chosen'}
|
2012-11-23 05:31:09 +01:00
|
|
|
|
2012-07-27 23:42:44 +02:00
|
|
|
- if project.repo_exists?
|
|
|
|
.clearfix
|
|
|
|
= f.label :default_branch, "Default Branch"
|
2012-08-11 00:07:50 +02:00
|
|
|
.input= f.select(:default_branch, project.heads.map(&:name), {}, style: "width:210px;")
|
2012-07-27 23:42:44 +02:00
|
|
|
|
|
|
|
- unless project.new_record?
|
2012-11-23 05:31:09 +01:00
|
|
|
%fieldset.adv_settings
|
|
|
|
%legend 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
|
2012-08-30 21:15:34 +02:00
|
|
|
= f.submit 'Save Project', class: "btn save-btn"
|
|
|
|
= link_to 'Cancel', admin_projects_path, class: "btn cancel-btn"
|
2012-07-27 23:42:44 +02:00
|
|
|
|
|
|
|
|
2011-11-07 19:38:54 +01:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
$(function(){
|
2012-04-17 19:27:18 +02:00
|
|
|
new Projects();
|
2011-11-15 09:34:30 +01:00
|
|
|
})
|
2012-07-27 23:42:44 +02:00
|
|
|
|