diff options
author | Martin Wortschack <mwortschack@gitlab.com> | 2019-01-10 23:08:41 +0300 |
---|---|---|
committer | Martin Wortschack <mwortschack@gitlab.com> | 2019-01-10 23:09:00 +0300 |
commit | f5cde3a781a63ebd5630b0eb1fee79fc9750d6be (patch) | |
tree | 7edd5d67e34f602405f0f605edaa150700fea69e /app/presenters | |
parent | 4aaea7b3c7d52809824454c3977503485b849891 (diff) |
Rename tags to topics
- Rename CSS class
- Fix broken test
- Update project settings docs
- Update general project settings image
- Rename helper methods
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 |