2012-01-28 15:47:55 +01:00
|
|
|
%h3
|
|
|
|
= "Merge Request ##{@merge_request.id}:"
|
|
|
|
|
2012-03-16 19:11:03 +01:00
|
|
|
%span.pretty_label.branch= @merge_request.source_branch
|
2012-01-28 15:47:55 +01:00
|
|
|
→
|
2012-03-16 19:11:03 +01:00
|
|
|
%span.pretty_label.branch= @merge_request.target_branch
|
2012-01-28 15:47:55 +01:00
|
|
|
|
|
|
|
%span.right
|
2012-02-21 23:31:18 +01:00
|
|
|
- if can?(current_user, :modify_merge_request, @merge_request)
|
2012-03-14 23:57:43 +01:00
|
|
|
- if @merge_request.open?
|
2012-06-05 18:45:18 +02:00
|
|
|
= link_to 'Close', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => true }, :status_only => true), :method => :put, :class => "btn small padded danger", :title => "Close merge request"
|
2012-06-04 00:37:27 +02:00
|
|
|
= link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn small padded" do
|
2012-05-24 08:23:25 +02:00
|
|
|
%i.icon-edit
|
2012-03-14 23:57:43 +01:00
|
|
|
Edit
|
2012-01-28 15:47:55 +01:00
|
|
|
|
2012-03-15 12:03:56 +01:00
|
|
|
%br
|
2012-03-14 23:51:03 +01:00
|
|
|
- if @merge_request.upvotes > 0
|
2012-03-15 12:03:56 +01:00
|
|
|
.upvotes#upvotes= "+#{pluralize @merge_request.upvotes, 'upvote'}"
|
2012-03-14 23:51:03 +01:00
|
|
|
|
2012-03-25 18:05:24 +02:00
|
|
|
= render "merge_requests/how_to_merge"
|
2012-02-18 13:12:48 +01:00
|
|
|
.back_link
|
2012-06-04 00:37:27 +02:00
|
|
|
= link_to project_merge_requests_path(@project) do
|
2012-02-18 13:12:48 +01:00
|
|
|
← To merge requests
|
2012-02-18 13:43:35 +01:00
|
|
|
|
2012-03-28 09:46:51 +02:00
|
|
|
.main_box
|
|
|
|
.top_box_content
|
2012-04-11 22:32:45 +02:00
|
|
|
%h4
|
2012-03-25 18:44:29 +02:00
|
|
|
- if @merge_request.closed
|
2012-03-25 18:05:24 +02:00
|
|
|
.alert-message.error.status_info Closed
|
2012-06-04 00:37:27 +02:00
|
|
|
- else
|
2012-03-25 18:05:24 +02:00
|
|
|
.alert-message.success.status_info Open
|
2012-03-25 18:44:29 +02:00
|
|
|
= @merge_request.title
|
2012-01-28 16:21:00 +01:00
|
|
|
|
2012-03-28 09:46:51 +02:00
|
|
|
.middle_box_content
|
2012-03-25 18:05:24 +02:00
|
|
|
%div
|
2012-06-04 00:37:27 +02:00
|
|
|
%cite.cgray Created at #{@merge_request.created_at.stamp("Aug 21, 2011")} by
|
2012-03-25 18:05:24 +02:00
|
|
|
= image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av"
|
|
|
|
%strong.author= link_to_merge_request_author(@merge_request)
|
|
|
|
|
2012-06-04 00:37:27 +02:00
|
|
|
%cite.cgray and currently assigned to
|
2012-03-25 18:05:24 +02:00
|
|
|
= image_tag gravatar_icon(@merge_request.assignee_email), :width => 16, :class => "lil_av"
|
|
|
|
%strong.author= link_to_merge_request_assignee(@merge_request)
|
2012-03-25 18:44:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
- if @merge_request.closed
|
2012-03-28 09:46:51 +02:00
|
|
|
.bottom_box_content
|
|
|
|
- if @merge_request.merged?
|
|
|
|
%span
|
2012-06-04 00:37:27 +02:00
|
|
|
Merged by #{@merge_request.merge_event.author_name}
|
2012-03-28 09:46:51 +02:00
|
|
|
%small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.
|
|
|
|
- elsif @merge_request.closed_event
|
|
|
|
%span
|
2012-06-04 00:37:27 +02:00
|
|
|
Closed by #{@merge_request.closed_event.author_name}
|
2012-03-28 09:46:51 +02:00
|
|
|
%small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
|
2011-11-28 08:39:43 +01:00
|
|
|
|
2012-05-28 19:19:54 +02:00
|
|
|
- unless can?(current_user, :accept_mr, @project)
|
|
|
|
.alert-message
|
|
|
|
%strong Only masters can accept MR
|
|
|
|
|
2012-03-30 19:49:34 +02:00
|
|
|
|
|
|
|
- if @merge_request.open? && @commits.any? && can?(current_user, :accept_mr, @project)
|
2012-04-16 21:08:03 +02:00
|
|
|
.automerge_widget.can_be_merged{:style => "display:none"}
|
2012-05-28 19:19:54 +02:00
|
|
|
.alert.alert-success
|
2012-06-04 00:37:27 +02:00
|
|
|
%span
|
2012-06-03 20:29:20 +02:00
|
|
|
= form_for [:automerge, @project, @merge_request], :remote => true, :method => :get do |f|
|
2012-06-05 18:45:18 +02:00
|
|
|
%p
|
|
|
|
You can accept this request automatically.
|
|
|
|
If you still want to do it manually -
|
|
|
|
%strong= link_to "click here", "#", :class => "how_to_merge_link vlink", :title => "How To Merge"
|
|
|
|
for instructions
|
|
|
|
.accept_group
|
|
|
|
= f.submit "Accept Merge Request", :class => "btn small success accept_merge_request"
|
|
|
|
- unless @project.root_ref? @merge_request.source_branch
|
|
|
|
.remove_branch_holder
|
|
|
|
= label_tag :should_remove_source_branch, :class => "checkbox" do
|
|
|
|
= check_box_tag :should_remove_source_branch
|
|
|
|
Remove source-branch
|
|
|
|
.clearfix
|
2012-06-03 20:29:20 +02:00
|
|
|
|
2012-06-04 00:37:27 +02:00
|
|
|
|
2012-04-16 21:08:03 +02:00
|
|
|
.automerge_widget.cannot_be_merged{:style => "display:none"}
|
2012-05-28 19:19:54 +02:00
|
|
|
.alert.alert-info
|
|
|
|
%span
|
2012-03-30 07:05:04 +02:00
|
|
|
= link_to "Show how to merge", "#", :class => "how_to_merge_link btn small padded", :title => "How To Merge"
|
2012-05-28 19:19:54 +02:00
|
|
|
|
|
|
|
%strong This request cant be merged with GitLab. You should do it manually
|
2012-06-04 00:37:27 +02:00
|
|
|
|
2012-04-16 21:08:03 +02:00
|
|
|
.automerge_widget.unchecked
|
|
|
|
.alert-message
|
2012-06-04 00:37:27 +02:00
|
|
|
%strong
|
2012-05-28 19:19:54 +02:00
|
|
|
%i.icon-refresh
|
2012-06-04 00:37:27 +02:00
|
|
|
Checking for ability to automatically merge…
|
|
|
|
|
2012-04-16 22:05:08 +02:00
|
|
|
.automerge_widget.already_cannot_be_merged{:style => "display:none"}
|
2012-05-28 19:19:54 +02:00
|
|
|
.alert.alert-info
|
|
|
|
%strong This merge request already can not be merged. Try to reload page.
|
2012-04-16 21:08:03 +02:00
|
|
|
|
2012-02-15 00:15:02 +01:00
|
|
|
= render "merge_requests/commits"
|
2011-11-28 08:39:43 +01:00
|
|
|
|
2012-02-15 00:15:02 +01:00
|
|
|
- unless @commits.empty?
|
2012-04-10 07:51:08 +02:00
|
|
|
.nav.nav-tabs
|
2012-02-15 00:15:02 +01:00
|
|
|
%li.active
|
2012-06-04 00:37:27 +02:00
|
|
|
= link_to "#notes", :class => "merge-notes-tab tab" do
|
2012-02-15 00:15:02 +01:00
|
|
|
Notes
|
|
|
|
%li
|
|
|
|
= link_to "#diffs", "data-url" => diffs_project_merge_request_path(@project, @merge_request), :class => "merge-diffs-tab tab" do
|
|
|
|
Diff
|
2011-12-13 22:24:31 +01:00
|
|
|
|
2011-12-13 09:07:52 +01:00
|
|
|
|
2012-03-14 23:56:42 +01:00
|
|
|
.merge_request_notes#notes= render "notes/notes", :tid => @merge_request.id, :tt => "merge_request"
|
2011-12-13 09:07:52 +01:00
|
|
|
|
|
|
|
.merge-request-diffs
|
2012-03-26 20:41:58 +02:00
|
|
|
.status
|
2011-11-28 21:16:57 +01:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
$(function(){
|
2012-04-16 21:08:03 +02:00
|
|
|
MergeRequest.init({
|
|
|
|
url_to_automerge_check: "#{automerge_check_project_merge_request_path(@project, @merge_request)}",
|
2012-04-26 23:53:55 +02:00
|
|
|
check_enable: #{@merge_request.state == MergeRequest::UNCHECKED ? "true" : "false"},
|
|
|
|
current_state: "#{@merge_request.human_state}"
|
2012-04-16 21:08:03 +02:00
|
|
|
});
|
2012-03-30 07:15:04 +02:00
|
|
|
|
2012-06-03 20:29:20 +02:00
|
|
|
$(".edit_merge_request").live("ajax:beforeSend", function() {
|
2012-03-30 07:15:04 +02:00
|
|
|
$(this).replaceWith('#{image_tag "ajax_loader.gif"}');
|
|
|
|
})
|
2011-11-28 21:16:57 +01:00
|
|
|
})
|
2012-02-24 21:19:47 +01:00
|
|
|
|
|
|
|
= render "notes/per_line_form"
|
2012-03-14 23:56:42 +01:00
|
|
|
|
2012-02-24 21:19:47 +01:00
|
|
|
:javascript
|
|
|
|
$(document).ready(function(){
|
2012-06-04 00:37:27 +02:00
|
|
|
$(".line_note_link, .line_note_reply_link").live("click", function(e) {
|
2012-02-24 21:19:47 +01:00
|
|
|
var form = $(".per_line_form");
|
|
|
|
$(this).parent().parent().after(form);
|
|
|
|
form.find("#note_line_code").val($(this).attr("line_code"));
|
2012-06-04 00:37:27 +02:00
|
|
|
form.show();
|
2012-02-24 21:19:47 +01:00
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|