2018-11-27 15:10:40 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class IssuePresenter < Gitlab::View::Presenter::Delegated
|
|
|
|
presents :issue
|
|
|
|
|
2019-05-31 16:46:16 +00:00
|
|
|
def issue_path
|
2020-04-06 18:09:37 +00:00
|
|
|
url_builder.build(issue, only_path: true)
|
2019-05-31 16:46:16 +00:00
|
|
|
end
|
|
|
|
|
2019-10-02 00:06:26 +00:00
|
|
|
def subscribed?
|
|
|
|
issue.subscribed?(current_user, issue.project)
|
|
|
|
end
|
2020-11-09 03:09:03 +00:00
|
|
|
|
|
|
|
def project_emails_disabled?
|
|
|
|
issue.project.emails_disabled?
|
|
|
|
end
|
2018-11-27 15:10:40 +00:00
|
|
|
end
|
2020-10-13 21:09:27 +00:00
|
|
|
|
|
|
|
IssuePresenter.prepend_if_ee('EE::IssuePresenter')
|