diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2019-03-25 11:20:49 +0300 |
---|---|---|
committer | Patrick Bajao <ebajao@gitlab.com> | 2019-04-02 17:07:16 +0300 |
commit | 6766a0a144bd07441b4593d25235924a14df0a91 (patch) | |
tree | 73deba69622e52ae41427cc56e6cd8e448e25612 /app/helpers/projects_helper.rb | |
parent | e028276d34571cd5128021ab5daf3088eb538be2 (diff) |
Download a folder from repository
Add `GetArchiveRequest` to git-archive params.
Modifies `Git::Repository#archive_metadata` to append `path`
to `ArchivePrefix` so it'll not hit the cache of repository archive
when it already exists.
Diffstat (limited to 'app/helpers/projects_helper.rb')
-rw-r--r-- | app/helpers/projects_helper.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index f5cae40aa86..009dd70c2c9 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -26,14 +26,6 @@ module ProjectsHelper image_tag(src, width: opts[:size], class: classes, alt: '', "data-src" => avatar) end - - def is_directory - @path.empty? ? false : true - end - - def get_directory_path - @path ? "#{@path}/" : '' - end def author_content_tag(author, opts = {}) default_opts = { author_class: 'author', tooltip: false, by_username: false } @@ -307,6 +299,10 @@ module ProjectsHelper }.to_json end + def directory? + @path.present? + end + private def get_project_nav_tabs(project, current_user) |