show.html.slim 3.71 KB
Newer Older
1
h1= @volunteer.full_name
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
2

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.table-responsive
  table.table.table-no-border-top
    tbody
      tr
        td= t_attr(:date_of_birth)
        td= l(@volunteer.date_of_birth) if @volunteer.date_of_birth.present?
      tr
        td= t_attr(:gender)
        td= t("gender.#{@volunteer.gender}") if @volunteer.gender.present?
      tr
        td= t_attr(:avatar)
        td= image_tag(@volunteer.avatar.url(:thumb)) if @volunteer.avatar.present?
      tr
        td= t_attr(:nationality)
        td= country(@volunteer.nationality) if @volunteer.nationality.present?
      tr
        td= t_attr(:additional_nationality)
        td= country(@volunteer.additional_nationality) if @volunteer.additional_nationality.present?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
21
        tr
22
23
          td= t_attr(:street)
          td= @volunteer.street
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
24
        tr
25
26
          td= t_attr(:zip)
          td= @volunteer.zip
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
27
        tr
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
          td= t_attr(:city)
          td= @volunteer.city
      tr
        td= t_attr(:email)
        td= mail_to(@volunteer.email) if @volunteer.email.present?
      tr
        td= t_attr(:phone)
        td= @volunteer.phone
      - if @volunteer.language_skills.any?
        = render 'language_skills/show', speaker: @volunteer
      - if @volunteer.relatives.any?
        = render 'relatives/show', relative: @volunteer
      tr
        td= t_attr(:profession)
        td= @volunteer.profession
      tr
        td= t_attr(:education)
        td= @volunteer.education
      tr
        td= t_attr(:motivation)
        td= @volunteer.motivation
      tr
        td= t_attr(:experience)
        td= Volunteer.human_boolean(@volunteer.experience)
      tr
        td= t_attr(:expectations)
        td= @volunteer.expectations
      tr
        td= t_attr(:strengths)
        td= @volunteer.strengths
      tr
        td= t_attr(:skills)
        td= @volunteer.skills
      tr
        td= t_attr(:interests)
        td= @volunteer.interests
      - if policy(Volunteer).destroy?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
65
        tr
66
          td= t_attr(:state)
67
          td= t("state.#{@volunteer.state}", scope: [:simple_form, :options, :volunteer])
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
        - if @volunteer.rejected?
          tr
            td= t_attr(:rejection_type)
            td= t("rejection_type.#{@volunteer.rejection_type}") unless @volunteer.rejection_type.blank?
          tr
            td= t_attr(:rejection_text)
            td= @volunteer.rejection_text
      tr
        td= t_attr(:duration)
        td= t("duration.#{@volunteer.duration}") unless @volunteer.duration.blank?
      tr
        td= t_attr(:region)
        td= t("region.#{@volunteer.region}") unless @volunteer.region.blank?

h3= t_attr(:single_accompaniment)
.table-responsive
  table.table.table-striped
    thead
      tr
        - Volunteer.single_accompaniment.each do |single|
          th.text-center= t_attr(single)
    tbody
      tr
        - Volunteer.single_accompaniment.each do |single|
          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
        - Volunteer.group_accompaniment.each do |group|
          th.text-center
            = t_attr(group)
    tbody
      tr
        - Volunteer.group_accompaniment.each do |group|
          td.text-center
            - if @volunteer.read_attribute(group)
              i.glyphicon.glyphicon-ok.text-success
            - else
              i.glyphicon.glyphicon-remove.text-danger
114

Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
115
= render 'schedules/show', participant: @volunteer
116

117
118
.row
  .col-xs-12
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
119
120
121
122
123
    = link_to t_action(:edit), edit_volunteer_path(@volunteer), class: 'btn btn-default'

.row
  .col-xs-12
    = link_to t('back'), volunteers_path, class: 'btn btn-default'