= link_to "Print (PDF)", patient_letters_letter_print_path(letter), data: { target: patient_letters_letter_print_path(letter) }, form_class: "inline", class: "button tiny print-pdf", target: "print" = blank_separator button.button.tiny.dropdown(href="#" data-dropdown="download-options" aria-controls="download-options" aria-expanded="false") | Download ul.f-dropdown#download-options(data-dropdown-content aria-hidden="true") li= link_to "PDF", patient_letters_letter_download_path(letter) li= link_to "RTF", patient_letters_letter_download_path(letter, :rtf) = blank_separator - if policy(letter).update? = link_to "Edit", edit_patient_letters_letter_path(letter.patient, letter), class: "button tiny" = blank_separator - if policy(letter).submit_for_review? = button_to "Submit for Review", patient_letters_letter_pending_review_path(letter.patient, letter), form_class: "inline", class: "button tiny", data: { confirm: "Are you sure?" } = blank_separator - if policy(letter).reject? = button_to "Reject", patient_letters_letter_rejected_path(letter.patient, letter), form_class: "inline", class: "button tiny" = blank_separator - if policy(letter).approve? = button_to "Approve and archive", patient_letters_letter_approved_path(letter.patient, letter), form_class: "inline", class: "button tiny", data: { confirm: "Are you sure? You will not be able to modify the letter afterwards." } = blank_separator - if policy(letter).complete? = button_to "Mark as printed", patient_letters_letter_completed_path(letter.patient, letter), form_class: "inline", class: "button tiny", data: { confirm: "Are you sure the letter was printed?" } = blank_separator = blank_separator = link_to "back to list", params.fetch(:back_url, patient_letters_letters_path(letter.patient))