show.html.slim 7.29 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(:bank_account)
57
          td= t(@volunteer.bank_account)
58
59
60
        tr
          td= t_attr(:doc_sent)
          td= t(@volunteer.doc_sent)
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
127
        td= t_attr(:created_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)
Tugce Nur Tas's avatar
Tugce Nur Tas committed
133
134
135
136
137
138
      tr
        td= t_attr(:comments)
        td= @volunteer.comments
      tr
        td= t_attr(:additional_comments)
        td= @volunteer.additional_comments
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
139

Markus Koller's avatar
Markus Koller committed
140
141
142
143
144
145
.row
  .col-xs-6
    = render 'volunteers/single_accompaniments', volunteer: @volunteer
  .col-xs-6
    h3= t_attr(:availability, Volunteer)
    = render 'availability/show', available: @volunteer
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
146

Markus Koller's avatar
Markus Koller committed
147
148
149
150
151
152
153
154
h3= t_attr(:group_accompaniment)
h4.label-list
  .row
    .col-xs-12
      - @volunteer.group_accompaniments_active_without_house_moving.each do |group|
        - if group[:value]
          span.label.label-success>
            => navigation_glyph(:yes)
155
            = t_attr(group[:title])
Markus Koller's avatar
Markus Koller committed
156
157
158
159
160
161
162
163
164
165
166
167
168
169
        - else
          span.label.label-danger>
            => navigation_glyph(:no)
            = t_attr(group[:title])
  .row
    .col-xs-12
      - @volunteer.group_accompaniments_house_moving.each do |group|
        - if group[:value]
          span.label.label-success>
            => navigation_glyph(:yes)
            = t_attr(group[:title])
        - else
          span.label.label-danger>
            => navigation_glyph(:no)
170
            = t_attr(group[:title])
171

Markus Koller's avatar
Markus Koller committed
172
173
174
175
176
177
178
179
.row
  .col-xs-12
    strong= t_attr(:other_offer_desc)
    ':
    - if @volunteer.other_offer_desc?
      = @volunteer.other_offer_desc
    - else
      em keine
180

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

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

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

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

Tugce Nur Tas's avatar
Tugce Nur Tas committed
197
198
- if policy(Event).show? && @volunteer_events.present?
  = render 'events/volunteer_events', events: @volunteer_events
199

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