From e43d52063370186e985c5e203bd67dbac5893b81 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 25 Nov 2015 17:28:15 -0500 Subject: [PATCH] CRM-17606 - Add 'Print Document' button on manage case screen --- CRM/Case/Form/CaseView.php | 5 +++++ templates/CRM/Case/Form/CaseView.tpl | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/CRM/Case/Form/CaseView.php b/CRM/Case/Form/CaseView.php index 76bbe9a53b..3932eed6c8 100644 --- a/CRM/Case/Form/CaseView.php +++ b/CRM/Case/Form/CaseView.php @@ -232,6 +232,11 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form { $emailActivityType = array_search('Email', $allActTypes); $pdfActivityType = array_search('Print PDF Letter', $allActTypes); + if ($pdfActivityType) { + $this->assign('exportDoc', CRM_Utils_System::url('civicrm/activity/pdf/add', + "action=add&context=standalone&reset=1&cid={$this->_contactID}&caseid={$this->_caseID}&atype=$pdfActivityType")); + } + // remove Open Case activity type since we're inside an existing case if ($openActTypeId = array_search('Open Case', $allActTypes)) { unset($aTypes[$openActTypeId]); diff --git a/templates/CRM/Case/Form/CaseView.tpl b/templates/CRM/Case/Form/CaseView.tpl index 373ba9c0b6..ba477db777 100644 --- a/templates/CRM/Case/Form/CaseView.tpl +++ b/templates/CRM/Case/Form/CaseView.tpl @@ -120,6 +120,10 @@ {ts}Print Report{/ts} {/if} + {if !empty($exportDoc)} + {ts}Export Document{/ts} + {/if} + {if $mergeCases} {ts}Merge Case{/ts} {$form._qf_CaseView_next_merge_case.html} -- 2.25.1