CRM-21663: Fix Campaign Search and result structure
authorMukesh Ram <mukesh@compucorp.co.uk>
Tue, 16 Jan 2018 12:38:26 +0000 (18:08 +0530)
committerMukesh Ram <mukesh@compucorp.co.uk>
Tue, 16 Jan 2018 12:38:26 +0000 (18:08 +0530)
templates/CRM/Campaign/Form/Search.tpl
templates/CRM/Campaign/Form/Search/Common.tpl
templates/CRM/Campaign/Form/Selector.tpl

index 108e6fbbb5b023a46d8039d5520dff328c463968..1606a0392f4a6cd025d7c8b47bd76b756e77f660 100644 (file)
 {include file='CRM/Campaign/Form/Search/Common.tpl' context='search'}
 
 {if $rowsEmpty || $rows}
-<div class="crm-content-block">
+<div class="crm-content-block crm-search-form-block">
 {if $rowsEmpty}
+<div class="crm-content-block">
+  <div class="crm-results-block crm-results-block-empty">
     {include file="CRM/Campaign/Form/Search/EmptyResults.tpl"}
+  </div>
+</div>
 {/if}
 
 {if $rows}
+<div class="crm-content-block">
+  <div class="crm-results-block">
     {* 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. *}
     <fieldset>
-
+      <div class="crm-search-tasks">
        {* This section handles form elements for action task select and submit *}
        {include file="CRM/common/searchResultTasks.tpl" context="Campaign"}
-
+      </div>
+      <div class="crm-search-results">
        {* This section displays the rows along and includes the paging controls *}
        <p></p>
        {include file="CRM/Campaign/Form/Selector.tpl" context="Search"}
-
+      </div>
     </fieldset>
     {* END Actions/Results section *}
-
+  </div>
+</div>
 {/if}
 </div>
 {/if}
index 743b882c9624c73922709e9c508ef0a3a6074fdf..4869ce8f37ea2d721fe5e760bfe92f2aa6f74be2 100644 (file)
@@ -30,9 +30,8 @@
 {if $searchVoterFor}
   {assign var='searchForm' value="search_form_$searchVoterFor"}
 {/if}
-
   <div id="{$searchForm}" class="crm-accordion-wrapper crm-contribution_search_form-accordion {if $rows}collapsed{/if}">
-    <div class="crm-accordion-header crm-master-accordion-header">
+    <div class="crm-accordion-header {if !$votingTab} crm-master-accordion-header{/if}">
     {ts}Edit Search Criteria{/ts}
     </div><!-- /.crm-accordion-header -->
 
index 8650ef30a67957c2f357b140b8a449371d76ca98..7f906611912856821ea5e7245a10c9a29f57065a 100644 (file)
@@ -34,6 +34,7 @@
     {if !$single and $context eq 'Search' }
         <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
     {/if}
+    <th scope="col"></th>
     {foreach from=$columnHeaders item=header}
 
         <th scope="col">
           {assign var=cbName value=$row.checkbox}
           <td>{$form.$cbName.html}</td>
    {/if}
-    <td>{$row.contact_type} &nbsp;<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a></td>
-  <td>{$row.street_number}</td>
-  <td>{$row.street_name}</td>
-  <td>{$row.street_address}</td>
-  <td>{$row.city}</td>
-  <td>{$row.postal_code}</td>
-  <td>{$row.state_province}</td>
-  <td>{$row.country}</td>
-  <td>{$row.email}</td>
-  <td>{$row.phone}</td>
+    <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>
+    <td>{$row.street_number}</td>
+    <td>{$row.street_name}</td>
+    <td>{$row.street_address}</td>
+    <td>{$row.city}</td>
+    <td>{$row.postal_code}</td>
+    <td>{$row.state_province}</td>
+    <td>{$row.country}</td>
+    <td>{$row.email}</td>
+    <td>{$row.phone}</td>
     {/if}
   </tr>
   {/foreach}