2012-01-28 09:47:55 -05:00
|
|
|
%h3
|
|
|
|
= "Merge Request ##{@merge_request.id}:"
|
|
|
|
|
2012-03-16 14:11:03 -04:00
|
|
|
%span.pretty_label.branch= @merge_request.source_branch
|
2012-01-28 09:47:55 -05:00
|
|
|
→
|
2012-03-16 14:11:03 -04:00
|
|
|
%span.pretty_label.branch= @merge_request.target_branch
|
2012-01-28 09:47:55 -05:00
|
|
|
|
|
|
|
%span.right
|
2012-02-21 17:31:18 -05:00
|
|
|
- if can?(current_user, :modify_merge_request, @merge_request)
|
2012-03-14 18:57:43 -04:00
|
|
|
- if @merge_request.open?
|
2012-03-27 17:31:14 -04:00
|
|
|
= link_to "Show how to merge", "#", :class => "how_to_merge_link btn small padded", :title => "How To Merge"
|
|
|
|
= link_to 'Close', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => true }, :status_only => true), :method => :put, :class => "btn small padded", :title => "Close merge request"
|
|
|
|
= link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn small padded" do
|
2012-03-14 18:57:43 -04:00
|
|
|
Edit
|
2012-01-28 09:47:55 -05:00
|
|
|
|
2012-03-15 07:03:56 -04:00
|
|
|
%br
|
2012-03-14 18:51:03 -04:00
|
|
|
- if @merge_request.upvotes > 0
|
2012-03-15 07:03:56 -04:00
|
|
|
.upvotes#upvotes= "+#{pluralize @merge_request.upvotes, 'upvote'}"
|
2012-03-14 18:51:03 -04:00
|
|
|
|
2012-03-25 12:05:24 -04:00
|
|
|
= render "merge_requests/how_to_merge"
|
2012-02-18 07:12:48 -05:00
|
|
|
.back_link
|
|
|
|
= link_to project_merge_requests_path(@project) do
|
|
|
|
← To merge requests
|
2012-02-18 07:43:35 -05:00
|
|
|
|
2012-03-28 03:46:51 -04:00
|
|
|
.main_box
|
|
|
|
.top_box_content
|
2012-04-11 16:32:45 -04:00
|
|
|
%h4
|
2012-03-25 12:44:29 -04:00
|
|
|
- if @merge_request.closed
|
2012-03-25 12:05:24 -04:00
|
|
|
.alert-message.error.status_info Closed
|
2012-03-25 12:44:29 -04:00
|
|
|
- else
|
2012-03-25 12:05:24 -04:00
|
|
|
.alert-message.success.status_info Open
|
2012-03-25 12:44:29 -04:00
|
|
|
= @merge_request.title
|
2012-01-28 10:21:00 -05:00
|
|
|
|
2012-03-28 03:46:51 -04:00
|
|
|
.middle_box_content
|
2012-03-25 12:05:24 -04:00
|
|
|
%div
|
2012-03-27 17:31:14 -04:00
|
|
|
%cite.cgray Created at #{@merge_request.created_at.stamp("Aug 21, 2011")} by
|
2012-03-25 12:05:24 -04:00
|
|
|
= image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av"
|
|
|
|
%strong.author= link_to_merge_request_author(@merge_request)
|
|
|
|
|
|
|
|
%cite.cgray and currently assigned to
|
|
|
|
= 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 12:44:29 -04:00
|
|
|
|
|
|
|
|
|
|
|
- if @merge_request.closed
|
2012-03-28 03:46:51 -04:00
|
|
|
.bottom_box_content
|
|
|
|
- if @merge_request.merged?
|
|
|
|
%span
|
|
|
|
Merged by #{@merge_request.merge_event.author_name}
|
|
|
|
%small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.
|
|
|
|
- elsif @merge_request.closed_event
|
|
|
|
%span
|
|
|
|
Closed by #{@merge_request.closed_event.author_name}
|
|
|
|
%small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
|
2011-11-28 02:39:43 -05:00
|
|
|
|
2012-02-14 18:15:02 -05:00
|
|
|
= render "merge_requests/commits"
|
2011-11-28 02:39:43 -05:00
|
|
|
|
2012-02-14 18:15:02 -05:00
|
|
|
- unless @commits.empty?
|
2012-04-10 01:51:08 -04:00
|
|
|
.nav.nav-tabs
|
2012-02-14 18:15:02 -05:00
|
|
|
%li.active
|
|
|
|
= link_to "#notes", :class => "merge-notes-tab tab" do
|
|
|
|
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 16:24:31 -05:00
|
|
|
|
2011-12-13 03:07:52 -05:00
|
|
|
|
2012-03-14 18:56:42 -04:00
|
|
|
.merge_request_notes#notes= render "notes/notes", :tid => @merge_request.id, :tt => "merge_request"
|
2011-12-13 03:07:52 -05:00
|
|
|
|
|
|
|
.merge-request-diffs
|
2012-03-26 14:41:58 -04:00
|
|
|
.status
|
2011-11-28 15:16:57 -05:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
$(function(){
|
2011-12-13 03:07:52 -05:00
|
|
|
MergeRequest.init();
|
2011-11-28 15:16:57 -05:00
|
|
|
})
|
2012-02-24 15:19:47 -05:00
|
|
|
|
|
|
|
= render "notes/per_line_form"
|
2012-03-14 18:56:42 -04:00
|
|
|
|
2012-02-24 15:19:47 -05:00
|
|
|
:javascript
|
|
|
|
$(document).ready(function(){
|
|
|
|
$(".line_note_link, .line_note_reply_link").live("click", function(e) {
|
|
|
|
var form = $(".per_line_form");
|
|
|
|
$(this).parent().parent().after(form);
|
|
|
|
form.find("#note_line_code").val($(this).attr("line_code"));
|
|
|
|
form.show();
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|