diff options
author | Lin Jen-Shin (godfat) <godfat@godfat.org> | 2017-10-27 15:55:08 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-27 15:55:08 +0000 |
commit | 57d7ed05d96928f7e33135e7397bdd6b3b0d25e0 (patch) | |
tree | cc5f65076fc0acc1b5ff191d502a706e797544af /app/views/projects/branches/_branch.html.haml | |
parent | 7c4da276d34e008b5aa86971cfd627a813d84df7 (diff) | |
download | gitlab-ce-57d7ed05d96928f7e33135e7397bdd6b3b0d25e0.tar.gz |
Fetch the merged branches at once
Diffstat (limited to 'app/views/projects/branches/_branch.html.haml')
-rw-r--r-- | app/views/projects/branches/_branch.html.haml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 49101d1efa4..6e02ae6c9cc 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -1,3 +1,4 @@ +- merged = local_assigns.fetch(:merged, false) - commit = @repository.commit(branch.dereferenced_target) - bar_graph_width_factor = @max_commits > 0 ? 100.0/@max_commits : 0 - diverging_commit_counts = @repository.diverging_commit_counts(branch) @@ -12,7 +13,7 @@ - if branch.name == @repository.root_ref %span.label.label-primary default - - elsif @repository.merged_to_root_ref? branch.name + - elsif merged %span.label.label-info.has-tooltip{ title: s_('Branches|Merged into %{default_branch}') % { default_branch: @repository.root_ref } } = s_('Branches|merged') @@ -47,7 +48,7 @@ target: "#modal-delete-branch", delete_path: project_branch_path(@project, branch.name), branch_name: branch.name, - is_merged: ("true" if @repository.merged_to_root_ref?(branch.name)) } } + is_merged: ("true" if merged) } } = icon("trash-o") - else %button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip disabled", |