Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
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 | | |
6a488035 TO |
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} | |
c7c37e53 | 18 | {$item|escape} |
6a488035 TO |
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} | |
f813f78e | 28 | <ul class="menu"><li class="no-display"> |
6a488035 TO |
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"> | |
c7c37e53 | 39 | {$item|escape} |
6a488035 TO |
40 | {if !$smarty.foreach.criteria.last} |
41 | {if $operator} | |
c7c37e53 | 42 | <span class="font-italic">...{$operator|escape}...</span> |
6a488035 TO |
43 | {else} |
44 | <span class="font-italic">...{ts}AND{/ts}...</span> | |
45 | {/if} | |
46 | {/if} | |
47 | </div> | |
48 | {/foreach} | |
49 | {/if} | |
50 | {/foreach} |