show.html.slim 5.42 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
16
17
18
19
20
          - if @volunteer.state == Volunteer::RESIGNED
            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
23
24
  ul.list-inline
    - if @volunteer.assignments.any?
      li = button_link t_title(:new, Hour), new_volunteer_hour_url(@volunteer)
      li = button_link t_title(:index, Hour), volunteer_hours_path(@volunteer)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
25

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

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

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
68
69
70
71
72
      = render 'language_skills/show', speaker: @volunteer

      tr
        td= t_attr(:profession)
        td= @volunteer.profession
73
74
75
      tr
        td= t_attr(:own_kids)
        td= @volunteer.own_kids
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
76
77
78
79
80
81
82
83
      tr
        td= t_attr(:education)
        td= @volunteer.education
      tr
        td= t_attr(:motivation)
        td= @volunteer.motivation
      tr
        td= t_attr(:experience)
84
85
        td
          dl.dl-horizontal
86
            dt= t(@volunteer.experience)
87
            dd= @volunteer.volunteer_experience_desc if @volunteer.volunteer_experience_desc?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
88
89
90
91
92
93
94
95
96
97
98
99
100
101
      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?
102
          tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
103
104
            td= t_attr(:rejection_type)
            td= t("rejection_type.#{@volunteer.rejection_type}") if @volunteer.rejection_type.present?
105
          tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
106
107
            td= t_attr(:rejection_text)
            td= @volunteer.rejection_text
108
109
110
111
      tr
        td= t_attr(:zurich)
        td
          dl.dl-horizontal
112
            dt= t(@volunteer.zurich)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
113
114
      tr
        td= t_attr(:bank_details)
115
        td= @volunteer.full_bank_details
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
116
117
118
      tr
        td= t_attr(:waive)
        td= t(@volunteer.waive)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
119

120
121
122
123
124
h3= t_attr(:single_accompaniment)
.table-responsive
  table.table.table-striped
    thead
      tr
125
        - Volunteer::SINGLE_ACCOMPANIMENTS.each do |single|
126
127
128
          th.text-center= t_attr(single)
    tbody
      tr
129
        - Volunteer::SINGLE_ACCOMPANIMENTS.each do |single|
130
131
132
133
134
135
136
137
138
139
140
          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
141
        - Volunteer::GROUP_ACCOMPANIMENTS.each do |group|
142
143
144
145
          th.text-center
            = t_attr(group)
    tbody
      tr
146
        - Volunteer::GROUP_ACCOMPANIMENTS.each do |group|
147
148
149
150
151
          td.text-center
            - if @volunteer.read_attribute(group)
              i.glyphicon.glyphicon-ok.text-success
            - else
              i.glyphicon.glyphicon-remove.text-danger
152
153
154
155
      - if @volunteer.other_offer_desc?
        tr
          td= t_attr(:other_offer_desc)
          td= @volunteer.other_offer_desc
156

157
h3= t('.availability')
158
= render 'availability/show', available: @volunteer
159

160
161
- if @volunteer.assignments.any?
  .row
162
    .col-xs-12#assignments
163
      h3= t('assignments')
164
  = render 'assignments/volunteer_index', assignments: @volunteer.assignments
165

166
167
168
169
170
- if current_user.volunteer?
  = button_link t('edit_profile'), edit_volunteer_path(@volunteer)
- else
  = form_navigation_btn :edit
  = form_navigation_btn :back