diff options
Diffstat (limited to 'app/views/merge_requests/_form.html.haml')
-rw-r--r-- | app/views/merge_requests/_form.html.haml | 56 |
1 files changed, 40 insertions, 16 deletions
diff --git a/app/views/merge_requests/_form.html.haml b/app/views/merge_requests/_form.html.haml index 3d6febc6b7b..82d95577396 100644 --- a/app/views/merge_requests/_form.html.haml +++ b/app/views/merge_requests/_form.html.haml @@ -5,23 +5,43 @@ - @merge_request.errors.full_messages.each do |msg| %li= msg - .control-group - = f.label :title, :class => "control-label" - .controls= f.text_area :title, :class => "input-xxlarge", :maxlength => 255, :rows => 5 - .control-group - = f.label :source_branch, "From", :class => "control-label" - .controls - = f.select(:source_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px") - .mr_source_commit - .control-group - = f.label :target_branch, "To", :class => "control-label" - .controls - = f.select(:target_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px") - .mr_target_commit + + + %h3.padded.cgray 1. Select Branches + .row + .span6 + .ui-box + %h5 From (Head Branch) + .body + .padded + = f.label :source_branch, "From", :class => "control-label" + .controls + = f.select(:source_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px") + %hr + .mr_source_commit + .clearfix + + .span6 + .ui-box + %h5 To (Base Branch) + .body + .padded + = f.label :target_branch, "To", :class => "control-label" + .controls + = f.select(:target_branch, @project.heads.map(&:name), { :include_blank => "Select branch" }, :style => "width:250px") + %hr + .mr_target_commit + .clearfix + + %h3.padded.cgray 2. Fill info .clearfix = f.label :assignee_id, "Assign to", :class => "control-label" .controls= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }, :style => "width:250px") + .control-group + = f.label :title, :class => "control-label" + .controls= f.text_field :title, :class => "input-xxlarge pad", :maxlength => 255, :rows => 5 + .form-actions = f.submit 'Save', :class => "btn-primary btn" - if @merge_request.new_record? @@ -38,14 +58,18 @@ $('select#merge_request_assignee_id').chosen(); $('select#merge_request_source_branch').chosen(); $('select#merge_request_target_branch').chosen(); + var source_branch = $("#merge_request_source_branch"); + var target_branch = $("#merge_request_target_branch"); + + $.get("#{branch_from_project_merge_requests_path(@project)}", {ref: source_branch.val() }); + $.get("#{branch_to_project_merge_requests_path(@project)}", {ref: target_branch.val() }); - - $("#merge_request_source_branch").live("change", function() { + source_branch.live("change", function() { $.get("#{branch_from_project_merge_requests_path(@project)}", {ref: $(this).val() }); }); - $("#merge_request_target_branch").live("change", function() { + target_branch.live("change", function() { $.get("#{branch_to_project_merge_requests_path(@project)}", {ref: $(this).val() }); }); }); |