Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2017-11-02 02:09:48 +0300
committerMayra Cabrera <mcabrera@gitlab.com>2017-11-02 02:39:05 +0300
commit244bec9101ff754291e2c02d9844e0879ff5fa2f (patch)
tree8c550d6e2644fc41741b959d0ed9450fd2c31114 /app/helpers/commits_helper.rb
parent2bdad7964a2c626118b7f2c762c39f3e1908fc9d (diff)
Add UI/UX improvements
- Leave 'too many tags to search' always visible - Add different message to the branch/tags so it states its unavailable
Diffstat (limited to 'app/helpers/commits_helper.rb')
-rw-r--r--app/helpers/commits_helper.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 8aaf3318f90..2ba84e55fe0 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -60,7 +60,7 @@ module CommitsHelper
branches.include?(project.default_branch) ? branches.delete(project.default_branch) : branches.pop
end
- # returns a link formatted as a commit branch link
+ # Returns a link formatted as a commit branch link
def commit_branch_link(url, text)
link_to(url, class: 'label label-gray ref-name') do
icon('code-fork') + " #{text}"
@@ -74,13 +74,25 @@ module CommitsHelper
end.join(' ').html_safe
end
- # returns a link formatted as a commit tag link
+ # Returns a link formatted as a commit tag link
def commit_tag_link(url, text)
link_to(url, class: 'label label-gray ref-name') do
icon('tag') + " #{text}"
end
end
+ def branches_unavailable_message
+ link_to('#', class: 'label label-gray ref-name', title: 'Project has too many branches to search') do
+ icon('tag') + ' Branches unavailable'
+ end
+ end
+
+ def tags_unavailable_message
+ link_to('#', class: 'label label-gray ref-name', title: 'Project has too many tags to search') do
+ icon('tag') + ' Tags unavailable'
+ end
+ end
+
# Returns the sorted links to tags, separated by a comma
def commit_tags_links(project, tags)
sorted = VersionSorter.rsort(tags)