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

5
6
.row
  - if policy(Volunteer).supervisor?
7
    .col-xs-12
8
      = render 'journals/journal_block', journaled_for: @volunteer
9
.row
10
  - if policy(Volunteer).seeking_clients? & @volunteer.seeking_clients?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
11
    .col-xs-12
12
      = button_link t_title(:new, Assignment), new_assignment_path(volunteer_id: @volunteer)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
13
.row
14
  - if @volunteer.assignments.any?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
15
16
    .col-xs-12.col-md-3
      = button_link t_title(:new, Hour), new_volunteer_hour_url(@volunteer)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
17
    .col-xs-12.col-md-3
18
      = button_link t_title(:index, Hour), volunteer_hours_path(@volunteer)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
19
    .col-xs-12.col-md-3
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
20
21
22
      = button_link t_title(:new, BillingExpense), new_volunteer_billing_expense_path(@volunteer)
    .col-xs-12.col-md-3
      = button_link t_title(:index, BillingExpense), volunteer_billing_expenses_path(@volunteer)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
23

24

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

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

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

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

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

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

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

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