<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.7 |
+ | CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2017 |
+ | Copyright CiviCRM LLC (c) 2004-2018 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2017
+ * @copyright CiviCRM LLC (c) 2004-2018
* $Id$
*
*/
}
$participantStatuses = CRM_Event_PseudoConstant::participantStatus();
+ // CRM-20879: Show 'Transfer or Cancel' option beside 'Change fee selection'
+ // only if logged in user have 'edit event participants' permission and
+ // participant status is not Cancelled or Transferred
+ if (CRM_Core_Permission::check('edit event participants') && !in_array($status, array('Cancelled', 'Transferred'))) {
+ $this->assign('transferOrCancelLink',
+ CRM_Utils_System::url(
+ 'civicrm/event/selfsvcupdate',
+ array(
+ 'reset' => 1,
+ 'is_backoffice' => 1,
+ 'pid' => $participantID,
+ 'cs' => CRM_Contact_BAO_Contact_Utils::generateChecksum($contactID, NULL, 'inf'),
+ )
+ )
+ );
+ }
+
if ($values[$participantID]['is_test']) {
$values[$participantID]['status'] .= ' (test) ';
}