show.html.slim 7.88 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  - if @volunteer.accepted? && @volunteer.import.present?
    - if @volunteer.user.present?
      h2.small Importiert
      p.text-warning Dieses Freiwilligenprofil wurde von Access importiert. Ein Useraccount wurde bereits erstellt.
    - if @volunteer.user.blank? && @volunteer.import.store['haupt_person']['email'].present?
      h2.small Import
      p.text-warning Dieses Freiwilligenprofil wurde von Access importiert.
      h3 User Account erstellen
      p
        'Für die Emailadresse
        = mail_to "#{@volunteer.import.store['haupt_person']['email']}", @volunteer.import.store['haupt_person']['email']
        = ' einen '
        = link_to "Account erstellen",
            account_volunteer_path(@volunteer), method: :put, class: 'btn btn-default btn-xs'

  h2.small= t('checklist')
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
57
58
59
60
61
  .table-responsive
    table.table.table-no-border-top
      tbody
        tr
          td= t_attr(:trial_period)
62
          td= t(@volunteer.trial_period)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
63
64
        tr
          td= t_attr(:intro_course)
65
          td= t(@volunteer.intro_course)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
66
67
        tr
          td= t_attr(:doc_sent)
68
          td= t(@volunteer.doc_sent)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
69
70
        tr
          td= t_attr(:bank_account)
71
          td= t(@volunteer.bank_account)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
72
73
        tr
          td= t_attr(:evaluation)
74
          td= t(@volunteer.evaluation)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
75

76
h2.small Persönlicher Hintergrund
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
77
78
79
.table-responsive
  table.table.table-no-border-top
    tbody
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
80
81
82
      tr
        td= t_attr(:salutation)
        td= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
83
84
      = render 'contacts/show', contact: @volunteer.contact
      tr
85
        td= t_attr(:birth_year)
86
        td= @volunteer.birth_year.try(:year)
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
87
88
89
90
91
      tr
        td= t_attr(:avatar)
        td= image_tag @volunteer.avatar.url(:thumb) if @volunteer.avatar.present?
      tr
        td= t_attr(:nationality)
92
        td= nationality_name(@volunteer.nationality)
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
93
94
      tr
        td= t_attr(:additional_nationality)
95
        td= nationality_name(@volunteer.additional_nationality)
96

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
97
98
99
100
101
      = render 'language_skills/show', speaker: @volunteer

      tr
        td= t_attr(:profession)
        td= @volunteer.profession
102
103
104
      tr
        td= t_attr(:own_kids)
        td= @volunteer.own_kids
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
105
106
107
108
109
110
111
112
      tr
        td= t_attr(:education)
        td= @volunteer.education
      tr
        td= t_attr(:motivation)
        td= @volunteer.motivation
      tr
        td= t_attr(:experience)
113
114
        td
          dl.dl-horizontal
115
            dt= t(@volunteer.experience)
116
            dd= @volunteer.volunteer_experience_desc if @volunteer.volunteer_experience_desc?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
117
118
119
120
121
122
123
124
125
      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
126
127
128
129
130
131
132
133
      - if @volunteer.internal?
        tr
          td= t_attr(:bank_details)
          td= @volunteer.full_bank_details
        tr
          td= t_attr(:waive)
          td= t(@volunteer.waive)

134
      tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
135
136
        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
137
      tr
Tugce Nur Tas's avatar
Tugce Nur Tas committed
138
        td= t_attr(:registered_by)
Tugce Nur Tas's avatar
Tugce Nur Tas committed
139
        td
Tugce Nur Tas's avatar
Tugce Nur Tas committed
140
          - if @volunteer.self_applicant?
Tugce Nur Tas's avatar
Tugce Nur Tas committed
141
            = t('volunteer_self_applicant')
Tugce Nur Tas's avatar
Tugce Nur Tas committed
142
          - else
Tugce Nur Tas's avatar
Tugce Nur Tas committed
143
            = link_to @volunteer.registrar.full_name, profile_link(@volunteer.registrar)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
144

145
h2.small= t_attr(:single_accompaniment)
146
147
148
149
.table-responsive
  table.table.table-striped
    thead
      tr
150
        - Volunteer::SINGLE_ACCOMPANIMENTS.each do |single|
151
152
153
          th.text-center= t_attr(single)
    tbody
      tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
154
155
156
157
158
159
160
        - @volunteer.slice(Volunteer::SINGLE_ACCOMPANIMENTS).values.each do |value|
          td.text-center= boolean_glyph(value)

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

169
h2.small= t_attr(:group_accompaniment)
170
171
172
173
.table-responsive
  table.table.table-striped
    thead
      tr
174
        - @volunteer.group_accompaniments_active_without_house_moving.each do |group|
175
          th.text-center
176
            = t_attr(group[:title])
177
178
    tbody
      tr
179
        - @volunteer.group_accompaniments_active_without_house_moving.each do |group|
180
          td.text-center= boolean_glyph(group[:value])
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
181

182
183
184
185
      - if @volunteer.other_offer_desc?
        tr
          td= t_attr(:other_offer_desc)
          td= @volunteer.other_offer_desc
186

187
h2.small= t('.availability')
188
= render 'availability/show', available: @volunteer
189

190
- if @volunteer.assignments.unterminated.any?
191
  h2.small#assignments Aktuelle Begleitungen
192
  = render 'assignments/client_volunteer_index', assignments: @volunteer.assignments.unterminated
193

194
- if @volunteer.assignment_logs.any?
195
  h2.small Archivierte Begleitungen
196
197
  = render 'assignment_logs/assignment_logs_volunteer_index', assignment_logs: @volunteer.assignment_logs

198
- if @volunteer.group_assignments.unterminated.any?
199
  h2.small#assignments= t('.group_assignments')
200
  = render 'group_assignments/volunteer_group_assignments', group_assignments: @volunteer.group_assignments.unterminated, editable: true
201
202

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

206
207
nav.navbar.section-navigation
  ul.list-inline
208
    li= button_link current_user.volunteer? ? t('edit_profile') : t_title(:edit), edit_volunteer_path(@volunteer)
209
210
    - if policy(Volunteer).index?
      li= form_navigation_btn :back, with_row: false