Class: Hyrax::TransfersPresenter
- Inherits:
-
Object
- Object
- Hyrax::TransfersPresenter
- Defined in:
- app/presenters/hyrax/transfers_presenter.rb
Instance Method Summary collapse
-
#initialize(current_user, view_context) ⇒ TransfersPresenter
constructor
A new instance of TransfersPresenter.
- #render_received_transfers ⇒ Object
- #render_sent_transfers ⇒ Object
Constructor Details
#initialize(current_user, view_context) ⇒ TransfersPresenter
Returns a new instance of TransfersPresenter.
3 4 5 6 |
# File 'app/presenters/hyrax/transfers_presenter.rb', line 3 def initialize(current_user, view_context) @current_user = current_user @view_context = view_context end |
Instance Method Details
#render_received_transfers ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/presenters/hyrax/transfers_presenter.rb', line 16 def render_received_transfers if incoming_proxy_deposits.present? render 'hyrax/transfers/received', incoming_proxy_deposits: incoming_proxy_deposits else t('hyrax.dashboard.no_transfer_requests') end end |
#render_sent_transfers ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/presenters/hyrax/transfers_presenter.rb', line 8 def render_sent_transfers if outgoing_proxy_deposits.present? render 'hyrax/transfers/sent', outgoing_proxy_deposits: outgoing_proxy_deposits else t('hyrax.dashboard.no_transfers') end end |