Commit 9031b5c4 authored by Tugce Nur Tas's avatar Tugce Nur Tas
Browse files

review changes

parent afd3aa3c
Pipeline #15437 passed with stage
in 42 minutes and 9 seconds
......@@ -27,7 +27,9 @@ class VolunteersController < ApplicationController
end
end
def show; end
def show
@volunteer_events = @volunteer.events.past
end
def new
@volunteer = Volunteer.new
......
......@@ -13,16 +13,16 @@ button.btn.btn-default(data-toggle='collapse' data-target='#volunteer-events' ty
th Departement
th
tbody
- events.past.each do |event|
- events.each do |event|
tr
td= event.title if event.title
td= event.title
td= t(".#{event.kind}") if event.kind
td= l(event.date.to_date) if event.date
td= l(event.date) if event.date
td
= "#{(event.start_time.strftime('%H:%M'))} - " if event.start_time
= "#{(event.end_time.strftime('%H:%M'))}" if event.end_time
td= event.title if event.title
td= event.department.contact.last_name if event.department
td= event.department&.contact&.last_name
td.index-action-cell.hidden-print
span= link_to t_action(:show), event_path(event)
hr
......@@ -192,8 +192,8 @@ h2.small= t('.availability')
h2.small= t('.old_group_assignments')
= render 'group_assignments/volunteer_group_assignments_logs', group_assignment_logs: @volunteer.group_assignment_logs
- if policy(Event).show? && @volunteer.events.past.any?
= render 'events/volunteer_events', events: @volunteer.events
- if policy(Event).show? && @volunteer_events.present?
= render 'events/volunteer_events', events: @volunteer_events
nav.navbar.section-navigation
ul.list-inline
......
Markdown is supported
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