Commit 83b212a4ef942ec34096c2d194f8dd827ef4eb8b

Authored by Joerg Bornschein
1 parent 4d5cdbd2

Add public-project? checkbox to new-project view

app/assets/stylesheets/sections/projects.scss
@@ -36,6 +36,12 @@ @@ -36,6 +36,12 @@
36 } 36 }
37 } 37 }
38 38
  39 +.project-public-holder {
  40 + .help-inline {
  41 + padding-top: 7px;
  42 + }
  43 +}
  44 +
39 .save-project-loader { 45 .save-project-loader {
40 img { 46 img {
41 margin-top: 50px; 47 margin-top: 50px;
app/views/projects/new.html.haml
@@ -2,13 +2,7 @@ @@ -2,13 +2,7 @@
2 .project-edit-errors 2 .project-edit-errors
3 = render 'projects/errors' 3 = render 'projects/errors'
4 .project-edit-content 4 .project-edit-content
5 - - if Gitlab.config.gitlab.default_projects_features.public  
6 - %p.slead  
7 - New projects are public by default. Any signed in user can see your project but cannot commit to it unless granted access.  
8 - - else  
9 - %p.slead  
10 - New projects are private by default. You choose who can see the project and commit to repository.  
11 - %hr 5 +
12 = form_for @project, remote: true do |f| 6 = form_for @project, remote: true do |f|
13 .control-group.project-name-holder 7 .control-group.project-name-holder
14 = f.label :name do 8 = f.label :name do
@@ -53,6 +47,12 @@ @@ -53,6 +47,12 @@
53 %span.light (optional) 47 %span.light (optional)
54 .controls 48 .controls
55 = f.text_area :description, placeholder: "awesome project", class: "input-xlarge", rows: 3, maxlength: 250, tabindex: 3 49 = f.text_area :description, placeholder: "awesome project", class: "input-xlarge", rows: 3, maxlength: 250, tabindex: 3
  50 + .control-group.project-public-holder
  51 + = f.label :public do
  52 + %span Public project
  53 + .controls
  54 + = f.check_box :public, { :checked => Gitlab.config.gitlab.default_projects_features.public }, true, false
  55 + %span.help-inline Make project visible to everyone
56 56
57 .form-actions 57 .form-actions
58 = f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4 58 = f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4