tr(class=letter.state.dasherize) td.noprint - 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 |   = link_to "Toggle", "#quick-preview-#{letter.id}", data: { behaviour: "toggler" } = pipe_separator = link_to "View", patient_letters_letter_path(letter.patient, letter) 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= letter.author td= 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: "quick-preview-#{letter.id}", style: "display: none") td td(colspan=10) .quick-preview = simple_format letter.body