summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/events/_event_last_push.html.haml5
-rw-r--r--app/views/merge_requests/update_branches.js.haml8
-rw-r--r--app/views/notify/closed_merge_request_email.html.haml2
-rw-r--r--app/views/notify/closed_merge_request_email.text.haml4
-rw-r--r--app/views/notify/merged_merge_request_email.html.haml4
-rw-r--r--app/views/notify/merged_merge_request_email.text.haml4
-rw-r--r--app/views/notify/new_merge_request_email.html.haml4
-rw-r--r--app/views/notify/new_merge_request_email.text.erb5
-rw-r--r--app/views/notify/note_merge_request_email.html.haml4
-rw-r--r--app/views/notify/note_merge_request_email.text.erb2
-rw-r--r--app/views/notify/reassigned_merge_request_email.html.haml2
-rw-r--r--app/views/notify/reassigned_merge_request_email.text.erb2
-rw-r--r--app/views/projects/commits/_commit.html.haml8
-rw-r--r--app/views/projects/commits/_commits.html.haml3
-rw-r--r--app/views/projects/compare/show.html.haml2
-rw-r--r--app/views/projects/merge_requests/_form.html.haml46
-rw-r--r--app/views/projects/merge_requests/_merge_request.html.haml7
-rw-r--r--app/views/projects/merge_requests/branch_from.js.haml2
-rw-r--r--app/views/projects/merge_requests/branch_to.js.haml2
-rw-r--r--app/views/projects/merge_requests/show/_commits.html.haml6
-rw-r--r--app/views/projects/merge_requests/show/_how_to_merge.html.haml60
-rw-r--r--app/views/projects/merge_requests/show/_mr_accept.html.haml2
-rw-r--r--app/views/projects/merge_requests/show/_mr_title.html.haml2
-rw-r--r--app/views/search/_result.html.haml4
-rw-r--r--app/views/shared/_merge_requests.html.haml2
25 files changed, 122 insertions, 70 deletions
diff --git a/app/views/events/_event_last_push.html.haml b/app/views/events/_event_last_push.html.haml
index de5634d3c55..a634365ff3e 100644
--- a/app/views/events/_event_last_push.html.haml
+++ b/app/views/events/_event_last_push.html.haml
@@ -9,6 +9,9 @@
= time_ago_in_words(event.created_at)
ago.
.pull-right
- = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn btn-create btn-small" do
+ = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn btn-new-mr" do
Create Merge Request
+ - if !event.project.nil? && event.project.forked?
+ = link_to new_mr_path_for_fork_from_push_event(event), title: "New Merge Request", class: "btn btn-create btn-small" do
+ Create Merge Request on fork
%hr
diff --git a/app/views/merge_requests/update_branches.js.haml b/app/views/merge_requests/update_branches.js.haml
new file mode 100644
index 00000000000..c9171622669
--- /dev/null
+++ b/app/views/merge_requests/update_branches.js.haml
@@ -0,0 +1,8 @@
+:plain
+ $(".target_branch").html("#{escape_javascript(options_for_select(@target_branches))}");
+ $(".target_branch").trigger("liszt:updated");
+ $(".mr_target_commit").html("");
+
+
+
+
diff --git a/app/views/notify/closed_merge_request_email.html.haml b/app/views/notify/closed_merge_request_email.html.haml
index 0c6c79e097a..306c1ff8f60 100644
--- a/app/views/notify/closed_merge_request_email.html.haml
+++ b/app/views/notify/closed_merge_request_email.html.haml
@@ -3,7 +3,7 @@
%p
= link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.project, @merge_request)
%p
- Branches: #{@merge_request.source_branch} → #{@merge_request.target_branch}
+ Projects:Branches: #{@merge_request.source_project.path_with_namespace}:#{@merge_request.source_branch} → #{@merge_request.target_project.path_with_namespace}:#{@merge_request.target_branch}
%p
Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
diff --git a/app/views/notify/closed_merge_request_email.text.haml b/app/views/notify/closed_merge_request_email.text.haml
index ee4648e3d09..1c92e004ff6 100644
--- a/app/views/notify/closed_merge_request_email.text.haml
+++ b/app/views/notify/closed_merge_request_email.text.haml
@@ -1,8 +1,8 @@
= "Merge Request #{@merge_request.id} was closed by #{@updated_by.name}"
-Merge Request url: #{project_merge_request_url(@merge_request.project, @merge_request)}
+Merge Request url: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
-Branches: #{@merge_request.source_branch} - #{@merge_request.target_branch}
+Project:Branches: #{@merge_request.source_project.path_with_namespace}/#{@merge_request.source_branch} - #{@merge_request.target_project.path_with_namespace}#{@merge_request.target_branch}
Author: #{@merge_request.author_name}
Assignee: #{@merge_request.assignee_name}
diff --git a/app/views/notify/merged_merge_request_email.html.haml b/app/views/notify/merged_merge_request_email.html.haml
index 2b8cc030b23..4115adf1b42 100644
--- a/app/views/notify/merged_merge_request_email.html.haml
+++ b/app/views/notify/merged_merge_request_email.html.haml
@@ -1,9 +1,9 @@
%p
= "Merge Request #{@merge_request.id} was merged"
%p
- = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.project, @merge_request)
+ = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.target_project, @merge_request)
%p
- Branches: #{@merge_request.source_branch} → #{@merge_request.target_branch}
+ Projects:Branches: #{@merge_request.source_project.path_with_namespace}:#{@merge_request.source_branch} → #{@merge_request.target_project.path_with_namespace}:#{@merge_request.target_branch}
%p
Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
diff --git a/app/views/notify/merged_merge_request_email.text.haml b/app/views/notify/merged_merge_request_email.text.haml
index 91c23360195..5f19473fae0 100644
--- a/app/views/notify/merged_merge_request_email.text.haml
+++ b/app/views/notify/merged_merge_request_email.text.haml
@@ -1,8 +1,8 @@
= "Merge Request #{@merge_request.id} was merged"
-Merge Request Url: #{project_merge_request_url(@merge_request.project, @merge_request)}
+Merge Request Url: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
-Branches: #{@merge_request.source_branch} - #{@merge_request.target_branch}
+Project:Branches: #{@merge_request.source_project.path_with_namespace}/#{@merge_request.source_branch} - #{@merge_request.target_project.path_with_namespace}#{@merge_request.target_branch}
Author: #{@merge_request.author_name}
Assignee: #{@merge_request.assignee_name}
diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml
index 0f1cfff5831..fc4ffba1102 100644
--- a/app/views/notify/new_merge_request_email.html.haml
+++ b/app/views/notify/new_merge_request_email.html.haml
@@ -1,9 +1,9 @@
%p
= "New Merge Request !#{@merge_request.id}"
%p
- = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.project, @merge_request)
+ = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.target_project, @merge_request)
%p
- Branches: #{@merge_request.source_branch} → #{@merge_request.target_branch}
+ Project:Branches: #{@merge_request.source_project.path_with_namespace}/#{@merge_request.source_branch} - #{@merge_request.target_project.path_with_namespace}#{@merge_request.target_branch}
%p
Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
diff --git a/app/views/notify/new_merge_request_email.text.erb b/app/views/notify/new_merge_request_email.text.erb
index 3393d8384f1..4c1a93f7dcc 100644
--- a/app/views/notify/new_merge_request_email.text.erb
+++ b/app/views/notify/new_merge_request_email.text.erb
@@ -1,9 +1,8 @@
New Merge Request <%= @merge_request.id %>
-<%= url_for(project_merge_request_url(@merge_request.project, @merge_request)) %>
-
+<%= url_for(project_merge_request_url(@merge_request.target_project, @merge_request)) %>
-Branches: <%= @merge_request.source_branch %> to <%= @merge_request.target_branch %>
+From: <%= @merge_request.source_project.path_with_namespace%>:<%= @merge_request.source_branch %> to <%= @merge_request.target_project.path_with_namespace%>:<%= @merge_request.target_branch %>
Author: <%= @merge_request.author_name %>
Asignee: <%= @merge_request.assignee_name %>
diff --git a/app/views/notify/note_merge_request_email.html.haml b/app/views/notify/note_merge_request_email.html.haml
index 4f97867e49d..14abcca6070 100644
--- a/app/views/notify/note_merge_request_email.html.haml
+++ b/app/views/notify/note_merge_request_email.html.haml
@@ -1,8 +1,8 @@
%p
- if @note.for_diff_line?
- = link_to "New comment on diff", diffs_project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}")
+ = link_to "New comment on diff", diffs_project_merge_request_url(@merge_request.target_project, @merge_request, anchor: "note_#{@note.id}")
- else
- = link_to "New comment", project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}")
+ = link_to "New comment", project_merge_request_url(@merge_request.target_project, @merge_request, anchor: "note_#{@note.id}")
for Merge Request ##{@merge_request.id}
%cite "#{truncate(@merge_request.title, length: 20)}"
= render 'note_message'
diff --git a/app/views/notify/note_merge_request_email.text.erb b/app/views/notify/note_merge_request_email.text.erb
index 26c73bdaa38..3daa091db81 100644
--- a/app/views/notify/note_merge_request_email.text.erb
+++ b/app/views/notify/note_merge_request_email.text.erb
@@ -1,6 +1,6 @@
New comment for Merge Request <%= @merge_request.id %>
-<%= url_for(project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}")) %>
+<%= url_for(project_merge_request_url(@merge_request.target_project, @merge_request, anchor: "note_#{@note.id}")) %>
<%= @note.author_name %>
diff --git a/app/views/notify/reassigned_merge_request_email.html.haml b/app/views/notify/reassigned_merge_request_email.html.haml
index 5ad72764e38..314b2882672 100644
--- a/app/views/notify/reassigned_merge_request_email.html.haml
+++ b/app/views/notify/reassigned_merge_request_email.html.haml
@@ -1,6 +1,6 @@
%p
= "Reassigned Merge Request !#{@merge_request.id}"
- = link_to_gfm truncate(@merge_request.title, length: 30), project_merge_request_url(@merge_request.project, @merge_request)
+ = link_to_gfm truncate(@merge_request.title, length: 30), project_merge_request_url(@merge_request.target_project, @merge_request)
%p
Assignee changed
- if @previous_assignee
diff --git a/app/views/notify/reassigned_merge_request_email.text.erb b/app/views/notify/reassigned_merge_request_email.text.erb
index 25b2a43fcdd..05a9797165d 100644
--- a/app/views/notify/reassigned_merge_request_email.text.erb
+++ b/app/views/notify/reassigned_merge_request_email.text.erb
@@ -1,6 +1,6 @@
Reassigned Merge Request <%= @merge_request.id %>
-<%= url_for(project_merge_request_url(@merge_request.project, @merge_request)) %>
+<%= url_for(project_merge_request_url(@merge_request.target_project, @merge_request)) %>
Assignee changed <%= "from #{@previous_assignee.name}" if @previous_assignee %> to <%= @merge_request.assignee_name %>
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index eba6c206c46..eb5bdb886e2 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -1,12 +1,12 @@
%li.commit
.browse_code_link_holder
%p
- %strong= link_to "Browse Code »", project_tree_path(@project, commit), class: "right"
+ %strong= link_to "Browse Code »", project_tree_path(project, commit), class: "right"
%p
- = link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"
+ = link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id"
= commit_author_link(commit, avatar: true, size: 24)
&nbsp;
- = link_to_gfm truncate(commit.title, length: 70), project_commit_path(@project, commit.id), class: "row_title"
+ = link_to_gfm truncate(commit.title, length: 70), project_commit_path(project, commit.id), class: "row_title"
%time.committed_ago{ datetime: commit.committed_date, title: commit.committed_date.stamp("Aug 21, 2011 9:23pm") }
= time_ago_in_words(commit.committed_date)
@@ -14,7 +14,7 @@
&nbsp;
%span.notes_count
- - notes = @project.notes.for_commit_id(commit.id)
+ - notes = project.notes.for_commit_id(commit.id)
- if notes.any?
%span.badge.badge-info
%i.icon-comment
diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml
index acdb8891344..d8b84aa5041 100644
--- a/app/views/projects/commits/_commits.html.haml
+++ b/app/views/projects/commits/_commits.html.haml
@@ -3,7 +3,6 @@
.title
%i.icon-calendar
%span= day.stamp("28 Aug, 2010")
-
.pull-right
%small= pluralize(commits.count, 'commit')
- %ul.well-list= render commits
+ %ul.well-list= render commits, :project => @project
diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml
index 5e6b5b71753..e18fd6cc093 100644
--- a/app/views/projects/compare/show.html.haml
+++ b/app/views/projects/compare/show.html.haml
@@ -15,7 +15,7 @@
%div.ui-box
.title
Commits (#{@commits.count})
- %ul.well-list= render Commit.decorate(@commits)
+ %ul.well-list= render Commit.decorate(@commits), project: @project
- unless @diffs.empty?
%h4 Diff
diff --git a/app/views/projects/merge_requests/_form.html.haml b/app/views/projects/merge_requests/_form.html.haml
index 86c442142bf..c378739c111 100644
--- a/app/views/projects/merge_requests/_form.html.haml
+++ b/app/views/projects/merge_requests/_form.html.haml
@@ -1,4 +1,4 @@
-= form_for [@project, @merge_request], html: { class: "#{controller.action_name}-merge-request form-horizontal" } do |f|
+= form_for [@project, @merge_request], html: { class: "#{controller.action_name}-merge-request form-horizontal" } do |form_helper|
-if @merge_request.errors.any?
.alert.alert-error
%ul
@@ -12,18 +12,20 @@
.row
.span5
.light-well
- %h5.cgray From (Head Branch)
- = f.select(:source_branch, @repository.branch_names, { include_blank: "Select branch" }, {class: 'chosen span4'})
+ %h5.cgray From
+ .padded= form_helper.select(:source_project_id,[[@merge_request.source_project.path_with_namespace,@merge_request.source_project.id]] , {}, {class: 'source_project chosen span4'})
+ .padded= form_helper.select(:source_branch, @merge_request.source_project.repository.branch_names, { include_blank: "Select branch" }, {class: 'source_branch chosen span4'})
.mr_source_commit.prepend-top-10
-
.span2
%h1.merge-request-angle
%i.icon-angle-right
.span5
.light-well
- %h5.cgray To (Base Branch)
- = f.select(:target_branch, @repository.branch_names, { include_blank: "Select branch" }, {class: 'chosen span4'})
- .mr_target_commit.prepend-top-10
+ %h5.cgray To
+ - projects = @project.forked_from_project.nil? ? [@project] : [ @project,@project.forked_from_project]
+ .padded= form_helper.select(:target_project_id, projects.map { |proj| [proj.path_with_namespace,proj.id] }, {include_blank: "Select Target Project" }, {class: 'target_project chosen span4'})
+ .padded= form_helper.select(:target_branch, @target_branches, { include_blank: "Select branch" }, {class: 'target_branch chosen span4'})
+ .mr_target_commit.prepend-top-10
%hr
@@ -47,12 +49,11 @@
Milestone
.input= f.select(:milestone_id, @project.milestones.active.all.map {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'})
-
.form-actions
- if @merge_request.new_record?
- = f.submit 'Submit merge request', class: "btn btn-create"
+ = form_helper.submit 'Submit merge request', class: "btn btn-create"
-else
- = f.submit 'Save changes', class: "btn btn-save"
+ = form_helper.submit 'Save changes', class: "btn btn-save"
- if @merge_request.new_record?
= link_to project_merge_requests_path(@project), class: "btn btn-cancel" do
Cancel
@@ -63,16 +64,23 @@
:javascript
disableButtonIfEmptyField("#merge_request_title", ".btn-save");
- var source_branch = $("#merge_request_source_branch")
- , target_branch = $("#merge_request_target_branch");
+ var source_branch = $("#merge_request_source_branch")
+ , target_branch = $("#merge_request_target_branch")
+ , target_project = $("#merge_request_target_project_id");
- $.get("#{branch_from_project_merge_requests_path(@project)}", {ref: source_branch.val() });
- $.get("#{branch_to_project_merge_requests_path(@project)}", {ref: target_branch.val() });
+ $.get("#{branch_from_project_merge_requests_path(@project)}", {ref: source_branch.val() });
+ $.get("#{branch_to_project_merge_requests_path(@project)}", {target_project_id: target_project.val(),ref: target_branch.val() });
- source_branch.live("change", function() {
- $.get("#{branch_from_project_merge_requests_path(@project)}", {ref: $(this).val() });
- });
+ target_project.live("change", function() {
+ $.get("#{update_branches_project_merge_requests_path(@project)}", {target_project_id: $(this).val() });
+ });
+ source_branch.live("change", function() {
+ $.get("#{branch_from_project_merge_requests_path(@project)}", {ref: $(this).val() });
+ });
+ target_branch.live("change", function() {
+ $.get("#{branch_to_project_merge_requests_path(@project)}", {target_project_id: target_project.val(),ref: $(this).val() });
+ });
- target_branch.live("change", function() {
- $.get("#{branch_to_project_merge_requests_path(@project)}", {ref: $(this).val() });
});
+
+
diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml
index ffc6b8fda1e..84bdde756d4 100644
--- a/app/views/projects/merge_requests/_merge_request.html.haml
+++ b/app/views/projects/merge_requests/_merge_request.html.haml
@@ -1,18 +1,19 @@
%li{ class: mr_css_classes(merge_request) }
.merge-request-title
%span.light= "##{merge_request.id}"
- = link_to_gfm truncate(merge_request.title, length: 80), project_merge_request_path(merge_request.project, merge_request), class: "row_title"
+ = link_to_gfm truncate(merge_request.title, length: 80), project_merge_request_path(merge_request.target_project, merge_request), class: "row_title"
- if merge_request.merged?
%small.pull-right
%i.icon-ok
= "MERGED"
- else
%span.pull-right
+ = "#{merge_request.source_project.path_with_namespace}/#{merge_request.source_branch}"
%i.icon-angle-right
- = merge_request.target_branch
+ = "#{merge_request.target_project.path_with_namespace}/#{merge_request.target_branch}"
.merge-request-info
- if merge_request.author
- authored by #{link_to_member(@project, merge_request.author)}
+ authored by #{link_to_member(merge_request.source_project, merge_request.author)}
- if merge_request.votes_count > 0
= render 'votes/votes_inline', votable: merge_request
- if merge_request.notes.any?
diff --git a/app/views/projects/merge_requests/branch_from.js.haml b/app/views/projects/merge_requests/branch_from.js.haml
index 0637fdcb72e..a680c708d63 100644
--- a/app/views/projects/merge_requests/branch_from.js.haml
+++ b/app/views/projects/merge_requests/branch_from.js.haml
@@ -1,2 +1,2 @@
:plain
- $(".mr_source_commit").html("#{commit_to_html(@commit)}");
+ $(".mr_source_commit").html("#{commit_to_html(@commit, @project)}");
diff --git a/app/views/projects/merge_requests/branch_to.js.haml b/app/views/projects/merge_requests/branch_to.js.haml
index 974100d1ba7..f4e2886ee44 100644
--- a/app/views/projects/merge_requests/branch_to.js.haml
+++ b/app/views/projects/merge_requests/branch_to.js.haml
@@ -1,2 +1,2 @@
:plain
- $(".mr_target_commit").html("#{commit_to_html(@commit)}");
+ $(".mr_target_commit").html("#{commit_to_html(@commit, @target_project)}");
diff --git a/app/views/projects/merge_requests/show/_commits.html.haml b/app/views/projects/merge_requests/show/_commits.html.haml
index 40876d16ddd..7b0e67053a5 100644
--- a/app/views/projects/merge_requests/show/_commits.html.haml
+++ b/app/views/projects/merge_requests/show/_commits.html.haml
@@ -7,19 +7,19 @@
- if @commits.count > 8
%ul.first-commits.well-list
- @commits.first(8).each do |commit|
- = render "projects/commits/commit", commit: commit
+ = render "projects/commits/commit", commit: commit, project: @merge_request.source_project
%li.bottom
8 of #{@commits.count} commits displayed.
%strong
%a.show-all-commits Click here to show all
%ul.all-commits.hide.well-list
- @commits.each do |commit|
- = render "projects/commits/commit", commit: commit
+ = render "projects/commits/commit", commit: commit, project: @merge_request.source_project
- else
%ul.well-list
- @commits.each do |commit|
- = render "projects/commits/commit", commit: commit
+ = render "projects/commits/commit", commit: commit, project: @merge_request.source_project
- else
%h4.nothing_here_message
diff --git a/app/views/projects/merge_requests/show/_how_to_merge.html.haml b/app/views/projects/merge_requests/show/_how_to_merge.html.haml
index 7f1e33418de..a0eb2309585 100644
--- a/app/views/projects/merge_requests/show/_how_to_merge.html.haml
+++ b/app/views/projects/merge_requests/show/_how_to_merge.html.haml
@@ -3,17 +3,49 @@
%a.close{href: "#"} ×
%h3 How To Merge
.modal-body
- %p
- %strong Step 1.
- Checkout target branch and get recent objects from GitLab
- %pre.dark
- :preserve
- git checkout #{@merge_request.target_branch}
- git fetch origin
- %p
- %strong Step 2.
- Merge source branch into target branch and push changes to GitLab
- %pre.dark
- :preserve
- git merge origin/#{@merge_request.source_branch}
- git push origin #{@merge_request.target_branch}
+ - if @merge_request.for_fork?
+ - source_remote = @merge_request.source_project.namespace.nil? ? "source" :@merge_request.source_project.namespace.path
+ - target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path
+ %p
+ %strong Step 1.
+ Checkout target branch and get recent objects from GitLab
+ Assuming remote for #{@merge_request.target_project.path_with_namespace} is called #{target_remote}
+ remote for #{@merge_request.source_project.path_with_namespace} is called #{source_remote}
+ %pre.dark
+ :preserve
+ git checkout #{target_remote} #{@merge_request.target_branch}
+ git fetch #{source_remote}
+ %p
+ %strong Step 2.
+ Merge source branch into target branch and push changes to GitLab
+ %pre.dark
+ :preserve
+ git merge #{source_remote}/#{@merge_request.source_branch}
+ git push #{target_remote} #{@merge_request.target_branch}
+ - else
+ %p
+ %strong Step 1.
+ Checkout target branch and get recent objects from GitLab
+ %pre.dark
+ :preserve
+ git checkout #{@merge_request.target_branch}
+ git fetch origin
+ %p
+ %strong Step 2.
+ Merge source branch into target branch and push changes to GitLab
+ %pre.dark
+ :preserve
+ git merge origin/#{@merge_request.source_branch}
+ git push origin #{@merge_request.target_branch}
+
+
+:javascript
+ $(function(){
+ var modal = $('#modal_merge_info').modal({modal: true, show:false});
+ $('.how_to_merge_link').bind("click", function(){
+ modal.show();
+ });
+ $('.modal-header .close').bind("click", function(){
+ modal.hide();
+ })
+ })
diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml
index 01378d99c99..47db8cdc8d2 100644
--- a/app/views/projects/merge_requests/show/_mr_accept.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml
@@ -15,7 +15,7 @@
for instructions
.accept_group
= f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
- - unless @project.root_ref? @merge_request.source_branch
+ - unless @merge_request.disallow_source_branch_removal?
.remove_branch_holder
= label_tag :should_remove_source_branch, class: "checkbox" do
= check_box_tag :should_remove_source_branch
diff --git a/app/views/projects/merge_requests/show/_mr_title.html.haml b/app/views/projects/merge_requests/show/_mr_title.html.haml
index 5a07258f91c..2c31c2dbf31 100644
--- a/app/views/projects/merge_requests/show/_mr_title.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_title.html.haml
@@ -1,8 +1,10 @@
%h3.page-title
= "Merge Request ##{@merge_request.id}:"
&nbsp;
+ %span.label-project= @merge_request.source_project.path_with_namespace
%span.label-branch= @merge_request.source_branch
&rarr;
+ %span.label-project= @merge_request.target_project.path_with_namespace
%span.label-branch= @merge_request.target_branch
%span.pull-right
diff --git a/app/views/search/_result.html.haml b/app/views/search/_result.html.haml
index 4e56eea084e..064c683e3d7 100644
--- a/app/views/search/_result.html.haml
+++ b/app/views/search/_result.html.haml
@@ -22,11 +22,11 @@
- @merge_requests.each do |merge_request|
%li
merge request:
- = link_to [merge_request.project, merge_request] do
+ = link_to [merge_request.target_project, merge_request] do
%span ##{merge_request.id}
%strong.term
= truncate merge_request.title, length: 50
- %span.light (#{merge_request.project.name_with_namespace})
+ %span.light (#{merge_request.source_project.name_with_namespace}:#{merge_request.source_branch} &rarr; #{merge_request.target_project.name_with_namespace}:#{merge_request.target_branch})
- @issues.each do |issue|
%li
issue:
diff --git a/app/views/shared/_merge_requests.html.haml b/app/views/shared/_merge_requests.html.haml
index 935a7a7f7c0..5276f4bae31 100644
--- a/app/views/shared/_merge_requests.html.haml
+++ b/app/views/shared/_merge_requests.html.haml
@@ -1,5 +1,5 @@
- if @merge_requests.any?
- - @merge_requests.group_by(&:project).each do |group|
+ - @merge_requests.group_by(&:target_project).each do |group|
.ui-box
- project = group[0]
.title