diff --git a/bugp.php b/bugp.php index 75bb47812aa37e51ab045ed7c0b9c7eb85e872c6..024320cd51f2d5b5c03368cd7a04004f287ceb69 100644 --- a/bugp.php +++ b/bugp.php @@ -275,7 +275,8 @@ function calculateFiscalYearForDate($inputDate, $fyStart, $fyEnd) { } function bugp_civicrm_searchColumns($objectName, &$headers, &$rows, &$selector) { - if ($objectName == 'grant') { + if ($objectName == 'grant' && !CRM_Core_Smarty::singleton()->get_template_vars('contactId')) { + CRM_Core_Smarty::singleton()->assign('isCustom', TRUE); $remove = array( 'grant_amount_total' => 'Requested', 'grant_application_received_date' => 'Application Received', diff --git a/templates/CRM/Grant/Form/Selector.tpl b/templates/CRM/Grant/Form/Selector.tpl index fe43d6a7ebabda33aad354259c54f927e862067d..45c19211b246f653db89197c970d9e39c8627b6e 100644 --- a/templates/CRM/Grant/Form/Selector.tpl +++ b/templates/CRM/Grant/Form/Selector.tpl @@ -59,6 +59,7 @@ <td>{$row.contact_type}</td> <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a></td> {/if} + {if $isCustom} <td class="right crm-grant-grant_proposal">{$row.custom_197}</td> <td class="crm-grant-grant_status">{$row.grant_status}</td> <td class="crm-grant-grant_type">{$row.grant_type}</td> @@ -67,6 +68,16 @@ <td class="crm-grant-grant_short_description">{$row.custom_126}</td> <td class="crm-grant-grant_long_description">{$row.custom_127}</td> <td>{$row.action|replace:'xx':$row.grant_id}</td> + {else} + <td class="crm-grant-grant_status">{$row.grant_status}</td> + <td class="crm-grant-grant_type">{$row.grant_type}</td> + <td class="right crm-grant-grant_amount_total">{$row.grant_amount_total|crmMoney}</td> + <td class="right crm-grant-grant_amount_granted">{$row.grant_amount_granted|crmMoney}</td> + <td class="right crm-grant-grant_application_received_date">{$row.grant_application_received_date|truncate:10:''|crmDate}</td> + <td class="crm-grant-grant_report_received">{if $row.grant_report_received}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td> + <td class="right crm-grant-grant_money_transfer_date">{$row.grant_money_transfer_date|truncate:10:''|crmDate}</td> + <td>{$row.action|replace:'xx':$row.grant_id}</td> + {/if} </tr> {/foreach}