2012-01-28 15:47:55 +01:00
|
|
|
%h3
|
|
|
|
= "Merge Request ##{@merge_request.id}:"
|
|
|
|
|
|
|
|
%span.label= @merge_request.source_branch
|
|
|
|
→
|
|
|
|
%span.label= @merge_request.target_branch
|
|
|
|
|
2012-01-29 22:59:12 +01:00
|
|
|
%small
|
|
|
|
created at
|
|
|
|
= @merge_request.created_at.stamp("Aug 21, 2011")
|
|
|
|
|
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-01-28 16:21:00 +01:00
|
|
|
- if @merge_request.closed
|
|
|
|
= link_to 'Reopen', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => false }, :status_only => true), :method => :put, :class => "btn"
|
|
|
|
- else
|
|
|
|
= link_to 'Close', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => true }, :status_only => true), :method => :put, :class => "btn", :title => "Close merge request"
|
2012-03-14 23:56:42 +01:00
|
|
|
= link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn" do
|
2012-01-28 16:21:00 +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-02-18 13:12:48 +01:00
|
|
|
.back_link
|
|
|
|
= link_to project_merge_requests_path(@project) do
|
|
|
|
← To merge requests
|
2012-02-18 13:43:35 +01:00
|
|
|
|
|
|
|
|
2012-01-28 15:47:55 +01:00
|
|
|
%hr
|
2012-01-28 16:21:00 +01:00
|
|
|
- if @merge_request.closed
|
|
|
|
.alert-message.error Closed
|
|
|
|
- else
|
2012-02-18 13:43:35 +01:00
|
|
|
.alert-message.success
|
|
|
|
= link_to "#", :class => "info_link", :title => "How To Merge" do
|
|
|
|
= image_tag "Info-UI.PNG"
|
|
|
|
Open
|
2012-01-28 16:21:00 +01:00
|
|
|
|
2012-02-18 13:43:35 +01:00
|
|
|
= render "merge_requests/how_to_merge"
|
2012-01-28 16:21:00 +01:00
|
|
|
|
|
|
|
%div.well
|
|
|
|
%div
|
2012-01-29 22:59:12 +01:00
|
|
|
%cite.cgray Created by
|
|
|
|
= image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av"
|
2012-02-05 11:58:02 +01:00
|
|
|
%strong.author= link_to_merge_request_author(@merge_request)
|
2012-01-29 22:59:12 +01:00
|
|
|
|
|
|
|
%cite.cgray and currently assigned to
|
|
|
|
= image_tag gravatar_icon(@merge_request.assignee_email), :width => 16, :class => "lil_av"
|
2012-02-05 11:58:02 +01:00
|
|
|
%strong.author= link_to_merge_request_assignee(@merge_request)
|
2012-01-29 22:59:12 +01:00
|
|
|
|
|
|
|
%hr
|
2012-01-28 16:21:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
%div= simple_format @merge_request.title
|
2011-11-28 08:39:43 +01: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?
|
|
|
|
.tabs
|
|
|
|
%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 22:24:31 +01:00
|
|
|
|
2012-02-15 00:15:02 +01:00
|
|
|
%img{:src => "/assets/ajax-loader-facebook.gif", :class => "dashboard-loader"}
|
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
|
2011-11-28 21:16:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
:javascript
|
|
|
|
$(function(){
|
2011-12-13 09:07:52 +01:00
|
|
|
MergeRequest.init();
|
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(){
|
|
|
|
$(".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;
|
|
|
|
});
|
|
|
|
});
|