summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-14 06:19:56 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-14 06:19:56 -0700
commitdf92d4ff6796c2c8d85cdf9fe29ab496eb97c30a (patch)
tree5ed8c63ca6d088874a9a6550ed0699b7ae7fd194
parentc479b1dd1f1f9bf1fa206ac52cc9dcfb72a344ee (diff)
parentc71460d2d3c6b868da099f090af812e15d552bb9 (diff)
downloadgitlab-ce-df92d4ff6796c2c8d85cdf9fe29ab496eb97c30a.tar.gz
Merge pull request #5072 from jbornschein/proj-new-public
Add "public-project?" checkbox to new-project view
-rw-r--r--app/assets/stylesheets/sections/projects.scss6
-rw-r--r--app/contexts/projects/create_context.rb2
-rw-r--r--app/views/projects/new.html.haml14
3 files changed, 14 insertions, 8 deletions
diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss
index 9c079bbb9ff..f2707f62378 100644
--- a/app/assets/stylesheets/sections/projects.scss
+++ b/app/assets/stylesheets/sections/projects.scss
@@ -36,6 +36,12 @@
}
}
+.project-public-holder {
+ .help-inline {
+ padding-top: 7px;
+ }
+}
+
.save-project-loader {
img {
margin-top: 50px;
diff --git a/app/contexts/projects/create_context.rb b/app/contexts/projects/create_context.rb
index 9fd24e0eeea..1c60a5de141 100644
--- a/app/contexts/projects/create_context.rb
+++ b/app/contexts/projects/create_context.rb
@@ -18,7 +18,7 @@ module Projects
snippets_enabled: default_features.snippets,
merge_requests_enabled: default_features.merge_requests,
public: default_features.public
- }
+ }.stringify_keys
@project = Project.new(default_opts.merge(params))
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index ab8efe5e3e1..0213576927b 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -2,13 +2,7 @@
.project-edit-errors
= render 'projects/errors'
.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|
.control-group.project-name-holder
= f.label :name do
@@ -53,6 +47,12 @@
%span.light (optional)
.controls
= 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
= f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4