show.html.slim 6.17 KB
Newer Older
1
2
3
4
.row
  .col-xs-12
    h1= @volunteer.contact.full_name

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

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

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

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

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

125
      tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
126
127
        td #{t_attr(:external)} / #{t_attr(:internal)}
        td= @volunteer.external? ? t_attr(:external) : t_attr(:internal)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
128

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

.table-responsive
  table.table.table-striped
    thead
      tr
        th= t_attr(:zurich)
    tbody
      tr
        td.text-center= boolean_glyph(@volunteer.zurich)
149
150
151
152
153
154

h3= t_attr(:group_accompaniment)
.table-responsive
  table.table.table-striped
    thead
      tr
155
        - Volunteer::GROUP_ACCOMPANIMENTS.each do |group|
156
157
158
159
          th.text-center
            = t_attr(group)
    tbody
      tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
160
161
162
        - @volunteer.slice(Volunteer::GROUP_ACCOMPANIMENTS).values.each do |value|
          td.text-center= boolean_glyph(value)

163
164
165
166
      - if @volunteer.other_offer_desc?
        tr
          td= t_attr(:other_offer_desc)
          td= @volunteer.other_offer_desc
167

168
h3= t('.availability')
169
= render 'availability/show', available: @volunteer
170

171
- if @volunteer.assignments.any?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
172
  h3#assignments= t('assignments')
173
  = render 'assignments/volunteer_index', assignments: @volunteer.assignments
174

Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
175
- if @volunteer.group_assignments.any?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
176
  h3#assignments= t('.group_assignments')
177
178
179
  = render 'group_assignments', group_assignments: @volunteer.group_assignments, editable: 'yes'

- if @volunteer.group_assignment_logs.any?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
180
  h3= t('.old_group_assignments')
181
  = render 'group_assignments', group_assignments: @volunteer.group_assignment_logs, editable: 'no'
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
182

183
184
nav.navbar.section-navigation
  ul.list-inline
185
    li= button_link current_user.volunteer? ? t('edit_profile') : t_title(:edit), edit_volunteer_path(@volunteer)
186
    li= form_navigation_btn :back, with_row: false