2019-06-04 09:38:18 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class TreeEntryPresenter < Gitlab::View::Presenter::Delegated
|
2021-09-21 05:12:21 -04:00
|
|
|
presents nil, as: :tree
|
2019-06-04 09:38:18 -04:00
|
|
|
|
|
|
|
def web_url
|
|
|
|
Gitlab::Routing.url_helpers.project_tree_url(tree.repository.project, File.join(tree.commit_id, tree.path))
|
|
|
|
end
|
2020-07-23 11:09:28 -04:00
|
|
|
|
|
|
|
def web_path
|
|
|
|
Gitlab::Routing.url_helpers.project_tree_path(tree.repository.project, File.join(tree.commit_id, tree.path))
|
|
|
|
end
|
2019-06-04 09:38:18 -04:00
|
|
|
end
|