gitlabhq/app/views/projects/_form.html.haml

49 lines
1.6 KiB
Plaintext
Raw Normal View History

2011-10-08 23:36:38 +02:00
= form_for(@project, :remote => true) do |f|
%div.form_content
2011-10-16 23:07:10 +02:00
- unless @project.new_record?
2011-10-08 23:36:38 +02:00
%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/
2011-10-18 10:21:44 +02:00
%td= f.text_field :code, :placeholder => "example"
2011-10-08 23:36:38 +02:00
.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();
});