summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/integrations_helper.rb21
-rw-r--r--app/helpers/projects_helper.rb1
-rw-r--r--app/helpers/timeboxes_helper.rb4
3 files changed, 3 insertions, 23 deletions
diff --git a/app/helpers/integrations_helper.rb b/app/helpers/integrations_helper.rb
index b960ed46ba9..471ca425f83 100644
--- a/app/helpers/integrations_helper.rb
+++ b/app/helpers/integrations_helper.rb
@@ -159,27 +159,6 @@ module IntegrationsHelper
!Gitlab.com?
end
- def jira_issue_breadcrumb_link(issue_reference)
- link_to '', { class: 'gl-display-flex gl-align-items-center gl-white-space-nowrap' } do
- icon = image_tag image_path('illustrations/logos/jira.svg'), width: 15, height: 15, class: 'gl-mr-2'
- [icon, html_escape(issue_reference)].join.html_safe
- end
- end
-
- def zentao_issue_breadcrumb_link(issue)
- link_to issue[:web_url], { target: '_blank', rel: 'noopener noreferrer', class: 'gl-display-flex gl-align-items-center gl-white-space-nowrap' } do
- icon = image_tag image_path('logos/zentao.svg'), width: 15, height: 15, class: 'gl-mr-2'
- [icon, html_escape(issue[:id])].join.html_safe
- end
- end
-
- def zentao_issues_show_data
- {
- issues_show_path: project_integrations_zentao_issue_path(@project, params[:id], format: :json),
- issues_list_path: project_integrations_zentao_issues_path(@project)
- }
- end
-
extend self
private
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 21c7a54670c..1e427efe9d3 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -298,6 +298,7 @@ module ProjectsHelper
setting.organization_slug.blank?
{
+ sentry_project_id: setting.sentry_project_id,
name: setting.project_name,
organization_name: setting.organization_name,
organization_slug: setting.organization_slug,
diff --git a/app/helpers/timeboxes_helper.rb b/app/helpers/timeboxes_helper.rb
index c81fbcbfd11..39993bbfb44 100644
--- a/app/helpers/timeboxes_helper.rb
+++ b/app/helpers/timeboxes_helper.rb
@@ -153,11 +153,11 @@ module TimeboxesHelper
n_("%{releases} release", "%{releases} releases", count) % { releases: count }
end
- def recent_releases_with_counts(milestone)
+ def recent_releases_with_counts(milestone, user)
total_count = milestone.releases.size
return [[], 0, 0] if total_count == 0
- recent_releases = milestone.releases.recent.to_a
+ recent_releases = milestone.releases.recent.filter { |release| Ability.allowed?(user, :read_release, release) }
more_count = total_count - recent_releases.size
[recent_releases, total_count, more_count]
end