Module: CorporateVitaHelper

Defined in:
app/helpers/corporate_vita_helper.rb

Instance Method Summary collapse

Instance Method Details

#corporate_vita_for_user(user) ⇒ Object



2
3
4
5
6
# File 'app/helpers/corporate_vita_helper.rb', line 2

def corporate_vita_for_user( user )
  render partial: 'users/corporate_vita', locals: { 
    user: @user,
  } 
end

#status_group_membership_promoted_on_event(membership) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
# File 'app/helpers/corporate_vita_helper.rb', line 20

def status_group_membership_promoted_on_event( membership )
  event = membership.event
  best_in_place( membership,
                 :event_by_name,
                 url: status_group_membership_path(membership),
                 class: 'status_event_by_name',
                 # display_with does more harm than it's good for. We wait for angular!
#                   display_with: lambda do |v|
#                     link_to membership.event.name, membership.event, :class => 'status_event_label'
#                   end
                 )
end

#status_group_membership_valid_from_best_in_place(membership) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'app/helpers/corporate_vita_helper.rb', line 8

def status_group_membership_valid_from_best_in_place( membership )
  best_in_place( membership,
                 :valid_from_localized_date,  # type: :date,
                 url: user_group_membership_path( id: membership.id,
                                                   controller: :user_group_memberships,
                                                   action: :update,
                                                   format: :json
                                                   ),
                 :class => "status_group_date_of_joining"
                 )
end