show.html.slim 5.6 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
      li = button_link t('.report_hours'), new_volunteer_hour_url(@volunteer)
      li = button_link t('.hour_reports'), volunteer_hours_path(@volunteer)
25
    li= button_link current_user.volunteer? ? t('edit_profile') : t_title(:edit), edit_volunteer_path(@volunteer)
26
    li= form_navigation_btn :back, with_row: false
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
27

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

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

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

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

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

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

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

168
169
nav.navbar.section-navigation
  ul.list-inline
170
    li= button_link current_user.volunteer? ? t('edit_profile') : t_title(:edit), edit_volunteer_path(@volunteer)
171
    li= form_navigation_btn :back, with_row: false