- row_id = "#{toggle_prefix}-quick-preview-#{event.id}" tr td.noprint= toggler("##{row_id}") td.actions / If the event supports editing (most don't as they are immuatble once created, to ensure a / consistent clinical record), then use the supplied proc if passed (which will render a / custom edit link (e.g. the Investigations event subclass, has its own slug, controllwe and / and form) otherwise render a standard Event edit link. - if policy(event).edit? = link_to("Edit", local_assigns[:edit_proc] ? edit_proc.call(event) : edit_patient_event_path(event.patient, event)) - if policy(event).destroy? - if local_assigns[:destroy_proc] = link_to("Delete", destroy_proc.call(event)) - else = link_to(patient_event_path(event.patient, event), method: :delete, data: { confirm: "Are you sure you want delete this event?\n" }) do i.far.fa-trash-alt td.nowrap= l event.created_at.to_date - unless local_assigns[:exclude_type_column] == true td= event.event_type - if local_assigns[:include_patient_column] == true td= default_patient_link(event.patient) td.col-width-medium-with-ellipsis = render partial: event.to_cell_partial_path, locals: { event: event } td.created_at= l(event.date_time) td.created_by= event.created_by.full_name = content_tag(:tr, id: row_id, style: "display: none") td(colspan=7) .quick-preview = render partial: event.to_toggled_cell_partial_path, locals: { event: event }