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:
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r--app/helpers/issuables_helper.rb25
1 files changed, 7 insertions, 18 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index da142cbed0e..a5f64837c02 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -215,24 +215,12 @@ module IssuablesHelper
state_title = titles[state] || state.to_s.humanize
html = content_tag(:span, state_title)
- if display_count
- count = issuables_count_for_state(issuable_type, state)
- tag =
- if count == -1
- tooltip = _("Couldn't calculate number of %{issuables}.") % { issuables: issuable_type.to_s.humanize(capitalize: false) }
-
- content_tag(
- :span,
- '?',
- class: 'badge badge-pill has-tooltip',
- aria: { label: tooltip },
- title: tooltip
- )
- else
- content_tag(:span, number_with_delimiter(count), class: 'badge badge-pill')
- end
-
- html << " " << tag
+ return html.html_safe unless display_count
+
+ count = issuables_count_for_state(issuable_type, state)
+
+ if count != -1
+ html << " " << content_tag(:span, number_with_delimiter(count), class: 'badge badge-pill')
end
html.html_safe
@@ -346,6 +334,7 @@ module IssuablesHelper
def assignee_sidebar_data(assignee, merge_request: nil)
{ avatar_url: assignee.avatar_url, name: assignee.name, username: assignee.username }.tap do |data|
data[:can_merge] = merge_request.can_be_merged_by?(assignee) if merge_request
+ data[:availability] = assignee.status.availability if assignee.association(:status).loaded? && assignee.status&.availability
end
end