BigW Consortium Gitlab

_new_form.html.haml 1.49 KB
Newer Older
1
= form_for(@project, remote: true) do |f|
2
  - if @project.errors.any?
3
    .alert.alert-error
4 5 6 7 8
      %span= @project.errors.full_messages.first
  .clearfix.project_name_holder
    = f.label :name do
      Project name is
    .input
9
      = f.text_field :name, placeholder: "Example Project", class: "xxlarge"
10
      = f.submit 'Create project', class: "btn btn-create project-submit"
11

12
  - if current_user.can_select_namespace?
13
    .clearfix
14
      = f.label :namespace_id do
15
        %span Namespace
16
      .input
17
        = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen'}
18

19 20 21 22 23 24 25 26 27 28

  .clearfix
    .input
      = link_to "#", class: 'appear-link' do
        %i.icon-upload-alt
        %span Import existing repository?
  .clearfix.appear-data
    = f.label :import_url do
      %span Import existing repo
    .input
29
      = f.text_field :import_url, class: 'xlarge', placeholder: 'https://github.com/randx/six.git'
30
      .light
31
        URL must be clonable
32

33 34 35 36 37
  %p.padded
    New projects are private by default. You choose who can see the project and commit to repository.
  %hr

  - if current_user.can_create_group?
38 39
    .clearfix
      .input.light
40
        Need a group for several dependent projects?
41
        = link_to new_group_path, class: "btn btn-tiny" do
42
          Create a group
43 44 45
  - if current_user.can_create_team?
    .clearfix
      .input.light
46
        Want to share a project between team?
47
        = link_to new_team_path, class: "btn btn-tiny" do
48
          Create a team