Class: Hyrax::TransfersPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/hyrax/transfers_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(current_user, view_context) ⇒ TransfersPresenter

Returns a new instance of TransfersPresenter.



4
5
6
7
# File 'app/presenters/hyrax/transfers_presenter.rb', line 4

def initialize(current_user, view_context)
  @current_user = current_user
  @view_context = view_context
end

Instance Method Details

#render_received_transfersObject



17
18
19
20
21
22
23
# File 'app/presenters/hyrax/transfers_presenter.rb', line 17

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_transfersObject



9
10
11
12
13
14
15
# File 'app/presenters/hyrax/transfers_presenter.rb', line 9

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