gitlabhq/app/views/projects/_form.html.haml
2011-11-15 11:09:59 +02:00

60 lines
1.8 KiB
Plaintext

= form_for(@project, :remote => true) do |f|
%div.form_content
- unless @project.new_record?
%h2.icon
%span
= @project.name
- 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
%tr
%td= f.label :name
%td= f.text_field :name, :placeholder => "Example Project"
%tr
%td
.left= f.label :path
%cite.right= "git@#{GITOSIS["host"]}:"
%td
= f.text_field :path, :placeholder => "example_project", :disabled => !@project.new_record?
%tr
%td
.left= f.label :code
%cite.right= "http://#{GITOSIS["host"]}/"
%td= f.text_field :code, :placeholder => "example"
%tr
%td= f.label :tag_list
%td= f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field
%tr
%td= f.label :description
%td= f.text_area :description, :placeholder => "project description", :style => "height:50px"
%br
.actions
= f.submit :class => "button"
%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();
});
:javascript
$(function(){
taggifyForm();
})