.modal
  .modal__header
    h2= slot.patient
    = render "renalware/shared/modal_close_link"

  .modal__body
    = render "renalware/shared/errors", model: slot

    p.which-diary= slot.description

    /- unless slot.diary.master?
    = link_to "Remove them",
            hd_scheduling_diary_slot_path(slot.diary, slot),
            method: :delete,
            remote: true,
            class: "button alert"

    / - destroy_btn_title = slot.diary.master ? "Remove" : "Remove and revert to master diary"
    / = link_to destroy_btn_title,
    /           hd_scheduling_diary_slot_path(slot.diary, slot),
    /           method: :delete,
    /           remote: true,
    /           class: "button alert"

    h2 Replace with another patient
    = render "form", slot: slot

.modal
  .modal__header
    h2
      = link_to(patient_clinical_summary_path(slot.patient), target: "_blank") do
        = slot.patient.to_s(:default)
        | &nbsp;
        i.fa.fa-external-link-square-alt

    = render "renalware/shared/modal_close_link"

  .modal__body
    = render "renalware/shared/errors", model: slot

    p.which-diary= slot.description

    /- unless slot.diary.master?
    = link_to "Remove them",
            hd_scheduling_diary_slot_path(slot.diary, slot),
            method: :delete,
            remote: true,
            class: "button alert"

    / - destroy_btn_title = slot.diary.master ? "Remove" : "Remove and revert to master diary"
    / = link_to destroy_btn_title,
    /           hd_scheduling_diary_slot_path(slot.diary, slot),
    /           method: :delete,
    /           remote: true,
    /           class: "button alert"

    h2 Replace with another patient
    = render "form", slot: slot

Add patient link to HD diary slot dialog
Add patient link to HD diary slot dialog

Make the patient’s name, which is the dialog title, a link to open the patient’s clinical summary in a new tab.

airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core