1 <div class=
"crm-flex-box">
3 <div ng-if=
":: $ctrl.paramExists('join')">
4 <fieldset ng-repeat=
"join in $ctrl.savedSearch.api_params.join">
5 <div class=
"form-inline">
6 <label for=
"crm-search-join-{{ $index }}">{{:: ts('With') }}
</label>
7 <input id=
"crm-search-join-{{ $index }}" class=
"form-control" ng-model=
"join[0]" crm-ui-select=
"{placeholder: ' ', data: getJoinEntities}" ng-change=
"changeJoin($index)" />
8 <select class=
"form-control" ng-model=
"join[1]" ng-options=
"o.k as o.v for o in ::joinTypes" ></select>
10 <fieldset class=
"api4-clause-fieldset">
11 <crm-search-clause clauses=
"join" format=
"json" skip=
"2" op=
"AND" label=
"{{ ts('If') }}" fields=
"fieldsForWhere" ></crm-search-clause>
15 <div class=
"form-inline">
16 <input id=
"crm-search-add-join" class=
"form-control crm-action-menu fa-plus" ng-model=
"controls.join" crm-ui-select=
"{placeholder: ts('With'), data: getJoinEntities}" ng-change=
"addJoin()"/>
20 <fieldset ng-if=
":: $ctrl.paramExists('groupBy')">
21 <div class=
"form-inline" ng-repeat=
"groupBy in $ctrl.savedSearch.api_params.groupBy">
22 <label for=
"crm-search-groupBy-{{ $index }}">{{:: ts('Group By') }}
</label>
23 <input id=
"crm-search-groupBy-{{ $index }}" class=
"form-control" ng-model=
"$ctrl.savedSearch.api_params.groupBy[$index]" crm-ui-select=
"{placeholder: ' ', data: fieldsForGroupBy}" ng-change=
"changeGroupBy($index)" />
26 <div class=
"form-inline">
27 <input id=
"crm-search-add-groupBy" class=
"form-control crm-action-menu fa-plus" ng-model=
"controls.groupBy" crm-ui-select=
"{placeholder: ts('Group By'), data: fieldsForGroupBy}" ng-change=
"addParam('groupBy')"/>
29 <fieldset id=
"crm-search-build-group-aggregate" ng-if=
"$ctrl.savedSearch.api_params.groupBy.length" class=
"crm-collapsible collapsed">
30 <legend class=
"collapsible-title">{{:: ts('Aggregate fields') }}
</legend>
32 <fieldset ng-repeat=
"col in $ctrl.savedSearch.api_params.select" ng-if=
"$ctrl.canAggregate(col)">
33 <crm-search-function expr=
"$ctrl.savedSearch.api_params.select[$index]" cat=
"'aggregate'"></crm-search-function>
40 <fieldset class=
"api4-clause-fieldset">
41 <crm-search-clause clauses=
"$ctrl.savedSearch.api_params.where" format=
"string" op=
"AND" label=
"{{ ts('Where') }}" fields=
"fieldsForWhere" ></crm-search-clause>
43 <fieldset ng-if=
"$ctrl.paramExists('having') && $ctrl.savedSearch.api_params.groupBy.length" class=
"api4-clause-fieldset">
44 <crm-search-clause clauses=
"$ctrl.savedSearch.api_params.having" format=
"string" op=
"AND" label=
"{{ ts('Filter') }}" fields=
"fieldsForHaving" ></crm-search-clause>