show.html.slim 7.07 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?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
41
42
43
44
45
46
  h3= t('checklist')
  .table-responsive
    table.table.table-no-border-top
      tbody
        tr
          td= t_attr(:trial_period)
47
          td= t(@volunteer.trial_period)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
48
49
        tr
          td= t_attr(:intro_course)
50
          td= t(@volunteer.intro_course)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
51
52
        tr
          td= t_attr(:doc_sent)
53
          td= t(@volunteer.doc_sent)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
54
55
        tr
          td= t_attr(:bank_account)
56
          td= t(@volunteer.bank_account)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
57
58
        tr
          td= t_attr(:evaluation)
59
          td= t(@volunteer.evaluation)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
60

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

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
82
83
84
85
86
      = render 'language_skills/show', speaker: @volunteer

      tr
        td= t_attr(:profession)
        td= @volunteer.profession
87
88
89
      tr
        td= t_attr(:own_kids)
        td= @volunteer.own_kids
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
90
91
92
93
94
95
96
97
      tr
        td= t_attr(:education)
        td= @volunteer.education
      tr
        td= t_attr(:motivation)
        td= @volunteer.motivation
      tr
        td= t_attr(:experience)
98
99
        td
          dl.dl-horizontal
100
            dt= t(@volunteer.experience)
101
            dd= @volunteer.volunteer_experience_desc if @volunteer.volunteer_experience_desc?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
102
103
104
105
106
107
108
109
110
      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
111
112
113
114
115
116
117
118
      - if @volunteer.internal?
        tr
          td= t_attr(:bank_details)
          td= @volunteer.full_bank_details
        tr
          td= t_attr(:waive)
          td= t(@volunteer.waive)

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

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

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

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

167
168
169
170
      - if @volunteer.other_offer_desc?
        tr
          td= t_attr(:other_offer_desc)
          td= @volunteer.other_offer_desc
171

172
h3= t('.availability')
173
= render 'availability/show', available: @volunteer
174

175
176
- if @volunteer.assignments.unterminated.any?
  h3#assignments Aktuelle Begleitungen
177
  = render 'assignments/client_volunteer_index', assignments: @volunteer.assignments.unterminated
178

179
- if @volunteer.assignment_logs.any?
180
  h3 Archivierte Begleitungen
181
182
  = render 'assignment_logs/assignment_logs_volunteer_index', assignment_logs: @volunteer.assignment_logs

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

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

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