show.html.slim 4.96 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
9
10
11
12
13
14
15
16
17
18
nav.navbar.section-navigation
  ul.list-inline
    - if policy(Volunteer).supervisor?
      li = render 'journals/journal_block', journaled_for: @volunteer
    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)
  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
19

20

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

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

Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
63
64
65
66
67
      = render 'language_skills/show', speaker: @volunteer

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

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

152
153
h3= t('volunteer_availability')
= render 'availability/show', available: @volunteer
154

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

161
162
163
164
165
- if current_user.volunteer?
  = button_link t('edit_profile'), edit_volunteer_path(@volunteer)
- else
  = form_navigation_btn :edit
  = form_navigation_btn :back