show.html.slim 4.09 KB
Newer Older
1
2
.row
  .col-xs-12
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
3
    h1= @volunteer.full_name
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
4

5
6
7
8
    .table-responsive
      table.table.table-no-border-top
        tbody
          tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
9
10
            td= t_attr(:date_of_birth)
            td= l(@volunteer.date_of_birth) if @volunteer.date_of_birth.present?
11
          tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
12
13
            td= t_attr(:gender)
            td= t("gender.#{@volunteer.gender}") if @volunteer.gender.present?
14
          tr
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
            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?
            tr
              td= t_attr(:street)
              td= @volunteer.street
            tr
              td= t_attr(:zip)
              td= @volunteer.zip
            tr
              td= t_attr(:city)
              td= @volunteer.city
32
          tr
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
33
            td= t_attr(:email)
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
34
            td= mail_to(@volunteer.email) if @volunteer.email.present?
35
36
37
          tr
            td= t_attr(:phone)
            td= @volunteer.phone
Kaspar Vollenweider's avatar
Kaspar Vollenweider committed
38
39
40
41
          - if @volunteer.language_skills.any?
            = render 'language_skills/show', speaker: @volunteer
          - if @volunteer.relatives.any?
            = render 'relatives/show', relative: @volunteer
42
43
44
45
46
47
48
49
50
51
52
          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)
53
            td= Volunteer.human_boolean(@volunteer.experience)
54
55
56
57
58
59
60
61
62
63
64
65
          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
66
67
68
          - if policy(Volunteer).destroy?
            tr
              td= t_attr(:state)
69
              td= t("simple_form.options.volunteer.state.#{@volunteer.state}")
70
71
72
            - if @volunteer.rejected?
              tr
                td= t_attr(:rejection_type)
73
                td= t("rejection_type.#{@volunteer.rejection_type}") unless @volunteer.rejection_type.blank?
74
75
76
              tr
                td= t_attr(:rejection_text)
                td= @volunteer.rejection_text
77
78
79
80
81
82
          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?
83

Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
84
85
.row
  .col-xs-12
86
    h3= t_attr(:single_accompaniment)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
87
88
89
90
    table.table.table-striped
      thead
        tr
          - Volunteer.single_accompaniment.each do |single|
91
            th.text-center= t_attr(single)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
92
93
94
95
96
97
98
99
      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
100

Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
101
102
.row
  .col-xs-12
103
    h3= t_attr(:group_accompaniment)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
104
105
106
107
108
    table.table.table-striped
      thead
        tr
          - Volunteer.group_accompaniment.each do |group|
            th.text-center
109
              = t_attr(group)
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
110
111
112
113
114
115
116
117
      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
118

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

121
122
.row
  .col-xs-12
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
123
124
125
126
127
    = 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'