summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2017-10-13 19:11:11 +0200
committerBrett Walker <bwalker@gitlab.com>2017-10-13 19:11:11 +0200
commitcbdf372eb8e6d38c4f47a1c2f6bff76b4b2c659f (patch)
tree1b3ca36c65831ba4662374b289751bbeb24c460d /app/views/projects
parent528f9cde0588b0a6e70b1fa971a99eca439d0aa6 (diff)
downloadgitlab-ce-cbdf372eb8e6d38c4f47a1c2f6bff76b4b2c659f.tar.gz
implemented using an ivar, and added specs
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/commit/branches.html.haml10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/views/projects/commit/branches.html.haml b/app/views/projects/commit/branches.html.haml
index 398927fb50d..933cb2f73ce 100644
--- a/app/views/projects/commit/branches.html.haml
+++ b/app/views/projects/commit/branches.html.haml
@@ -1,19 +1,19 @@
-- if @branches.any?
- - branch = commit_default_branch(@project, @branches)
- - if branch == :limit_exceeded
+- if @branches.any? || @branches_limit_exceeded
+ - if @branches_limit_exceeded
= commit_branch_link('#', _('Too many branches to search'))
- else
+ - branch = commit_default_branch(@project, @branches)
= commit_branch_link(project_ref_path(@project, branch), branch)
-# `commit_default_branch` deletes the default branch from `@branches`,
-# so only render this if we have more branches or tags left
-- if @branches.any? || @tags.any?
+- if @branches.any? || @tags.any? || @tags_limit_exceeded
%span
= link_to "…", "#", class: "js-details-expand label label-gray"
%span.js-details-content.hide
= commit_branches_links(@project, @branches) if @branches.any?
- - if @tags.first == :limit_exceeded
+ - if @tags_limit_exceeded
= commit_tag_link('#', _('Too many tags to search'))
- elsif @tags.any?
= commit_tags_links(@project, @tags)