Fixed edit link on case details block

This commit is contained in:
naomi 2018-04-14 18:52:04 +02:00
parent 73f072a1c5
commit 368c355ce5

View File

@ -35,7 +35,7 @@ class CaseDetails extends BlockBase {
} }
private function renderEditLink($case_id) { private function renderEditLink($case_id) {
return "<p class = 'zencrm_edit_link'><a href='/zencrm/case/$case_id'>Edit</a></p>"; return "<p class = 'zencrm_edit_link'><a class='use-ajax' data-dialog-type='modal' href='/zencrm/case/$case_id/edit?destination=/zencrm/case/$case_id'>Edit</a></p>";
} }
private function renderEntity($case) { private function renderEntity($case) {
@ -49,7 +49,6 @@ class CaseDetails extends BlockBase {
$hats_involved = $case->hats_involved->referencedEntities(); $hats_involved = $case->hats_involved->referencedEntities();
foreach($hats_involved as $hat) { foreach($hats_involved as $hat) {
$person_id = $hat->person->first()->getValue()['target_id']; $person_id = $hat->person->first()->getValue()['target_id'];
error_log($person_id);
$markup .= "<p><a href='/zencrm/person/$person_id'>" . $hat->name->getString() . "</a></p>"; $markup .= "<p><a href='/zencrm/person/$person_id'>" . $hat->name->getString() . "</a></p>";
} }
return "<div class='zencrm_links'>$markup</div>"; return "<div class='zencrm_links'>$markup</div>";