show.html.slim 6.75 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.internal_and_started_assignments?
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.internal_and_started_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 Persönlicher Hintergrund
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
52
53
54
.table-responsive
  table.table.table-no-border-top
    tbody
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
55
56
57
      tr
        td= t_attr(:salutation)
        td= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
58
59
      = render 'contacts/show', contact: @volunteer.contact
      tr
60
        td= t_attr(:birth_year)
61
        td= @volunteer.birth_year.try(:year)
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)
Tugce Nur Tas's avatar
Tugce Nur Tas committed
127
      tr
Tugce Nur Tas's avatar
Tugce Nur Tas committed
128
        td= t_attr(:registered_by)
Tugce Nur Tas's avatar
Tugce Nur Tas committed
129
        td
Tugce Nur Tas's avatar
Tugce Nur Tas committed
130
          - if @volunteer.self_applicant?
Tugce Nur Tas's avatar
Tugce Nur Tas committed
131
            = t('volunteer_self_applicant')
Tugce Nur Tas's avatar
Tugce Nur Tas committed
132
          - else
Tugce Nur Tas's avatar
Tugce Nur Tas committed
133
            = link_to @volunteer.registrar.full_name, profile_link(@volunteer.registrar)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
134

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

.table-responsive
  table.table.table-striped
    thead
      tr
151
152
153
        - @volunteer.group_accompaniments_house_moving.each do |group|
          th.text-center
            = t_attr(group[:title])
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
154
155
    tbody
      tr
156
157
        - @volunteer.group_accompaniments_house_moving.each do |group|
          td.text-center= boolean_glyph(group[:value])
158
159
160
161
162
163

h3= t_attr(:group_accompaniment)
.table-responsive
  table.table.table-striped
    thead
      tr
164
        - @volunteer.group_accompaniments_active_without_house_moving.each do |group|
165
          th.text-center
166
            = t_attr(group[:title])
167
168
    tbody
      tr
169
        - @volunteer.group_accompaniments_active_without_house_moving.each do |group|
170
          td.text-center= boolean_glyph(group[:value])
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
171

172
173
174
175
      - if @volunteer.other_offer_desc?
        tr
          td= t_attr(:other_offer_desc)
          td= @volunteer.other_offer_desc
176

177
h3= t('.availability')
178
= render 'availability/show', available: @volunteer
179

180
- if @volunteer.assignments.any?
181
  h3#assignments Begleitungen
182
  = render 'assignments/client_volunteer_index', assignments: @volunteer.assignments
183

Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
184
- if @volunteer.group_assignments.any?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
185
  h3#assignments= t('.group_assignments')
186
  = render 'group_assignments/volunteer_group_assignments', group_assignments: @volunteer.group_assignments, editable: true
187
188

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

192
193
nav.navbar.section-navigation
  ul.list-inline
194
    li= button_link current_user.volunteer? ? t('edit_profile') : t_title(:edit), edit_volunteer_path(@volunteer)
195
196
    - if policy(Volunteer).index?
      li= form_navigation_btn :back, with_row: false