index.html.slim 1.98 KB
Newer Older
1
h1= t_title(:index)
2
3
4
5
6
7
8
9
10
11

= render 'index_nav'

= bootstrap_paginate(@spvs)

.table-responsive
  table.table.table-striped
    thead
      tr
        th.hidden-print Aktionen
cla's avatar
cla committed
12
        th Status
cla's avatar
cla committed
13
14
        th Freiwilige/r
        th Einsätze
Jiri Strojil's avatar
Tmp    
Jiri Strojil committed
15
        th Missions
16
17
18
19
        th Ziele
        th Erfolge
        th Zukunft
        th Bemerkungen
20
        th= t_attr(:commited_by)
cla's avatar
cla committed
21
        th Letzte Bestätigung
22
        th Aktionen
23
24

    tbody
25
      - @spvs_sorted.each do |spv|
26
27
        tr
          td.index-action-cell.hidden-print
cla's avatar
cla committed
28
29
30
31
32
33
            = button_link icon_span(:edit), review_semester_semester_process_volunteer_path(spv), title: 'Bearbeiten'
          td
            - if spv.commited_at.present?
              .label.label-success Bestätigt
            - else
              .label.label-warning Unbestätigt
Jiri Strojil's avatar
Tmp    
Jiri Strojil committed
34
          td= link_to_if policy(Volunteer).edit?, spv.volunteer.contact.full_name, edit_volunteer_path(spv.volunteer)
35
          td= spv.semester_t
36
          td= render_missions(spv)
37
38
39
40
          = td_truncate_content_modal(spv.render_feedback(:goals), 'Ziele', shorten_size: 300)
          = td_truncate_content_modal(spv.render_feedback(:achievements), 'Erfolge', shorten_size: 300)
          = td_truncate_content_modal(spv.render_feedback(:future), 'Zukunft', shorten_size: 300)
          = td_truncate_content_modal(spv.render_feedback(:comments), 'Bemerkungen', shorten_size: 300)
41
42
          td= spv.commited_by
          td= spv.commited_at && l(spv.commited_at)
43
44
45
46
47
48
49
50
51
          td.index-action-cell.hidden-print
            - if spv.responsible.present?
              = 'Übernommen durch '
              = link_to spv.responsible.email, spv.responsible
              = " am #{l(spv.responsibility_taken_at.to_date)}"
            - else
              = api_button('Übernehmen', subject: [spv],
                  action: :take_responsibility, extra_class: 'm-t-10',
                  template: 'Übernommen durch <a href="<%= data.link %>"><%= data.email %></a> am <%= data.at %>')
52
53
54
55

= bootstrap_paginate(@spvs)

= render 'index_nav'