Class: WorkItemPresenter
- Inherits:
-
IssuePresenter
- Object
- SimpleDelegator
- Gitlab::View::Presenter::Delegated
- IssuePresenter
- WorkItemPresenter
- Extended by:
- Gitlab::Utils::Override
- Defined in:
- app/presenters/work_item_presenter.rb
Overview
rubocop:todo Gitlab/NamespacedClass -- WorkItem is not namespaced
Instance Method Summary collapse
- #duplicated_to_work_item_url ⇒ Object
- #moved_to_work_item_url ⇒ Object
- #web_path ⇒ Object
- #web_url ⇒ Object
Methods included from Gitlab::Utils::Override
extended, extensions, included, method_added, override, prepended, queue_verification, verify!
Methods inherited from IssuePresenter
#issue_email_participants, #issue_path, #parent_emails_disabled?, #parent_emails_enabled?, #service_desk_reply_to, #subscribed?
Methods inherited from Gitlab::View::Presenter::Delegated
Methods included from Gitlab::Utils::DelegatorOverride
#delegator_override, #delegator_override_with, #delegator_target, validator, validators, verify!
Methods included from Gitlab::View::Presenter::Base
#__subject__, #can?, #declarative_policy_delegate, #is_a?, #path_with_line_numbers, #present, #url_builder
Methods included from Gitlab::Allowable
Methods included from Gitlab::Routing
includes_helpers, redirect_legacy_paths, url_helpers
Constructor Details
This class inherits a constructor from Gitlab::View::Presenter::Delegated
Instance Method Details
#duplicated_to_work_item_url ⇒ Object
22 23 24 25 26 27 |
# File 'app/presenters/work_item_presenter.rb', line 22 def duplicated_to_work_item_url return unless work_item.duplicated? return unless allowed_to_read_work_item?(work_item.duplicated_to) Gitlab::UrlBuilder.build(work_item.duplicated_to) end |
#moved_to_work_item_url ⇒ Object
29 30 31 32 33 34 |
# File 'app/presenters/work_item_presenter.rb', line 29 def moved_to_work_item_url return unless work_item.moved? return unless allowed_to_read_work_item?(work_item.moved_to) Gitlab::UrlBuilder.build(work_item.moved_to) end |
#web_path ⇒ Object
16 17 18 19 20 |
# File 'app/presenters/work_item_presenter.rb', line 16 def web_path return super unless should_use_work_item_path? work_item_url_helper(only_path: true) end |
#web_url ⇒ Object
9 10 11 12 13 |
# File 'app/presenters/work_item_presenter.rb', line 9 def web_url return super unless should_use_work_item_path? work_item_url_helper(only_path: false) end |