From: Coleman Watts Date: Wed, 25 Nov 2015 22:28:15 +0000 (-0500) Subject: CRM-17606 - Add 'Print Document' button on manage case screen X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e43d52063370186e985c5e203bd67dbac5893b81;p=civicrm-core.git CRM-17606 - Add 'Print Document' button on manage case screen --- 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}