From: Mukesh Ram Date: Tue, 16 Jan 2018 12:38:26 +0000 (+0530) Subject: CRM-21663: Fix Campaign Search and result structure X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ad6a7ecc88ab3c513ea8ac3a3fa8550e610a95ac;p=civicrm-core.git CRM-21663: Fix Campaign Search and result structure --- diff --git a/templates/CRM/Campaign/Form/Search.tpl b/templates/CRM/Campaign/Form/Search.tpl index 108e6fbbb5..1606a0392f 100644 --- a/templates/CRM/Campaign/Form/Search.tpl +++ b/templates/CRM/Campaign/Form/Search.tpl @@ -27,29 +27,37 @@ {include file='CRM/Campaign/Form/Search/Common.tpl' context='search'} {if $rowsEmpty || $rows} -
+
{if $rowsEmpty} +
+
{include file="CRM/Campaign/Form/Search/EmptyResults.tpl"} +
+
{/if} {if $rows} +
+
{* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *} {assign var="showBlock" value="'searchForm_show'"} {assign var="hideBlock" value="'searchForm'"} {* Search request has returned 1 or more matching rows. *}
- +
{* This section handles form elements for action task select and submit *} {include file="CRM/common/searchResultTasks.tpl" context="Campaign"} - +
+
{* This section displays the rows along and includes the paging controls *}

{include file="CRM/Campaign/Form/Selector.tpl" context="Search"} - +
{* END Actions/Results section *} - +
+
{/if}
{/if} diff --git a/templates/CRM/Campaign/Form/Search/Common.tpl b/templates/CRM/Campaign/Form/Search/Common.tpl index 743b882c96..4869ce8f37 100644 --- a/templates/CRM/Campaign/Form/Search/Common.tpl +++ b/templates/CRM/Campaign/Form/Search/Common.tpl @@ -30,9 +30,8 @@ {if $searchVoterFor} {assign var='searchForm' value="search_form_$searchVoterFor"} {/if} -
-
+
{ts}Edit Search Criteria{/ts}
diff --git a/templates/CRM/Campaign/Form/Selector.tpl b/templates/CRM/Campaign/Form/Selector.tpl index 8650ef30a6..7f90661191 100644 --- a/templates/CRM/Campaign/Form/Selector.tpl +++ b/templates/CRM/Campaign/Form/Selector.tpl @@ -34,6 +34,7 @@ {if !$single and $context eq 'Search' } {$form.toggleSelect.html} {/if} + {foreach from=$columnHeaders item=header} @@ -56,16 +57,17 @@ {assign var=cbName value=$row.checkbox} {$form.$cbName.html} {/if} - {$row.contact_type}  {$row.sort_name} - {$row.street_number} - {$row.street_name} - {$row.street_address} - {$row.city} - {$row.postal_code} - {$row.state_province} - {$row.country} - {$row.email} - {$row.phone} + {$row.contact_type} + {$row.sort_name} + {$row.street_number} + {$row.street_name} + {$row.street_address} + {$row.city} + {$row.postal_code} + {$row.state_province} + {$row.country} + {$row.email} + {$row.phone} {/if} {/foreach}