From afc3dfa7b257e1889137e172d19b751ee637a166 Mon Sep 17 00:00:00 2001 From: systopia Date: Tue, 20 May 2014 17:12:01 +0200 Subject: [PATCH] show status label instead of name in event dashboard --- CRM/Event/BAO/Event.php | 4 +++- templates/CRM/Event/Page/DashBoard.tpl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 3fcaff6865..9772d461d6 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -358,12 +358,13 @@ WHERE civicrm_event.is_active = 1 AND } //get the participant status type values. - $query = 'SELECT id, name, class FROM civicrm_participant_status_type'; + $query = 'SELECT id, name, label, class FROM civicrm_participant_status_type'; $status = CRM_Core_DAO::executeQuery($query); $statusValues = array(); while ($status->fetch()) { $statusValues[$status->id]['id'] = $status->id; $statusValues[$status->id]['name'] = $status->name; + $statusValues[$status->id]['label'] = $status->label; $statusValues[$status->id]['class'] = $status->class; } @@ -531,6 +532,7 @@ LIMIT 0, 10 $urlString = "reset=1&force=1&event={$dao->id}&status=$statusId"; $statusInfo = array('url' => CRM_Utils_System::url('civicrm/event/search', $urlString), 'name' => $statusValue['name'], + 'label' => $statusValue['label'], 'count' => $statusCount, ); $eventSummary['events'][$dao->id]['statuses'][$class][] = $statusInfo; diff --git a/templates/CRM/Event/Page/DashBoard.tpl b/templates/CRM/Event/Page/DashBoard.tpl index c02f3d224c..9eeb31f79f 100644 --- a/templates/CRM/Event/Page/DashBoard.tpl +++ b/templates/CRM/Event/Page/DashBoard.tpl @@ -90,7 +90,7 @@ {foreach from=$values.statuses item=class} {if $class} {foreach from=$class item=status} - {$status.name}: {$status.count} + {$status.label}: {$status.count} {/foreach}
{/if} -- 2.25.1