diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-30 15:06:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-30 15:06:34 +0300 |
commit | 228d752ff09362002cc904d28edee7d63cc3cef2 (patch) | |
tree | 63e7ff466c0b0794f67c87c34e874f8682fb5de0 /app/helpers | |
parent | b539ac1d619c0aafe5988ab8b125a8b43b14d87f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/tree_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index 1020c91b245..28adc7ccbdb 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -195,6 +195,17 @@ module TreeHelper full_name: project.name_with_namespace } end + + def directory_download_links(project, ref, archive_prefix) + formats = ['zip', 'tar.gz', 'tar.bz2', 'tar'] + + formats.map do |fmt| + { + text: fmt, + path: project_archive_path(project, id: tree_join(ref, archive_prefix), format: fmt) + } + end + end end TreeHelper.prepend_if_ee('::EE::TreeHelper') |