2012-07-27 17:42:44 -04:00
|
|
|
= form_for [:admin, project] do |f|
|
|
|
|
-if project.errors.any?
|
2012-02-11 12:56:18 -05:00
|
|
|
.alert-message.block-message.error
|
2011-10-08 17:36:38 -04:00
|
|
|
%ul
|
2012-07-27 17:42:44 -04:00
|
|
|
- project.errors.full_messages.each do |msg|
|
2011-10-08 17:36:38 -04:00
|
|
|
%li= msg
|
|
|
|
|
2012-07-27 17:42:44 -04:00
|
|
|
.clearfix.project_name_holder
|
|
|
|
= f.label :name do
|
|
|
|
Project name is
|
2012-02-11 12:56:18 -05:00
|
|
|
.input
|
2012-08-10 18:07:50 -04:00
|
|
|
= f.text_field :name, placeholder: "Example Project", class: "xxlarge"
|
2011-11-07 13:38:54 -05:00
|
|
|
|
2013-01-05 05:12:02 -05:00
|
|
|
- if project.repo_exists?
|
|
|
|
%fieldset.adv_settings
|
|
|
|
%legend Advanced settings:
|
|
|
|
.clearfix
|
|
|
|
= f.label :path do
|
|
|
|
Path
|
|
|
|
.input
|
|
|
|
= text_field_tag :ppath, @project.repository.path_to_repo, class: "xlarge", disabled: true
|
2011-11-07 13:38:54 -05:00
|
|
|
|
2012-11-22 23:31:09 -05:00
|
|
|
.clearfix
|
2012-12-14 00:14:05 -05:00
|
|
|
= f.label :default_branch, "Default Branch"
|
2013-01-05 05:12:02 -05:00
|
|
|
.input= f.select(:default_branch, @project.repository.heads.map(&:name), {}, style: "width:210px;")
|
2012-11-22 23:31:09 -05:00
|
|
|
|
2012-12-14 00:14:05 -05:00
|
|
|
%fieldset.adv_settings
|
|
|
|
%legend Features:
|
2012-07-27 17:42:44 -04:00
|
|
|
|
2012-12-14 00:14:05 -05:00
|
|
|
.clearfix
|
|
|
|
= f.label :issues_enabled, "Issues"
|
|
|
|
.input= f.check_box :issues_enabled
|
2012-02-11 12:56:18 -05:00
|
|
|
|
2012-12-14 00:14:05 -05:00
|
|
|
.clearfix
|
|
|
|
= f.label :merge_requests_enabled, "Merge Requests"
|
|
|
|
.input= f.check_box :merge_requests_enabled
|
2012-02-11 12:56:18 -05:00
|
|
|
|
2012-12-14 00:14:05 -05:00
|
|
|
.clearfix
|
|
|
|
= f.label :wall_enabled, "Wall"
|
|
|
|
.input= f.check_box :wall_enabled
|
2012-02-11 12:56:18 -05:00
|
|
|
|
2012-12-14 00:14:05 -05:00
|
|
|
.clearfix
|
|
|
|
= f.label :wiki_enabled, "Wiki"
|
|
|
|
.input= f.check_box :wiki_enabled
|
|
|
|
|
|
|
|
%fieldset.features
|
|
|
|
%legend Transfer:
|
|
|
|
.control-group
|
|
|
|
= f.label :namespace_id do
|
|
|
|
%span Namespace
|
|
|
|
.controls
|
|
|
|
= f.select :namespace_id, namespaces_options(@project.namespace_id, :all), {}, {class: 'chosen'}
|
|
|
|
%br
|
|
|
|
%ul.prepend-top-10.cred
|
|
|
|
%li Be careful. Changing project namespace can have unintended side effects
|
|
|
|
%li You can transfer project only to namespaces you can manage
|
|
|
|
%li You will need to update your local repositories to point to the new location.
|
2012-02-11 12:56:18 -05:00
|
|
|
|
2012-07-27 17:42:44 -04:00
|
|
|
|
2012-12-14 00:14:05 -05:00
|
|
|
.actions
|
|
|
|
= f.submit 'Save Project', class: "btn save-btn"
|
|
|
|
= link_to 'Cancel', admin_projects_path, class: "btn cancel-btn"
|
2012-07-27 17:42:44 -04:00
|
|
|
|
|
|
|
|
2011-11-07 13:38:54 -05:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
$(function(){
|
2012-04-17 13:27:18 -04:00
|
|
|
new Projects();
|
2011-11-15 03:34:30 -05:00
|
|
|
})
|
2012-07-27 17:42:44 -04:00
|
|
|
|