diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /app/helpers/packages_helper.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'app/helpers/packages_helper.rb')
-rw-r--r-- | app/helpers/packages_helper.rb | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/app/helpers/packages_helper.rb b/app/helpers/packages_helper.rb index 66f80e7eeb8..402a363349f 100644 --- a/app/helpers/packages_helper.rb +++ b/app/helpers/packages_helper.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true module PackagesHelper + include ::API::Helpers::RelatedResourcesHelpers + def package_sort_path(options = {}) "#{request.path}?#{options.to_param}" end @@ -53,30 +55,4 @@ module PackagesHelper project.container_expiration_policy.nil? && project.container_repositories.exists? end - - def package_details_data(project, package) - { - package_id: package.id, - can_delete: can?(current_user, :destroy_package, project).to_s, - svg_path: image_path('illustrations/no-packages.svg'), - npm_path: package_registry_instance_url(:npm), - npm_project_path: package_registry_project_url(project.id, :npm), - npm_help_path: help_page_path('user/packages/npm_registry/index'), - maven_path: package_registry_project_url(project.id, :maven), - maven_help_path: help_page_path('user/packages/maven_repository/index'), - conan_path: package_registry_project_url(project.id, :conan), - conan_help_path: help_page_path('user/packages/conan_repository/index'), - nuget_path: nuget_package_registry_url(project.id), - nuget_help_path: help_page_path('user/packages/nuget_repository/index'), - pypi_path: pypi_registry_url(project.id), - pypi_setup_path: package_registry_project_url(project.id, :pypi), - pypi_help_path: help_page_path('user/packages/pypi_repository/index'), - composer_path: composer_registry_url(project&.group&.id), - composer_help_path: help_page_path('user/packages/composer_repository/index'), - project_name: project.name, - project_list_url: project_packages_path(project), - group_list_url: project.group ? group_packages_path(project.group) : '', - composer_config_repository_name: composer_config_repository_name(project.group&.id) - } - end end |