tr(class=letter.state.dasherize) td.noprint= toggler("#letter-quick-preview-#{letter.id}") td.noprint = link_to "View", patient_letters_letter_path(letter.patient, letter) - if letter.approved? |   / The Print link will: / - open a new tab with the PDF, ready to print / - display a modal on this page (ready for when the user returns here after / printing) that asks if they want to mark the letters as printed or not. / See letters.js where it binds to .printing-pdf. / See also completed letters controller and the comments in / ./show.js.erb and and ./show.html.slim = link_to patient_letters_letter_print_path(letter), target: "_blank", class: "printing-pdf button secondary compact", data: { \ "modal-url" => new_patient_letters_letter_completed_path(letter.patient, letter) \ } do i.fas.fa-print | Print - if letter.approved? && letter.page_count |   = link_to patient_letters_letter_printable_path(letter.patient, letter), target: "_blank", class: "printing-pdf button secondary compact", data: { \ "modal-url" => new_patient_letters_letter_completed_path(letter.patient, letter) \ } do i.fas.fa-envelope | Env Print td.col-width-medium-with-ellipsis= letter.type td.state span= letter.state_description td.full-name= default_patient_link(letter.patient) td= letter.patient.nhs_number td= letter.enclosures&.truncate(6) td= l(letter.effective_date) td.col-width-medium-with-ellipsis= letter.author td.col-width-medium-with-ellipsis= letter.typist td= letter.page_count td.col-width-medium-with-ellipsis= letter.main_recipient.address td.col-width-medium-with-ellipsis= letter.description = content_tag(:tr, id: "letter-quick-preview-#{letter.id}", style: "display: none") td td(colspan=12) .quick-preview = simple_format letter.body - if letter.notes.present? .admin-notes p | Notes:   = letter.notes