CRM-19674 Add ability to see at a glance if a contribution is part of a recurring...
authoreileenmcnaugton <eileen@fuzion.co.nz>
Mon, 21 Nov 2016 08:17:43 +0000 (21:17 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 16 Mar 2017 08:18:04 +0000 (21:18 +1300)
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
CRM/Contribute/Controller/Search.php
CRM/Contribute/Selector/Search.php
templates/CRM/Contribute/Form/Selector.tpl

index e31a87f67da97a0637e920029c6a5e9d584cd811..a78c2e444def6a11d6b21ee492beab0e32fa980a 100644 (file)
@@ -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());
index 1a533773412ad2dfa786f180cd2a88a968bb7901..500d8ffd68244c26d2ec611baa633dd15e19e8e2 100644 (file)
@@ -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();
   }
 
index c0778e4703e7f1d5fe5852c2ee21b26170abe37a..4ab8cad807e49c85196f7f6b4555372a29bc33e6 100644 (file)
  */
 
 /**
- *
  * @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
    */
index 10e975d032252dc3bbfc29e9474e91b2ba592d09..0cd542008e3a7d30d9e780cdd651ad185b8c9083 100644 (file)
@@ -65,7 +65,7 @@
             </a>
           {/if}
           {if $row.amount_level }<br/>({$row.amount_level}){/if}
-          {if $row.contribution_recur_id}<br/>{ts}(Recurring Contribution){/ts}{/if}
+          {if $row.contribution_recur_id}<br/>{ts}(Recurring){/ts}{/if}
         </td>
         {if $softCreditColumns}
           <td class="right bold crm-contribution-soft_credit_amount">