index.html.slim 2.7 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
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
12
        th Status
Tugce Nur Tas's avatar
Tugce Nur Tas committed
13
        th.limit-width Freiwilige/r
cla's avatar
cla committed
14
        th Einsätze
15
16
17
18
        th Ziele
        th Erfolge
        th Zukunft
        th Bemerkungen
19
20
        th Übernommen
        th Quittiert
21
22

    tbody
23
      - @spvs.each do |spv|
24
25
        tr
          td.index-action-cell.hidden-print
cla's avatar
cla committed
26
            = button_link icon_span(:edit), review_semester_semester_process_volunteer_path(spv), title: 'Bearbeiten'
27
28
29
            = button_link icon_span(:journal), volunteer_journals_path(spv.volunteer), title: 'Journal'
            = button_link icon_span(:journal_new), new_volunteer_journal_path(spv.volunteer,
              semester_feedback_id: spv.semester_feedbacks.ids), title: 'Neuen Journal eintrag mit Zitat erstellen'
Tugce Nur Tas's avatar
Tugce Nur Tas committed
30
            = button_link icon_span(:hours), volunteer_hours_path(spv.volunteer), title: 'Stunden'
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
31
32
33
34
35
          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
36
          td= link_to_if policy(Volunteer).edit?, spv.volunteer.contact.full_name, edit_volunteer_path(spv.volunteer)
37
          td= render_missions(spv)
38
39
40
41
          = 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)
42
43
44
45
46
47
48
49
50
          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 %>')
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
51
52
53
54
55
56
57
58
59
          td.index-action-cell.hidden-print
            - if spv.reviewed_by.present?
              = 'Quittiert von '
              = link_to spv.reviewed_by.email, spv.reviewed_by
              = " am #{l(spv.reviewed_at.to_date)}"
            - else
              = api_button('Quittieren', subject: [spv],
                  action: :mark_as_done, extra_class: 'm-t-10',
                  template: 'Quittiert von <a href="<%= data.link %>"><%= data.email %></a> am <%= data.at %>')
60
61
62
63

= bootstrap_paginate(@spvs)

= render 'index_nav'