diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-01 21:43:51 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-10 10:32:25 -0200 |
commit | 1353cff5fed083fd7192dddff5062ac383b1f8a0 (patch) | |
tree | 290a06a1d034ea855e6fa398560a5ce250476eba /app/views/projects/commits/show.html.haml | |
parent | 10aa99a30c311c59358d1547ebcbe0f6a92227a7 (diff) | |
download | gitlab-ce-1353cff5fed083fd7192dddff5062ac383b1f8a0.tar.gz |
Replaces "Create merge request" link with one to the MR when one exists
Diffstat (limited to 'app/views/projects/commits/show.html.haml')
-rw-r--r-- | app/views/projects/commits/show.html.haml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index ede64d47ab3..89e091203a3 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -11,7 +11,10 @@ = render 'shared/ref_switcher', destination: 'commits' .block-controls.hidden-xs.hidden-sm - - if create_mr_button?(@repository.root_ref, @ref) + - if @merge_request.present? + .control + = link_to "View #{@merge_request.to_reference}", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn btn-success' + - elsif create_mr_button?(@repository.root_ref, @ref) .control = link_to create_mr_path(@repository.root_ref, @ref), class: 'btn btn-success' do = icon('plus') |