.admissions-consults-table table thead tr th.col-width-medium.noprint th.col-width-large = sort_link(query, :patient, ["patient_family_name", "patient_given_name asc"], "Patient") th.col-width-nhs-no.noprint NHS No. th.col-width-reference-no Hosp Nos. th.col-width-medium= sort_link(query, :hospital_ward_name, "Ward") th.col-width-tiny RRT th.col-width-date.noprint= sort_link(query, :started_on, "Started") th.col-width-date.noprint= sort_link(query, :ended_on, "Ended") th.col-width-small.show-for-large-up = sort_link([:renalware, query], :modality_desc, "Modality") th.col-width-tiny.show-for-large-up Sex th.col-width-date.show-for-large-up= sort_link(query, :patient_born_on, "DOB") th.col-width-tiny.show-for-large-up Age th.col-width-tiny.noprint= sort_link(query, :aki_risk, "AKI Risk") tbody - consults.each do |consult| - uid = "consult-#{consult.id}" tr.keep-with-next td.actions-dropdown.going-right.noprint / As we have lots of possible actions, group them in a button group. / A wrapping div is required for now in order for the button group display correctly / (though we could style the td like a div I guess). div button.button.secondary.dropdown(href="#" data-dropdown=uid aria-controls=uid aria-expanded="false") | Actions ul.f-dropdown(id="#{uid}" data-dropdown-content aria-hidden="true") = dropdown_btn_item(icon: "fa-edit", url: edit_admissions_consult_path(consult), title: "View/Edit", enabled: policy(consult).edit?) = dropdown_btn_item(icon: "fa-trash", url: admissions_consult_path(consult), title: "Mark as Done", method: :delete, data: { confirm: t(".delete_consult_warning_msg") }, enabled: policy(consult).destroy?) - if policy(Renalware::Admissions::Request).create? li= render "renalware/admissions/requests/create_request_link", patient: consult.patient, link_text: "Request Admission" |    = link_to("Toggle", "#consult-quick-preview-#{consult.id}", data: { behaviour: "toggler" }) td= default_patient_link(consult.patient) td.noprint= consult.patient_nhs_number td= consult.patient_hospital_identifiers&.to_s_multiline td= consult.hospital_ward td= yes_no(consult.rrt?) td.noprint= l(consult.started_on) td.noprint= l(consult.ended_on) td.show-for-large-up.col-width-medium-with-ellipsis= consult.patient_current_modality td.show-for-large-up= consult.patient_sex td.show-for-large-up= l(consult.patient.born_on) td.show-for-large-up= consult.patient_age td.noprint= consult.aki_risk&.text /td.show-for-xlarge-up.consult-author.col-width-medium-with-ellipsis(title=consult.created_by)= consult.created_by /td.col-width-medium-with-ellipsis(title=consult.description)= consult.description = content_tag(:tr, id: "consult-quick-preview-#{consult.id}", style: "display: none") td(colspan=11) .quick-preview dl.dl-horizontal dt Author dd=consult.created_by dt Modality dd= consult.patient_current_modality dt Description dd= simple_format consult.description td / When printing we just show the notes on the second row tr.print-only.child-row td(colspan=12)= simple_format consult.description