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

55 lines
1.8 KiB
Plaintext
Raw Normal View History

2011-12-13 22:24:31 +01:00
= form_for [@project, @merge_request] do |f|
%div
%span.entity-info
- if @merge_request.new_record?
= link_to project_merge_requests_path(@project) do
.entity-button
2011-12-17 10:18:27 +01:00
Merge Requests
2011-12-13 22:24:31 +01:00
%i
- else
= link_to project_merge_request_path(@project, @merge_request) do
.entity-button
2011-12-17 10:18:27 +01:00
Show Merge Request
2011-12-13 22:24:31 +01:00
%i
%h2= @merge_request.new_record? ? "New Merge Request" : "Edit Merge Request ##{@merge_request.id}"
%hr
%table.no-borders
-if @merge_request.errors.any?
%tr
%td{:colspan => 2}
#error_explanation
- @merge_request.errors.full_messages.each do |msg|
%span= msg
%br
%tr
%td= f.label :source_branch, "From"
%td= f.select(:source_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px")
%tr
%td= f.label :target_branch, "To"
%td= f.select(:target_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px")
%tr
%td= f.label :assignee_id, "Assign to"
%td= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }, :style => "width:250px")
= f.text_area :title, :style => "width:718px; height:100px", :maxlength => 255
%br
%br
.merge-tabs
2012-01-21 22:17:29 +01:00
= f.submit 'Save', :class => "positive-button"
2011-12-13 22:24:31 +01:00
 
- unless @merge_request.new_record?
.right
= link_to 'Remove', [@project, @merge_request], :confirm => 'Are you sure?', :method => :delete, :class => "red-button"
2011-11-28 08:39:43 +01:00
2011-12-13 19:40:45 +01:00
2011-11-28 08:39:43 +01:00
:javascript
$(function(){
$('select#merge_request_assignee_id').chosen();
$('select#merge_request_source_branch').chosen();
$('select#merge_request_target_branch').chosen();
});