Merge pull request #15927 from eileenmcnaughton/event_form
[civicrm-core.git] / templates / CRM / common / displaySearchCriteria.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {* Displays search criteria assigned to $qill variable, for all search forms - basic, advanced, search builder, and component searches. *}
11 {foreach from=$qill name=sets key=setKey item=orClauses}
12 {if $smarty.foreach.sets.total > 2}
13 {* We have multiple criteria sets, so display AND'd items in each set on the same line. *}
14 {if count($orClauses) gt 0}
15 <ul>
16 <li>
17 {foreach from=$orClauses name=criteria item=item}
18 {$item|escape}
19 {if !$smarty.foreach.criteria.last}
20 <span class="font-italic">...{ts}AND{/ts}...</span>
21 {/if}
22 {/foreach}
23 </li>
24 </ul>
25
26 {* If there's a criteria set with key=0, this set is AND'd with other sets (if any). Otherwise, multiple sets are OR'd together. *}
27 {if !$smarty.foreach.sets.last}
28 <ul class="menu"><li class="no-display">
29 {if $setKey == 0}AND<br />
30 {else}OR<br />
31 {/if}
32 </li></ul>
33 {/if}
34 {/if}
35
36 {else}
37 {foreach from=$orClauses name=criteria item=item}
38 <div class="qill">
39 {$item|escape}
40 {if !$smarty.foreach.criteria.last}
41 {if $operator}
42 <span class="font-italic">...{$operator|escape}...</span>
43 {else}
44 <span class="font-italic">...{ts}AND{/ts}...</span>
45 {/if}
46 {/if}
47 </div>
48 {/foreach}
49 {/if}
50 {/foreach}