zero record text fixes CRM-14201
authorkurund <kurund@civicrm.org>
Sat, 1 Mar 2014 23:36:33 +0000 (05:06 +0530)
committerkurund <kurund@civicrm.org>
Sat, 1 Mar 2014 23:36:33 +0000 (05:06 +0530)
----------------------------------------
* CRM-14201: Contact Relationships tab needs pagination
  http://issues.civicrm.org/jira/browse/CRM-14201

CRM/Contact/BAO/Relationship.php
templates/CRM/Contact/Page/View/RelationshipSelector.tpl

index fc8f192a0a55f449885e338474accf3ea276df1a..a1106b6dc744edce1701c3ae03823b433eac70f4 100644 (file)
@@ -971,7 +971,7 @@ LEFT JOIN  civicrm_country ON (civicrm_address.country_id = civicrm_country.id)
       }
 
       $offset = 0;
-      if (!empty($params['offset'])) {
+      if (!empty($params['offset']) && $params['offset'] > 0) {
         $offset = $params['offset'];
       }
 
index 648f712e40bc8145a147f9b83c54849f8dec27d4..116390a015911054cf80490c203082702c3b4142 100644 (file)
     if (context == 'user') {
       var ZeroRecordText = {/literal}'{ts escape="js"}There are no related contacts / organizations on record for you.{/ts}'{literal};
     }
+    else if (context == 'past') {
+      var ZeroRecordText = {/literal}'{ts escape="js"}There are no past / disabled relationships for this contact.{/ts}'{literal};
+    }
     else {
-      var ZeroRecordText = {/literal}'{ts escape="js"}There are no Relationships entered for this contact.{/ts}'{literal};
+      var ZeroRecordText = {/literal}'{ts escape="js"}There are no relationships entered for this contact.{/ts}'{literal};
     }
 
     {/literal}{$context}{literal}oTable = cj('#crm-contact-relationship-selector-' + context).dataTable({