Commit df92d4ff authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #5072 from jbornschein/proj-new-public

Add "public-project?" checkbox to new-project view 
parents c479b1dd c71460d2
...@@ -36,6 +36,12 @@ ...@@ -36,6 +36,12 @@
} }
} }
.project-public-holder {
.help-inline {
padding-top: 7px;
}
}
.save-project-loader { .save-project-loader {
img { img {
margin-top: 50px; margin-top: 50px;
......
...@@ -18,7 +18,7 @@ module Projects ...@@ -18,7 +18,7 @@ module Projects
snippets_enabled: default_features.snippets, snippets_enabled: default_features.snippets,
merge_requests_enabled: default_features.merge_requests, merge_requests_enabled: default_features.merge_requests,
public: default_features.public public: default_features.public
} }.stringify_keys
@project = Project.new(default_opts.merge(params)) @project = Project.new(default_opts.merge(params))
......
...@@ -2,13 +2,7 @@ ...@@ -2,13 +2,7 @@
.project-edit-errors .project-edit-errors
= render 'projects/errors' = render 'projects/errors'
.project-edit-content .project-edit-content
- if Gitlab.config.gitlab.default_projects_features.public
%p.slead
New projects are public by default. Any signed in user can see your project but cannot commit to it unless granted access.
- else
%p.slead
New projects are private by default. You choose who can see the project and commit to repository.
%hr
= form_for @project, remote: true do |f| = form_for @project, remote: true do |f|
.control-group.project-name-holder .control-group.project-name-holder
= f.label :name do = f.label :name do
...@@ -53,6 +47,12 @@ ...@@ -53,6 +47,12 @@
%span.light (optional) %span.light (optional)
.controls .controls
= f.text_area :description, placeholder: "awesome project", class: "input-xlarge", rows: 3, maxlength: 250, tabindex: 3 = f.text_area :description, placeholder: "awesome project", class: "input-xlarge", rows: 3, maxlength: 250, tabindex: 3
.control-group.project-public-holder
= f.label :public do
%span Public project
.controls
= f.check_box :public, { checked: Gitlab.config.gitlab.default_projects_features.public }, true, false
%span.help-inline Make project visible to everyone
.form-actions .form-actions
= f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4 = f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment