1 <div class=
"crm-flex-box">
3 <div class=
"form-inline">
4 <label for=
"crm-search-main-entity">{{:: ts('Search for') }}
</label>
5 <input id=
"crm-search-main-entity" class=
"form-control" ng-model=
"$ctrl.savedSearch.api_entity" crm-ui-select=
"::{allowClear: false, data: entities}" />
7 <div ng-if=
":: $ctrl.paramExists('join')">
8 <fieldset ng-repeat=
"join in $ctrl.savedSearch.api_params.join">
9 <div class=
"form-inline">
10 <label for=
"crm-search-join-{{ $index }}">{{:: ts('With') }}
</label>
11 <input id=
"crm-search-join-{{ $index }}" class=
"form-control" ng-model=
"join[0]" crm-ui-select=
"{placeholder: ' ', data: getJoinEntities}" ng-change=
"changeJoin($index)" />
12 <select class=
"form-control" ng-model=
"join[1]" ng-options=
"o.k as o.v for o in ::joinTypes" ></select>
14 <fieldset class=
"api4-clause-fieldset">
15 <crm-search-clause clauses=
"join" format=
"json" skip=
"2" op=
"AND" label=
"{{ ts('If') }}" fields=
"fieldsForWhere" ></crm-search-clause>
19 <div class=
"form-inline">
20 <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()"/>
24 <fieldset ng-if=
":: $ctrl.paramExists('groupBy')">
25 <div class=
"form-inline" ng-repeat=
"groupBy in $ctrl.savedSearch.api_params.groupBy">
26 <label for=
"crm-search-groupBy-{{ $index }}">{{:: ts('Group By') }}
</label>
27 <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)" />
30 <div class=
"form-inline">
31 <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')"/>
33 <fieldset id=
"crm-search-build-group-aggregate" ng-if=
"$ctrl.savedSearch.api_params.groupBy.length" class=
"crm-collapsible collapsed">
34 <legend class=
"collapsible-title">{{:: ts('Aggregate fields') }}
</legend>
36 <fieldset ng-repeat=
"col in $ctrl.savedSearch.api_params.select" ng-if=
"$ctrl.canAggregate(col)">
37 <crm-search-function expr=
"$ctrl.savedSearch.api_params.select[$index]" cat=
"'aggregate'"></crm-search-function>
44 <fieldset class=
"api4-clause-fieldset">
45 <crm-search-clause clauses=
"$ctrl.savedSearch.api_params.where" format=
"string" op=
"AND" label=
"{{ ts('Where') }}" fields=
"fieldsForWhere" ></crm-search-clause>
47 <fieldset ng-if=
"$ctrl.paramExists('having') && $ctrl.savedSearch.api_params.groupBy.length" class=
"api4-clause-fieldset">
48 <crm-search-clause clauses=
"$ctrl.savedSearch.api_params.having" format=
"string" op=
"AND" label=
"{{ ts('Filter') }}" fields=
"fieldsForHaving" ></crm-search-clause>