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

5
6
7
8
9
10
.row
  - if policy(Volunteer).supervisor?
    .col-xs-12.col-md-3
      = render 'journals/journal_block', journaled_for: @volunteer
  - if policy(Volunteer).seeking_clients? & @volunteer.seeking_clients?
    .col-xs-12.col-md-3
11
      = button_link t_title(:new, Assignment), new_assignment_path(volunteer_id: @volunteer)
12
13
14
15
16
  - if @volunteer.assignments.any?
    .col-xs-12.col-md-3
      = button_link t_title(:new, Hour), new_hour_url(volunteer_id: @volunteer)
    .col-xs-12.col-md-3
      = button_link t_title(:index, Hour), volunteer_hours_volunteer_path(@volunteer)
17

Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
18
19
20
21
22
23
24
- if policy(Volunteer).checklist?
  h3= t('checklist')
  .table-responsive
    table.table.table-no-border-top
      tbody
        tr
          td= t_attr(:trial_period)
25
          td= t(@volunteer.trial_period)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
26
27
        tr
          td= t_attr(:intro_course)
28
          td= t(@volunteer.intro_course)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
29
30
        tr
          td= t_attr(:doc_sent)
31
          td= t(@volunteer.doc_sent)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
32
33
        tr
          td= t_attr(:bank_account)
34
          td= t(@volunteer.bank_account)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
35
36
        tr
          td= t_attr(:evaluation)
37
          td= t(@volunteer.evaluation)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
38
39

h3= t('personal_background')
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
40
41
42
43
44
.table-responsive
  table.table.table-no-border-top
    tbody
      = render 'contacts/show', contact: @volunteer.contact
      tr
45
46
        td= t_attr(:birth_year)
        td= l(@volunteer.birth_year) if @volunteer.birth_year
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
47
      tr
Tugce Nur Tas's avatar
Tugce Nur Tas committed
48
        td= t_attr(:salutation)
49
        td= t("salutation.#{@volunteer.salutation}") if @volunteer.salutation?
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
50
51
52
53
54
      tr
        td= t_attr(:avatar)
        td= image_tag @volunteer.avatar.url(:thumb) if @volunteer.avatar.present?
      tr
        td= t_attr(:nationality)
55
        td= nationality_name(@volunteer.nationality)
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
56
57
      tr
        td= t_attr(:additional_nationality)
58
        td= nationality_name(@volunteer.additional_nationality)
59

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
60
61
62
63
64
      = render 'language_skills/show', speaker: @volunteer

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

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

149
150
h3= t('volunteer_availability')
= render 'availability/show', available: @volunteer
151

152
153
- if @volunteer.assignments.any?
  .row
154
    .col-xs-12#assignments
155
      h3= t('assignments')
156
  = render 'assignments/volunteer_index', assignments: @volunteer.assignments
157

158
159
160
161
162
- if current_user.volunteer?
  = button_link t('edit_profile'), edit_volunteer_path(@volunteer)
- else
  = form_navigation_btn :edit
  = form_navigation_btn :back