show.html.slim 5.71 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
7
8
nav.navbar.section-navigation
  ul.list-inline
    - if policy(Volunteer).supervisor?
      li = render 'journals/journal_block', journaled_for: @volunteer
9
10
11
12
13
14
      ul.list-inline
        - if @volunteer.seeking_clients?
          li = button_link t_title(:new, Assignment), new_assignment_path(volunteer_id: @volunteer)
        - if @volunteer.assignments.any?
          li = button_link t_title(:new, BillingExpense), new_volunteer_billing_expense_path(@volunteer)
          li = button_link t_title(:index, BillingExpense), volunteer_billing_expenses_path(@volunteer)
15
        - if @volunteer.assignments?
16
17
18
19
20
          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
21
22
  ul.list-inline
    - if @volunteer.assignments.any?
23
24
25
26
27
28
29
      li = button_link t('.report_hours'), new_volunteer_hour_url(@volunteer)
      li = button_link t('.hour_reports'), volunteer_hours_path(@volunteer)
    - if current_user.volunteer?
      li= button_link t('edit_profile'), edit_volunteer_path(@volunteer)
    - else
      li= form_navigation_btn :edit, with_row: false
    li= form_navigation_btn :back, with_row: false
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
30

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

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

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

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

125
126
127
128
129
h3= t_attr(:single_accompaniment)
.table-responsive
  table.table.table-striped
    thead
      tr
130
        - Volunteer::SINGLE_ACCOMPANIMENTS.each do |single|
131
132
133
          th.text-center= t_attr(single)
    tbody
      tr
134
        - Volunteer::SINGLE_ACCOMPANIMENTS.each do |single|
135
136
137
138
139
140
141
142
143
144
145
          td.text-center
            - if @volunteer.read_attribute(single)
              i.glyphicon.glyphicon-ok.text-success
            - else
              i.glyphicon.glyphicon-remove.text-danger

h3= t_attr(:group_accompaniment)
.table-responsive
  table.table.table-striped
    thead
      tr
146
        - Volunteer::GROUP_ACCOMPANIMENTS.each do |group|
147
148
149
150
          th.text-center
            = t_attr(group)
    tbody
      tr
151
        - Volunteer::GROUP_ACCOMPANIMENTS.each do |group|
152
153
154
155
156
          td.text-center
            - if @volunteer.read_attribute(group)
              i.glyphicon.glyphicon-ok.text-success
            - else
              i.glyphicon.glyphicon-remove.text-danger
157
158
159
160
      - if @volunteer.other_offer_desc?
        tr
          td= t_attr(:other_offer_desc)
          td= @volunteer.other_offer_desc
161

162
h3= t('.availability')
163
= render 'availability/show', available: @volunteer
164

165
166
- if @volunteer.assignments.any?
  .row
167
    .col-xs-12#assignments
168
      h3= t('assignments')
169
  = render 'assignments/volunteer_index', assignments: @volunteer.assignments
170

171
172
173
174
175
176
177
nav.navbar.section-navigation
  ul.list-inline
    - if current_user.volunteer?
      li= button_link t('edit_profile'), edit_volunteer_path(@volunteer)
    - else
      li= form_navigation_btn :edit, with_row: false
    li= form_navigation_btn :back, with_row: false