Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
2c4c49ca | 3 | | CiviCRM version 4.7 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
fa938177 | 5 | | Copyright CiviCRM LLC (c) 2004-2016 | |
6a488035 TO |
6 | +--------------------------------------------------------------------+ |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
9 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
10 | | under the terms of the GNU Affero General Public License | | |
11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
12 | | | | |
13 | | CiviCRM is distributed in the hope that it will be useful, but | | |
14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
16 | | See the GNU Affero General Public License for more details. | | |
17 | | | | |
18 | | You should have received a copy of the GNU Affero General Public | | |
19 | | License and the CiviCRM Licensing Exception along | | |
20 | | with this program; if not, contact CiviCRM LLC | | |
21 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
22 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
24 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | {* Displays search criteria assigned to $qill variable, for all search forms - basic, advanced, search builder, and component searches. *} | |
27 | {foreach from=$qill name=sets key=setKey item=orClauses} | |
28 | {if $smarty.foreach.sets.total > 2} | |
29 | {* We have multiple criteria sets, so display AND'd items in each set on the same line. *} | |
30 | {if count($orClauses) gt 0} | |
31 | <ul> | |
32 | <li> | |
33 | {foreach from=$orClauses name=criteria item=item} | |
34 | {$item} | |
35 | {if !$smarty.foreach.criteria.last} | |
36 | <span class="font-italic">...{ts}AND{/ts}...</span> | |
37 | {/if} | |
38 | {/foreach} | |
39 | </li> | |
40 | </ul> | |
41 | ||
42 | {* 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. *} | |
43 | {if !$smarty.foreach.sets.last} | |
f813f78e | 44 | <ul class="menu"><li class="no-display"> |
6a488035 TO |
45 | {if $setKey == 0}AND<br /> |
46 | {else}OR<br /> | |
47 | {/if} | |
48 | </li></ul> | |
49 | {/if} | |
50 | {/if} | |
51 | ||
52 | {else} | |
53 | {foreach from=$orClauses name=criteria item=item} | |
54 | <div class="qill"> | |
55 | {$item} | |
56 | {if !$smarty.foreach.criteria.last} | |
57 | {if $operator} | |
58 | <span class="font-italic">...{$operator}...</span> | |
59 | {else} | |
60 | <span class="font-italic">...{ts}AND{/ts}...</span> | |
61 | {/if} | |
62 | {/if} | |
63 | </div> | |
64 | {/foreach} | |
65 | {/if} | |
66 | {/foreach} |