diff options
author | Kushal Pandya <kushalspandya@gmail.com> | 2019-01-11 11:42:29 +0300 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-01-11 11:42:29 +0300 |
commit | 437e9e4f8506648f0918185418037612edaf1341 (patch) | |
tree | 02c43f983d4e7db77cb06636d03b6884f4a510d7 /app/presenters | |
parent | 6ac5c2d32d2358f8135e922df6b70cb77bb03ef9 (diff) | |
parent | f5cde3a781a63ebd5630b0eb1fee79fc9750d6be (diff) |
Merge branch '54167-rename-project-tags-to-project-topics' into 'master'
Resolve "Rename project tags to project topics"
Closes #54167
See merge request gitlab-org/gitlab-ce!24219
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/project_presenter.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb index 9bd64ea217e..ea1d941cf83 100644 --- a/app/presenters/project_presenter.rb +++ b/app/presenters/project_presenter.rb @@ -13,7 +13,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated presents :project AnchorData = Struct.new(:is_link, :label, :link, :class_modifier, :icon) - MAX_TAGS_TO_SHOW = 3 + MAX_TOPICS_TO_SHOW = 3 def statistic_icon(icon_name = 'plus-square-o') sprite_icon(icon_name, size: 16, css_class: 'icon append-right-4') @@ -310,20 +310,20 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated end end - def tags_to_show - project.tag_list.take(MAX_TAGS_TO_SHOW) # rubocop: disable CodeReuse/ActiveRecord + def topics_to_show + project.tag_list.take(MAX_TOPICS_TO_SHOW) # rubocop: disable CodeReuse/ActiveRecord end - def count_of_extra_tags_not_shown - if project.tag_list.count > MAX_TAGS_TO_SHOW - project.tag_list.count - MAX_TAGS_TO_SHOW + def count_of_extra_topics_not_shown + if project.tag_list.count > MAX_TOPICS_TO_SHOW + project.tag_list.count - MAX_TOPICS_TO_SHOW else 0 end end - def has_extra_tags? - count_of_extra_tags_not_shown > 0 + def has_extra_topics? + count_of_extra_topics_not_shown > 0 end private |