index.html.slim 3.03 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
12
        th.limit-width Journal / Stunden
cla's avatar
cla committed
13
        th Status
Tugce Nur Tas's avatar
Tugce Nur Tas committed
14
        th.limit-width Freiwilige/r
cla's avatar
cla committed
15
        th Einsätze
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= sort_link @q, :responsible_profile_contact_full_name, 'Übernommen'
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
23
        th= sort_link @q, :reviewed_by_profile_full_name, 'Quittiert'
24
25

    tbody
26
      - @spvs.each do |spv|
27
28
        tr
          td.index-action-cell.hidden-print
cla's avatar
cla committed
29
            = button_link icon_span(:edit), review_semester_semester_process_volunteer_path(spv), title: 'Bearbeiten'
Tugce Nur Tas's avatar
Tugce Nur Tas committed
30
          td.index-action-cell.hidden-print
31
32
33
            = 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
34
            = button_link icon_span(:hours), volunteer_hours_path(spv.volunteer), title: 'Stunden'
cla's avatar
cla committed
35
36
37
38
39
          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
40
          td= link_to_if policy(Volunteer).edit?, spv.volunteer.contact.full_name, edit_volunteer_path(spv.volunteer)
41
          td= render_missions(spv)
42
43
44
45
          = 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)
46
47
          td= spv.commited_by
          td= spv.commited_at && l(spv.commited_at)
48
49
50
51
52
53
54
55
56
          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
57
58
59
60
61
62
63
64
65
          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 %>')
66
67
68
69

= bootstrap_paginate(@spvs)

= render 'index_nav'