From 630d1aaae97e24b2caadcda5cc7e3cac754e439e Mon Sep 17 00:00:00 2001 From: kurund Date: Sun, 2 Mar 2014 05:06:33 +0530 Subject: [PATCH] zero record text fixes CRM-14201 ---------------------------------------- * CRM-14201: Contact Relationships tab needs pagination http://issues.civicrm.org/jira/browse/CRM-14201 --- CRM/Contact/BAO/Relationship.php | 2 +- templates/CRM/Contact/Page/View/RelationshipSelector.tpl | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index fc8f192a0a..a1106b6dc7 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -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']; } diff --git a/templates/CRM/Contact/Page/View/RelationshipSelector.tpl b/templates/CRM/Contact/Page/View/RelationshipSelector.tpl index 648f712e40..116390a015 100644 --- a/templates/CRM/Contact/Page/View/RelationshipSelector.tpl +++ b/templates/CRM/Contact/Page/View/RelationshipSelector.tpl @@ -58,8 +58,11 @@ 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({ -- 2.25.1