summaryrefslogtreecommitdiff
path: root/app/views/projects/buttons
diff options
context:
space:
mode:
authorJosh Frye <joshfng@mbp.local>2015-12-23 10:20:07 -0500
committerJosh Frye <joshfng@gmail.com>2016-01-03 18:12:27 -0500
commit8bfc46451eae5bd92380b9fbdf91b9636d55066c (patch)
treedd3f3348c97ab4c86f0d168f788decda00316a79 /app/views/projects/buttons
parentbfb3c8d936eaafc33b00f7a1fb7644e3330ffabf (diff)
downloadgitlab-ce-8bfc46451eae5bd92380b9fbdf91b9636d55066c.tar.gz
Show 'New Merge Request' buttons on canonical repo.
Diffstat (limited to 'app/views/projects/buttons')
-rw-r--r--app/views/projects/buttons/_dropdown.html.haml7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/projects/buttons/_dropdown.html.haml b/app/views/projects/buttons/_dropdown.html.haml
index 1f639fecc30..459e6da2fe2 100644
--- a/app/views/projects/buttons/_dropdown.html.haml
+++ b/app/views/projects/buttons/_dropdown.html.haml
@@ -8,11 +8,12 @@
= link_to url_for_new_issue(@project, only_path: true) do
= icon('exclamation-circle fw')
New issue
- - if can?(current_user, :create_merge_request, @project)
+ - merge_project = can?(current_user, :create_merge_request, @project) ? @project : current_user.fork_of(@project)
+ - if merge_project
%li
- = link_to new_namespace_project_merge_request_path(@project.namespace, @project) do
+ = link_to new_namespace_project_merge_request_path(merge_project.namespace, merge_project) do
= icon('tasks fw')
- New merge request
+ New Merge Request
- if can?(current_user, :create_snippet, @project)
%li
= link_to new_namespace_project_snippet_path(@project.namespace, @project) do