2018-11-27 10:10:40 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class IssuePresenter < Gitlab::View::Presenter::Delegated
|
|
|
|
presents :issue
|
|
|
|
|
|
|
|
def web_url
|
2019-05-31 12:46:16 -04:00
|
|
|
url_builder.url
|
|
|
|
end
|
|
|
|
|
|
|
|
def issue_path
|
|
|
|
url_builder.issue_path(issue)
|
|
|
|
end
|
|
|
|
|
2019-10-01 20:06:26 -04:00
|
|
|
def subscribed?
|
|
|
|
issue.subscribed?(current_user, issue.project)
|
|
|
|
end
|
|
|
|
|
2019-05-31 12:46:16 -04:00
|
|
|
private
|
|
|
|
|
|
|
|
def url_builder
|
|
|
|
@url_builder ||= Gitlab::UrlBuilder.new(issue)
|
2018-11-27 10:10:40 -05:00
|
|
|
end
|
|
|
|
end
|