From 2e80df5bd9046162f85aff058362b370e6cdd9fd Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Mon, 21 Nov 2016 21:17:43 +1300 Subject: [PATCH] CRM-19674 Add ability to see at a glance if a contribution is part of a recurring series Note this is a subset of https://github.com/civicrm/civicrm-core/pull/9421/commits/c6ba3ef7253b4b27ac69f70d71b6a78d3475b635 It re-instates the display of the word recurring, but leaves out the extra column for recurring & sortability based on that. This is mostly because I wanted to get the PR resolved & merged & hence left out the stuff that did not seem like I had a consensus on. However, I do think the loss of sortability on recurring is a shame & hence kept a link to the commit if anyone wants to revisit --- CRM/Contribute/BAO/Query.php | 1 + CRM/Contribute/Controller/Search.php | 7 ------- CRM/Contribute/Selector/Search.php | 8 ++------ templates/CRM/Contribute/Form/Selector.tpl | 2 +- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/CRM/Contribute/BAO/Query.php b/CRM/Contribute/BAO/Query.php index e31a87f67d..a78c2e444d 100644 --- a/CRM/Contribute/BAO/Query.php +++ b/CRM/Contribute/BAO/Query.php @@ -728,6 +728,7 @@ class CRM_Contribute_BAO_Query extends CRM_Core_BAO_Query { 'product_name' => 1, 'currency' => 1, 'cancel_date' => 1, + 'contribution_recur_id' => 1, ); if (self::isSoftCreditOptionEnabled()) { $properties = array_merge($properties, self::softCreditReturnProperties()); diff --git a/CRM/Contribute/Controller/Search.php b/CRM/Contribute/Controller/Search.php index 1a53377341..500d8ffd68 100644 --- a/CRM/Contribute/Controller/Search.php +++ b/CRM/Contribute/Controller/Search.php @@ -26,7 +26,6 @@ */ /** - * * @package CRM * @copyright CiviCRM LLC (c) 2004-2017 */ @@ -54,14 +53,8 @@ class CRM_Contribute_Controller_Search extends CRM_Core_Controller { public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) { parent::__construct($title, $modal); - $this->_stateMachine = new CRM_Contribute_StateMachine_Search($this, $action); - - // create and instantiate the pages $this->addPages($this->_stateMachine, $action); - - // add all the actions - $config = CRM_Core_Config::singleton(); $this->addActions(); } diff --git a/CRM/Contribute/Selector/Search.php b/CRM/Contribute/Selector/Search.php index c0778e4703..4ab8cad807 100644 --- a/CRM/Contribute/Selector/Search.php +++ b/CRM/Contribute/Selector/Search.php @@ -26,21 +26,17 @@ */ /** - * * @package CRM * @copyright CiviCRM LLC (c) 2004-2017 */ /** - * This class is used to retrieve and display a range of - * contacts that match the given criteria (specifically for - * results of advanced search options. - * + * Class to render contribution search results. */ class CRM_Contribute_Selector_Search extends CRM_Core_Selector_Base implements CRM_Core_Selector_API { /** - * This defines two actions- View and Edit. + * Array of action links. * * @var array */ diff --git a/templates/CRM/Contribute/Form/Selector.tpl b/templates/CRM/Contribute/Form/Selector.tpl index 10e975d032..0cd542008e 100644 --- a/templates/CRM/Contribute/Form/Selector.tpl +++ b/templates/CRM/Contribute/Form/Selector.tpl @@ -65,7 +65,7 @@ {/if} {if $row.amount_level }
({$row.amount_level}){/if} - {if $row.contribution_recur_id}
{ts}(Recurring Contribution){/ts}{/if} + {if $row.contribution_recur_id}
{ts}(Recurring){/ts}{/if} {if $softCreditColumns} -- 2.25.1