2018-11-27 10:10:40 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class IssuePresenter < Gitlab::View::Presenter::Delegated
|
2021-09-21 05:12:21 -04:00
|
|
|
presents ::Issue, as: :issue
|
2018-11-27 10:10:40 -05:00
|
|
|
|
2019-05-31 12:46:16 -04:00
|
|
|
def issue_path
|
2022-05-13 05:07:54 -04:00
|
|
|
web_path
|
2019-05-31 12:46:16 -04:00
|
|
|
end
|
|
|
|
|
2021-09-21 05:12:21 -04:00
|
|
|
delegator_override :subscribed?
|
2019-10-01 20:06:26 -04:00
|
|
|
def subscribed?
|
|
|
|
issue.subscribed?(current_user, issue.project)
|
|
|
|
end
|
2020-11-08 22:09:03 -05:00
|
|
|
|
|
|
|
def project_emails_disabled?
|
|
|
|
issue.project.emails_disabled?
|
|
|
|
end
|
2018-11-27 10:10:40 -05:00
|
|
|
end
|
2020-10-13 17:09:27 -04:00
|
|
|
|
2021-05-11 17:10:21 -04:00
|
|
|
IssuePresenter.prepend_mod_with('IssuePresenter')
|