X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FSelector%2FSearch.php;h=c81664a5583665cb60e8c888de79c20076fd72e0;hb=03298d98322f2da05e2ab30cb0e2d5b90df47ab3;hp=4961d18e1b4a3acd9f59644cefa5ec8ac3e62207;hpb=124bc594cfa2e12671f61865d2938639329b4eda;p=civicrm-core.git diff --git a/CRM/Event/Selector/Search.php b/CRM/Event/Selector/Search.php index 4961d18e1b..c81664a558 100644 --- a/CRM/Event/Selector/Search.php +++ b/CRM/Event/Selector/Search.php @@ -1,9 +1,9 @@ participant_id; + $links = self::links($this->_key, $this->_context, $this->_compContext); + + if ($statusTypes[$row['participant_status_id']] == 'Partially paid') { + $links[CRM_Core_Action::ADD] = array( + 'name' => ts('Record Payment'), + 'url' => 'civicrm/payment', + 'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=add&component=event', + 'title' => ts('Record Payment'), + ); + } + + if ($statusTypes[$row['participant_status_id']] == 'Pending refund') { + $links[CRM_Core_Action::ADD] = array( + 'name' => ts('Record Refund'), + 'url' => 'civicrm/payment', + 'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=add&component=event', + 'title' => ts('Record Refund'), + ); + } - $row['action'] = CRM_Core_Action::formLink(self::links($this->_key, $this->_context, $this->_compContext), + $row['action'] = CRM_Core_Action::formLink($links, $mask, array( 'id' => $result->participant_id, @@ -382,7 +410,7 @@ class CRM_Event_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co $row['paid'] = CRM_Event_BAO_Event::isMonetary($row['event_id']); - if (CRM_Utils_Array::value('participant_fee_level', $row)) { + if (!empty($row['participant_fee_level'])) { CRM_Event_BAO_Participant::fixEventLevel($row['participant_fee_level']); } @@ -482,10 +510,16 @@ class CRM_Event_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co return self::$_columnHeaders; } + /** + * @return mixed + */ function alphabetQuery() { return $this->_query->searchQuery(NULL, NULL, NULL, FALSE, FALSE, TRUE); } + /** + * @return string + */ function &getQuery() { return $this->_query; }