Module: EffectiveMentorshipsHelper

Defined in:
app/helpers/effective_mentorships_helper.rb

Instance Method Summary collapse

Instance Method Details

#mentorship_categories_collectionObject



59
60
61
# File 'app/helpers/effective_mentorships_helper.rb', line 59

def mentorship_categories_collection
  EffectiveMentorships.MentorshipRegistration.mentorship_categories
end

#mentorship_cycle_labelObject



7
8
9
# File 'app/helpers/effective_mentorships_helper.rb', line 7

def mentorship_cycle_label
  et(Effective::MentorshipCycle)
end

#mentorship_cycles_labelObject



11
12
13
# File 'app/helpers/effective_mentorships_helper.rb', line 11

def mentorship_cycles_label
  ets(Effective::MentorshipCycle)
end

#mentorship_group_labelObject



23
24
25
# File 'app/helpers/effective_mentorships_helper.rb', line 23

def mentorship_group_label
  et(EffectiveMentorships.MentorshipGroup)
end

#mentorship_group_user_labelObject



31
32
33
# File 'app/helpers/effective_mentorships_helper.rb', line 31

def mentorship_group_user_label
  ets(Effective::MentorshipGroupUser)
end

#mentorship_group_users_labelObject



35
36
37
# File 'app/helpers/effective_mentorships_helper.rb', line 35

def mentorship_group_users_label
  ets(Effective::MentorshipGroupUser)
end

#mentorship_groups_labelObject



27
28
29
# File 'app/helpers/effective_mentorships_helper.rb', line 27

def mentorship_groups_label
  ets(EffectiveMentorships.MentorshipGroup)
end

#mentorship_registration_labelObject



15
16
17
# File 'app/helpers/effective_mentorships_helper.rb', line 15

def mentorship_registration_label
  et(EffectiveMentorships.MentorshipRegistration)
end

#mentorship_registrations_labelObject



19
20
21
# File 'app/helpers/effective_mentorships_helper.rb', line 19

def mentorship_registrations_label
  ets(EffectiveMentorships.MentorshipRegistration)
end

#mentorship_role_badge(mentorship_role) ⇒ Object



73
74
75
# File 'app/helpers/effective_mentorships_helper.rb', line 73

def mentorship_role_badge(mentorship_role)
  badge(mentorship_role_label(mentorship_role))
end

#mentorship_role_label(role) ⇒ Object



63
64
65
66
67
68
69
70
71
# File 'app/helpers/effective_mentorships_helper.rb', line 63

def mentorship_role_label(role)
  case role.to_s
  when 'mentor' then et('effective_mentorships.mentor')
  when 'mentee' then et('effective_mentorships.mentee')
  when '' then ''
  else
    raise("unexpected mentorship role: #{role}")
  end
end

#mentorship_roles_collectionObject



55
56
57
# File 'app/helpers/effective_mentorships_helper.rb', line 55

def mentorship_roles_collection
  EffectiveMentorships.MentorshipRegistration.mentorship_roles.map { |role| [mentorship_role_label(role), role] }
end

#mentorships_mentee_labelObject



39
40
41
# File 'app/helpers/effective_mentorships_helper.rb', line 39

def mentorships_mentee_label
  et('effective_mentorships.mentee')
end

#mentorships_mentees_labelObject



43
44
45
# File 'app/helpers/effective_mentorships_helper.rb', line 43

def mentorships_mentees_label
  ets('effective_mentorships.mentee')
end

#mentorships_mentor_labelObject



47
48
49
# File 'app/helpers/effective_mentorships_helper.rb', line 47

def mentorships_mentor_label
  et('effective_mentorships.mentor')
end

#mentorships_mentors_labelObject



51
52
53
# File 'app/helpers/effective_mentorships_helper.rb', line 51

def mentorships_mentors_label
  ets('effective_mentorships.mentor')
end

#mentorships_name_labelObject



3
4
5
# File 'app/helpers/effective_mentorships_helper.rb', line 3

def mentorships_name_label
  et('effective_mentorships.name')
end