show.html.slim 6.93 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
6
7
    - if policy(Volunteer).acceptance?
      li.button-acceptance = link_to t(".acceptance.#{@volunteer.acceptance}"), '#',
        class: "btn btn-acceptance-#{@volunteer.acceptance}"
8
    - if policy(Volunteer).can_manage?
9
      li= render 'journals/journal_block', journaled_for: @volunteer
10
11
      ul.list-inline
        - if @volunteer.seeking_clients?
12
          li= button_link t_title(:new, Assignment), new_assignment_path(volunteer_id: @volunteer)
13
        - if @volunteer.internal_and_started_assignments?
14
15
16
          li
            = simple_form_for [@volunteer, BillingExpense.new] do |f|
              = f.hidden_field :volunteer_id, value: @volunteer.id
17
              = f.button :submit
18
          - if @volunteer.billing_expenses.any?
19
            li= button_link t_title(:index, BillingExpense), volunteer_billing_expenses_path(@volunteer)
20
        - if @volunteer.internal_and_started_assignments?
21
22
23
24
25
          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
26
  ul.list-inline
27
    - if @volunteer.internal_and_started_assignments?
28
29
      li = button_link t('.report_hours'), new_volunteer_hour_url(@volunteer)
      li = button_link t('.hour_reports'), volunteer_hours_path(@volunteer)
30
    li= button_link current_user.volunteer? ? t('edit_profile') : t_title(:edit), edit_volunteer_path(@volunteer)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
31
    li= form_navigation_btn :back, with_row: false unless current_user.volunteer?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
32

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

54
h3 Persönlicher Hintergrund
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
55
56
57
.table-responsive
  table.table.table-no-border-top
    tbody
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
58
59
60
      tr
        td= t_attr(:salutation)
        td= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
61
62
      = render 'contacts/show', contact: @volunteer.contact
      tr
63
        td= t_attr(:birth_year)
64
        td= @volunteer.birth_year.try(:year)
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
65
66
67
68
69
      tr
        td= t_attr(:avatar)
        td= image_tag @volunteer.avatar.url(:thumb) if @volunteer.avatar.present?
      tr
        td= t_attr(:nationality)
70
        td= nationality_name(@volunteer.nationality)
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
71
72
      tr
        td= t_attr(:additional_nationality)
73
        td= nationality_name(@volunteer.additional_nationality)
74

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
75
76
77
78
79
      = render 'language_skills/show', speaker: @volunteer

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

127
      tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
128
129
        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
130
      tr
Tugce Nur Tas's avatar
Tugce Nur Tas committed
131
        td= t_attr(:registered_by)
Tugce Nur Tas's avatar
Tugce Nur Tas committed
132
        td
Tugce Nur Tas's avatar
Tugce Nur Tas committed
133
          - if @volunteer.self_applicant?
Tugce Nur Tas's avatar
Tugce Nur Tas committed
134
            = t('volunteer_self_applicant')
Tugce Nur Tas's avatar
Tugce Nur Tas committed
135
          - else
Tugce Nur Tas's avatar
Tugce Nur Tas committed
136
            = link_to @volunteer.registrar.full_name, profile_link(@volunteer.registrar)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
137

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

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

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

175
176
177
178
      - if @volunteer.other_offer_desc?
        tr
          td= t_attr(:other_offer_desc)
          td= @volunteer.other_offer_desc
179

180
h3= t('.availability')
181
= render 'availability/show', available: @volunteer
182

183
- if @volunteer.assignments.any?
184
  h3#assignments Begleitungen
185
  = render 'assignments/client_volunteer_index', assignments: @volunteer.assignments
186

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

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

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