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

5
- if policy(Volunteer).seeking_clients? & @volunteer.seeking_clients?
6
7
8
  .row
    .col-xs-12
      = button_link t_title(:new, Assignment), new_assignment_path(volunteer_id: @volunteer)
9

10
11
- if policy(Volunteer).supervisor?
  = render 'journals/journal_block', journaled_for: @volunteer
12

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

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

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
55
56
57
58
59
      = render 'language_skills/show', speaker: @volunteer

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

101
102
103
104
105
h3= t_attr(:single_accompaniment)
.table-responsive
  table.table.table-striped
    thead
      tr
106
        - Volunteer::SINGLE_ACCOMPANIMENTS.each do |single|
107
108
109
          th.text-center= t_attr(single)
    tbody
      tr
110
        - Volunteer::SINGLE_ACCOMPANIMENTS.each do |single|
111
112
113
114
115
116
117
118
119
120
121
          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
122
        - Volunteer::GROUP_ACCOMPANIMENTS.each do |group|
123
124
125
126
          th.text-center
            = t_attr(group)
    tbody
      tr
127
        - Volunteer::GROUP_ACCOMPANIMENTS.each do |group|
128
129
130
131
132
          td.text-center
            - if @volunteer.read_attribute(group)
              i.glyphicon.glyphicon-ok.text-success
            - else
              i.glyphicon.glyphicon-remove.text-danger
133
134
135
136
      - if @volunteer.other_offer_desc?
        tr
          td= t_attr(:other_offer_desc)
          td= @volunteer.other_offer_desc
137

138
139
h3= t('volunteer_availability')
= render 'availability/show', available: @volunteer
140

141
142
- if @volunteer.assignments.any?
  .row
143
    .col-xs-12#assignments
144
      h3= t('assignments')
145
  = render 'assignments/volunteer_index', assignments: @volunteer.assignments
146

147
148
149
150
151
- if current_user.volunteer?
  = button_link t('edit_profile'), edit_volunteer_path(@volunteer)
- else
  = form_navigation_btn :edit
  = form_navigation_btn :back