Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_form.html.haml « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: baa1f14fe06d73392d2b45fbeced330a892f8746 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
= form_for(@project, :remote => true) do |f|
  %div.form_content
    - if @project.new_record?
      %h1 New Project
    - else
      %h1 Edit Project
    - if @project.errors.any?
      #error_explanation
        %h2
          = pluralize(@project.errors.count, "error")
          prohibited this project from being saved:
        %ul
          - @project.errors.full_messages.each do |msg|
            %li= msg
    %table.round-borders
      %tr
        %td= f.label :name
        %td= f.text_field :name, :placeholder => "Example Project"
      %tr
        %td
          .left= f.label :path
          %cite.right git@yourserver:
        %td
          = f.text_field :path, :placeholder => "example_project", :disabled => !@project.new_record?
      %tr
        %td 
          .left= f.label :code
          %cite.right http://yourserver/
        %td= f.text_field :code, :placeholder => "example (3..12 symbols only)"
    .field
      = f.label :description
      %br/
      = f.text_area :description, :style => "height:140px;width:932px;"
    .clear
      %hr.prepend-top
    .actions
      = f.submit :class => "lbutton vm"

  %div{ :class => "ajax_loader",  :style => "display:none;height:200px;"}
    %center
      = image_tag "ajax-loader.gif", :class => "append-bottom"
      - if @project.new_record?
        %h3.prepend-top Creating project & repository. Please wait for few minutes
      - else 
        %h3.prepend-top Updating project & repository. Please wait for few minutes
:javascript
  $('.new_project, .edit_project').bind('ajax:before', function() {  
    $(this).find(".form_content").hide();  
    $('.ajax_loader').show();
  });