BigW Consortium Gitlab

_form.html.haml 1.9 KB
Newer Older
1 2
= form_for [:admin, project] do |f|
  -if project.errors.any?
3
    .alert-message.block-message.error
gitlabhq committed
4
      %ul
5
        - project.errors.full_messages.each do |msg|
gitlabhq committed
6 7
          %li= msg

8 9 10
  .clearfix.project_name_holder
    = f.label :name do
      Project name is
11
    .input
12
      = f.text_field :name, placeholder: "Example Project", class: "xxlarge"
13

14 15
  %fieldset.adv_settings
    %legend Advanced settings:
16 17
    .clearfix
      = f.label :path do
18
        Path
19
      .input
20
        = text_field_tag :ppath, @project.path_to_repo, class: "xlarge", disabled: true
21

22
    - if project.repo_exists?
23
      .clearfix
24
        = f.label :default_branch, "Default Branch"
25
        .input= f.select(:default_branch, repository.heads.map(&:name), {}, style: "width:210px;")
26

27 28
  %fieldset.adv_settings
    %legend Features:
29

30 31 32
    .clearfix
      = f.label :issues_enabled, "Issues"
      .input= f.check_box :issues_enabled
33

34 35 36
    .clearfix
      = f.label :merge_requests_enabled, "Merge Requests"
      .input= f.check_box :merge_requests_enabled
37

38 39 40
    .clearfix
      = f.label :wall_enabled, "Wall"
      .input= f.check_box :wall_enabled
41

42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
    .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.
58

59

60 61 62
  .actions
    = f.submit 'Save Project', class: "btn save-btn"
    = link_to 'Cancel', admin_projects_path, class: "btn cancel-btn"
63 64


65 66 67

:javascript
  $(function(){
68
    new Projects();
69
  })
70