Commit f454ff70 authored by Tugce Nur Tas's avatar Tugce Nur Tas
Browse files

assignments tables on volunteer show consistent and include feedbacks

parent 0630f855
......@@ -5,6 +5,7 @@ table.table.table-striped.assignment-logs-table
th= t_attr(:period_start, Assignment)
th= t_attr(:period_end, Assignment)
th= t_attr(:created_by)
th colspan=2
tbody
- assignment_logs.each do |assignment|
tr
......@@ -20,3 +21,20 @@ table.table.table-striped.assignment-logs-table
= link_to assignment.creator.full_name, profile_path(assignment.creator)
- else
= assignment.creator.full_name
td
- if assignment.assignment && policy(assignment.assignment).show?
= link_to t_action(:show), assignment.assignment
td.index-action-cell.hidden-print
span
- if policy(TrialFeedback).index?
= link_to t_title(:index, TrialFeedback), polymorphic_path([assignment.assignment.volunteer, assignment.assignment, TrialFeedback])
- if policy(Feedback).index?
= link_to t_title(:index, Feedback), polymorphic_path([assignment.assignment.volunteer, assignment.assignment, Feedback])
- if policy(Assignment).verify_termination?
= link_to 'Beendigungsformular', terminate_assignment_path(assignment)
td.index-action-cell.hidden-print
span
= "Quittiert von "
= link_to assignment.termination_verified_by.full_name, profile_link(assignment.termination_verified_by)
= " am #{l(assignment.termination_verified_at.to_date)}"
table.table.table-striped.group-assignments-table
thead
tr
th= t_attr(:title, GroupOffer)
th= t_attr(:role, GroupAssignment)
th= t_attr(:period_start, GroupAssignment)
th= t_attr(:period_end, GroupAssignment)
th colspan=2
tbody
- group_assignment_logs.each do |group_assignment|
tr
td
- if group_assignment.group_offer
- if policy(group_assignment.group_offer).show?
= link_to group_assignment.group_offer.title, group_offer_path(group_assignment.group_offer)
- else
= group_assignment.group_offer.title
- else
= group_assignment.title
td
- if group_assignment.responsible
= t_attr(:responsible, GroupAssignment)
- else
= t_attr(:member, GroupAssignment)
td= l(group_assignment.period_start) if group_assignment.period_start
td= l(group_assignment.period_end) if group_assignment.period_end
td
- if group_assignment.group_offer && policy(group_assignment.group_offer).show?
= link_to t_action(:show), group_offer_path(group_assignment.group_offer)
td.index-action-cell.hidden-print
span
- if policy(TrialFeedback).index?
= link_to t_title(:index, TrialFeedback), polymorphic_path([@volunteer, group_assignment.group_offer, TrialFeedback])
- if policy(Feedback).index?
= link_to t_title(:index, Feedback), polymorphic_path([@volunteer, group_assignment.group_offer, Feedback])
- if policy(GroupAssignment).verify_termination?
= link_to 'Beendigungsformular', terminate_group_assignment_path(group_assignment)
td.index-action-cell.hidden-print
span
= "Quittiert von "
= link_to group_assignment.termination_verified_by.full_name, profile_link(group_assignment.termination_verified_by)
= " am #{l(group_assignment.termination_verified_at.to_date)}"
......@@ -172,21 +172,21 @@ h3= t_attr(:group_accompaniment)
h3= t('.availability')
= render 'availability/show', available: @volunteer
- if @volunteer.assignments.any?
h3#assignments Begleitungen
- if @volunteer.assignments.unterminated.any?
h3#assignments Aktuelle Begleitungen
= render 'assignments/client_volunteer_index', assignments: @volunteer.assignments.unterminated
- if @volunteer.assignment_logs.any?
h3 Archivierte Begleitungen
= render 'assignment_logs/assignment_logs_volunteer_index', assignment_logs: @volunteer.assignment_logs
- if @volunteer.group_assignments.any?
- if @volunteer.group_assignments.unterminated.any?
h3#assignments= t('.group_assignments')
= render 'group_assignments/volunteer_group_assignments', group_assignments: @volunteer.group_assignments.unterminated, editable: true
- if @volunteer.group_assignment_logs.any?
h3= t('.old_group_assignments')
= render 'group_assignments/volunteer_group_assignments', group_assignments: @volunteer.group_assignment_logs, editable: false
= render 'group_assignments/volunteer_group_assignments_logs', group_assignment_logs: @volunteer.group_assignment_logs
nav.navbar.section-navigation
ul.list-inline
......
......@@ -231,7 +231,7 @@ de:
group_assignments: Aktuelle Gruppenangebote
hour_reports: Stunden Rapporte
new_certificate: Nachweis ausstellen
old_group_assignments: Gruppenangebote Archiv
old_group_assignments: Archivierte Gruppenangebote
report_hours: Stunden erfassen
show_certificate: Nachweis anzeigen
show_certificates: Nachweise anzeigen
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment