show.html.slim 6.27 KB
Newer Older
1
h1= @volunteer.contact.full_name
2

Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
3
4
nav.navbar.section-navigation
  ul.list-inline
5
    - if policy(Volunteer).can_manage?
6
      li= render 'journals/journal_block', journaled_for: @volunteer
7
8
      ul.list-inline
        - if @volunteer.seeking_clients?
9
          li= button_link t_title(:new, Assignment), new_assignment_path(volunteer_id: @volunteer)
10
        - if @volunteer.assignments.any?
11
12
13
          li
            = simple_form_for [@volunteer, BillingExpense.new] do |f|
              = f.hidden_field :volunteer_id, value: @volunteer.id
14
              = f.button :submit
15
          - if @volunteer.billing_expenses.any?
16
            li= button_link t_title(:index, BillingExpense), volunteer_billing_expenses_path(@volunteer)
17
        - if @volunteer.assignments?
18
19
20
21
22
          li= button_link t('.new_certificate'), new_volunteer_certificate_path(@volunteer)
          - if @volunteer.certificates.size == 1
            li= button_link t('.show_certificate'), volunteer_certificate_path(@volunteer, @volunteer.certificates.first)
          - elsif @volunteer.certificates.size > 1
            li= button_link t('.show_certificates'), volunteer_certificates_path(@volunteer)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
23
  ul.list-inline
24
    - if @volunteer.internal_and_started_assignments?
25
26
      li = button_link t('.report_hours'), new_volunteer_hour_url(@volunteer)
      li = button_link t('.hour_reports'), volunteer_hours_path(@volunteer)
27
    li= button_link current_user.volunteer? ? t('edit_profile') : t_title(:edit), edit_volunteer_path(@volunteer)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
28
    li= form_navigation_btn :back, with_row: false unless current_user.volunteer?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
29

30
- if policy(Volunteer).checklist?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
31
32
33
34
35
36
  h3= t('checklist')
  .table-responsive
    table.table.table-no-border-top
      tbody
        tr
          td= t_attr(:trial_period)
37
          td= t(@volunteer.trial_period)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
38
39
        tr
          td= t_attr(:intro_course)
40
          td= t(@volunteer.intro_course)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
41
42
        tr
          td= t_attr(:doc_sent)
43
          td= t(@volunteer.doc_sent)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
44
45
        tr
          td= t_attr(:bank_account)
46
          td= t(@volunteer.bank_account)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
47
48
        tr
          td= t_attr(:evaluation)
49
          td= t(@volunteer.evaluation)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
50
51

h3= t('personal_background')
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
52
53
54
55
56
.table-responsive
  table.table.table-no-border-top
    tbody
      = render 'contacts/show', contact: @volunteer.contact
      tr
57
58
        td= t_attr(:birth_year)
        td= l(@volunteer.birth_year) if @volunteer.birth_year
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
59
      tr
Tugce Nur Tas's avatar
Tugce Nur Tas committed
60
        td= t_attr(:salutation)
61
        td= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
62
63
64
65
66
      tr
        td= t_attr(:avatar)
        td= image_tag @volunteer.avatar.url(:thumb) if @volunteer.avatar.present?
      tr
        td= t_attr(:nationality)
67
        td= nationality_name(@volunteer.nationality)
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
68
69
      tr
        td= t_attr(:additional_nationality)
70
        td= nationality_name(@volunteer.additional_nationality)
71

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
72
73
74
75
76
      = render 'language_skills/show', speaker: @volunteer

      tr
        td= t_attr(:profession)
        td= @volunteer.profession
77
78
79
      tr
        td= t_attr(:own_kids)
        td= @volunteer.own_kids
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
80
81
82
83
84
85
86
87
      tr
        td= t_attr(:education)
        td= @volunteer.education
      tr
        td= t_attr(:motivation)
        td= @volunteer.motivation
      tr
        td= t_attr(:experience)
88
89
        td
          dl.dl-horizontal
90
            dt= t(@volunteer.experience)
91
            dd= @volunteer.volunteer_experience_desc if @volunteer.volunteer_experience_desc?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
92
93
94
95
96
97
98
99
100
      tr
        td= t_attr(:expectations)
        td= @volunteer.expectations
      tr
        td= t_attr(:strengths)
        td= @volunteer.strengths
      tr
        td= t_attr(:interests)
        td= @volunteer.interests
101
      - if policy(Volunteer).acceptance?
102
103
        tr
          td= t_attr(:acceptance)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
104
          td= t(".acceptance.#{@volunteer.acceptance}")
105
      - if policy(Volunteer).state?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
106
107
        tr
          td= t_attr(:state)
108
          td= t("state.#{@volunteer.state}")
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
109
        - if @volunteer.rejected?
110
          tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
111
112
            td= t_attr(:rejection_type)
            td= t("rejection_type.#{@volunteer.rejection_type}") if @volunteer.rejection_type.present?
113
          tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
114
115
            td= t_attr(:rejection_text)
            td= @volunteer.rejection_text
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
116
117
118
119
120
121
122
123
      - if @volunteer.internal?
        tr
          td= t_attr(:bank_details)
          td= @volunteer.full_bank_details
        tr
          td= t_attr(:waive)
          td= t(@volunteer.waive)

124
      tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
125
126
        td #{t_attr(:external)} / #{t_attr(:internal)}
        td= @volunteer.external? ? t_attr(:external) : t_attr(:internal)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
127

128
129
130
131
132
h3= t_attr(:single_accompaniment)
.table-responsive
  table.table.table-striped
    thead
      tr
133
        - Volunteer::SINGLE_ACCOMPANIMENTS.each do |single|
134
135
136
          th.text-center= t_attr(single)
    tbody
      tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
137
138
139
140
141
142
143
144
145
146
147
        - @volunteer.slice(Volunteer::SINGLE_ACCOMPANIMENTS).values.each do |value|
          td.text-center= boolean_glyph(value)

.table-responsive
  table.table.table-striped
    thead
      tr
        th= t_attr(:zurich)
    tbody
      tr
        td.text-center= boolean_glyph(@volunteer.zurich)
148
149
150
151
152
153

h3= t_attr(:group_accompaniment)
.table-responsive
  table.table.table-striped
    thead
      tr
154
        - Volunteer::GROUP_ACCOMPANIMENTS.each do |group|
155
156
157
158
          th.text-center
            = t_attr(group)
    tbody
      tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
159
160
161
        - @volunteer.slice(Volunteer::GROUP_ACCOMPANIMENTS).values.each do |value|
          td.text-center= boolean_glyph(value)

162
163
164
165
      - if @volunteer.other_offer_desc?
        tr
          td= t_attr(:other_offer_desc)
          td= @volunteer.other_offer_desc
166

167
h3= t('.availability')
168
= render 'availability/show', available: @volunteer
169

170
- if @volunteer.assignments.any?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
171
  h3#assignments= t('assignments')
172
  = render 'assignments/volunteer_index', assignments: @volunteer.assignments
173

Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
174
- if @volunteer.group_assignments.any?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
175
  h3#assignments= t('.group_assignments')
176
  = render 'group_assignments/volunteer_group_assignments', group_assignments: @volunteer.group_assignments, editable: true
177
178

- if @volunteer.group_assignment_logs.any?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
179
  h3= t('.old_group_assignments')
180
  = render 'group_assignments/volunteer_group_assignments', group_assignments: @volunteer.group_assignment_logs, editable: false
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
181

182
183
nav.navbar.section-navigation
  ul.list-inline
184
    li= button_link current_user.volunteer? ? t('edit_profile') : t_title(:edit), edit_volunteer_path(@volunteer)
185
186
    - if policy(Volunteer).index?
      li= form_navigation_btn :back, with_row: false