diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/helpers/issuables_helper.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r-- | app/helpers/issuables_helper.rb | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 2b21d8c51e6..fb407aa7eed 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -207,14 +207,10 @@ module IssuablesHelper def assigned_issuables_count(issuable_type) case issuable_type when :issues - if Feature.enabled?(:limit_assigned_issues_count) - ::Users::AssignedIssuesCountService.new( - current_user: current_user, - max_limit: User::MAX_LIMIT_FOR_ASSIGNEED_ISSUES_COUNT - ).count - else - current_user.assigned_open_issues_count - end + ::Users::AssignedIssuesCountService.new( + current_user: current_user, + max_limit: User::MAX_LIMIT_FOR_ASSIGNEED_ISSUES_COUNT + ).count when :merge_requests current_user.assigned_open_merge_requests_count else @@ -225,7 +221,7 @@ module IssuablesHelper def assigned_open_issues_count_text count = assigned_issuables_count(:issues) - if Feature.enabled?(:limit_assigned_issues_count) && count > User::MAX_LIMIT_FOR_ASSIGNEED_ISSUES_COUNT - 1 + if count > User::MAX_LIMIT_FOR_ASSIGNEED_ISSUES_COUNT - 1 "#{count - 1}+" else count.to_s @@ -372,6 +368,14 @@ module IssuablesHelper end end + def hidden_issuable_icon(issuable) + title = format(_('This %{issuable} is hidden because its author has been banned'), + issuable: issuable.is_a?(Issue) ? _('issue') : _('merge request')) + content_tag(:span, class: 'has-tooltip', title: title) do + sprite_icon('spam', css_class: 'gl-vertical-align-text-bottom') + end + end + private def sidebar_gutter_collapsed? |