show.html.slim 7.33 KB
Newer Older
1
h1= @volunteer.contact.full_name
2
3
4
5
6
- if @volunteer.rejected?
  - if @volunteer.rejection_type.present?
    h4= "#{t_attr(:rejection_type)}: #{t("rejection_type.#{@volunteer.rejection_type}")}"
  - if @volunteer.rejection_text.present?
    h4= "#{t_attr(:rejection_text)}: #{@volunteer.rejection_text}"
7

Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
8
nav.navbar.section-navigation
9
  ul.list-inline.pull-right
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
10
    - if policy(Volunteer).superadmin_privileges?
11
        li= button_link 'Journal', polymorphic_path([@volunteer, Journal]), 'primary'
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
12
  ul.list-inline
13
    - if policy(@volunteer).terminate?
14
15
      li.button-acceptance = link_to t(".acceptance.#{@volunteer.acceptance}"), '#',
        class: "btn btn-acceptance-#{@volunteer.acceptance}"
16
      li= link_to 'Beenden', terminate_volunteer_path(@volunteer), class: 'btn btn-default', method: :put unless @volunteer.resigned?
17
    - if policy(Volunteer).superadmin_privileges?
18
19
      ul.list-inline
        - if @volunteer.seeking_clients?
20
          li= button_link t_title(:new, Assignment), new_assignment_path(volunteer_id: @volunteer)
21
        - if @volunteer.internal_and_started_assignments?
22
23
24
          li
            = simple_form_for [@volunteer, BillingExpense.new] do |f|
              = f.hidden_field :volunteer_id, value: @volunteer.id
25
              = f.button :submit
26
          - if @volunteer.billing_expenses.any?
27
            li= button_link t_title(:index, BillingExpense), volunteer_billing_expenses_path(@volunteer)
28
29
30
31
32
          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
33
  ul.list-inline
34
    - if @volunteer.internal_and_started_assignments?
35
36
      li = button_link t('.report_hours'), new_volunteer_hour_url(@volunteer)
      li = button_link t('.hour_reports'), volunteer_hours_path(@volunteer)
37
    li= button_link current_user.volunteer? ? t('edit_profile') : t_title(:edit), edit_volunteer_path(@volunteer)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
38
    li= form_navigation_btn :back, with_row: false unless current_user.volunteer?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
39

Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
40
- if policy(Volunteer).superadmin_privileges?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
41
  - if @volunteer.import.present?
42
    = render 'import_account_invite', volunteer: @volunteer
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
43

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
44
45

  h2.small= t('checklist')
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
46
47
48
49
50
  .table-responsive
    table.table.table-no-border-top
      tbody
        tr
          td= t_attr(:trial_period)
51
          td= t(@volunteer.trial_period)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
52
53
        tr
          td= t_attr(:intro_course)
54
          td= t(@volunteer.intro_course)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
55
56
        tr
          td= t_attr(:doc_sent)
57
          td= t(@volunteer.doc_sent)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
58
59
        tr
          td= t_attr(:bank_account)
60
          td= t(@volunteer.bank_account)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
61
62
        tr
          td= t_attr(:evaluation)
63
          td= t(@volunteer.evaluation)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
64

65
h2.small Persönlicher Hintergrund
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
66
67
68
.table-responsive
  table.table.table-no-border-top
    tbody
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
69
70
71
      tr
        td= t_attr(:salutation)
        td= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
72
73
      = render 'contacts/show', contact: @volunteer.contact
      tr
74
        td= t_attr(:birth_year)
75
        td= @volunteer.birth_year.try(:year)
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
76
77
78
79
80
      tr
        td= t_attr(:avatar)
        td= image_tag @volunteer.avatar.url(:thumb) if @volunteer.avatar.present?
      tr
        td= t_attr(:nationality)
81
        td= nationality_name(@volunteer.nationality)
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
82
83
      tr
        td= t_attr(:additional_nationality)
84
        td= nationality_name(@volunteer.additional_nationality)
85

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
86
87
88
89
90
      = render 'language_skills/show', speaker: @volunteer

      tr
        td= t_attr(:profession)
        td= @volunteer.profession
91
92
93
      tr
        td= t_attr(:own_kids)
        td= @volunteer.own_kids
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
94
95
96
97
98
99
100
101
      tr
        td= t_attr(:education)
        td= @volunteer.education
      tr
        td= t_attr(:motivation)
        td= @volunteer.motivation
      tr
        td= t_attr(:experience)
102
103
        td
          dl.dl-horizontal
104
            dt= t(@volunteer.experience)
105
            dd= @volunteer.volunteer_experience_desc if @volunteer.volunteer_experience_desc?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
106
107
108
109
110
111
112
113
114
      tr
        td= t_attr(:expectations)
        td= @volunteer.expectations
      tr
        td= t_attr(:strengths)
        td= @volunteer.strengths
      tr
        td= t_attr(:interests)
        td= @volunteer.interests
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
115
116
117
118
119
120
121
122
      - if @volunteer.internal?
        tr
          td= t_attr(:bank_details)
          td= @volunteer.full_bank_details
        tr
          td= t_attr(:waive)
          td= t(@volunteer.waive)

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

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

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

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

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

176
h2.small= t('.availability')
177
= render 'availability/show', available: @volunteer
178

179
- if @volunteer.assignments.unterminated.any?
180
  h2.small#assignments Aktuelle Begleitungen
181
  = render 'assignments/client_volunteer_index', assignments: @volunteer.assignments.unterminated
182

183
- if @volunteer.assignment_logs.any?
184
  h2.small Archivierte Begleitungen
185
186
  = render 'assignment_logs/assignment_logs_volunteer_index', assignment_logs: @volunteer.assignment_logs

187
- if @volunteer.group_assignments.unterminated.any?
188
  h2.small#assignments= t('.group_assignments')
189
  = render 'group_assignments/volunteer_group_assignments', group_assignments: @volunteer.group_assignments.unterminated, editable: true
190
191

- if @volunteer.group_assignment_logs.any?
192
  h2.small= t('.old_group_assignments')
193
  = render 'group_assignments/volunteer_group_assignments_logs', group_assignment_logs: @volunteer.group_assignment_logs
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
194

195
- if policy(Event).show? && @volunteer.events.past.any?
196
197
  = render 'events/volunteer_events', events: @volunteer.events

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