diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-05-09 22:55:19 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-05-09 22:55:19 +0200 |
commit | 164d47448831f64c1bb3e193172a2e9fcbb84712 (patch) | |
tree | 801ed0df1ef22ef1f5e1ce3d36d1b69a517f042c /app/views/projects/branches | |
parent | 722e3935893e0493e5783f1a61034fe1481f8cb8 (diff) | |
download | gitlab-ce-164d47448831f64c1bb3e193172a2e9fcbb84712.tar.gz |
Add Merge Request button to branches page.
Diffstat (limited to 'app/views/projects/branches')
-rw-r--r-- | app/views/projects/branches/_branch.html.haml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 4e7415be4aa..43412624da6 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -10,16 +10,19 @@ %i.fa.fa-lock protected .pull-right - - if can?(current_user, :download_code, @project) - = render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'btn-grouped btn-group-xs' + - if create_mr_button?(@repository.root_ref, branch.name) + = link_to create_mr_path(@repository.root_ref, branch.name), class: 'btn btn-grouped btn-xs' do + = icon('plus') + Merge Request + - if branch.name != @repository.root_ref = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: branch.name), class: 'btn btn-grouped btn-xs', method: :post, title: "Compare" do - %i.fa.fa-files-o + = icon("exchange") Compare - if can_remove_branch?(@project, branch.name) = link_to namespace_project_branch_path(@project.namespace, @project, branch.name), class: 'btn btn-grouped btn-xs btn-remove remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do - %i.fa.fa-trash-o + = icon("trash-o") - if commit %ul.list-unstyled |