1 <div class=
"crm-flex-box">
2 <div class=
"crm-search-criteria-column">
3 <div ng-if=
":: $ctrl.paramExists('join')">
4 <fieldset ng-repeat=
"join in $ctrl.savedSearch.api_params.join">
5 <div class=
"form-inline">
6 <select class=
"form-control" ng-model=
"join[1]" ng-change=
"$ctrl.changeJoinType(join)" ng-options=
"o.k as o.v for o in ::joinTypes" ></select>
7 <input id=
"crm-search-join-{{ $index }}" class=
"form-control huge" ng-model=
"join[0]" crm-ui-select=
"{placeholder: ' ', data: getJoinEntities}" disabled
>
8 <button type=
"button" class=
"btn btn-xs btn-danger-outline" ng-click=
"$ctrl.removeJoin($index)" title=
"{{:: ts('Remove join') }}">
9 <i class=
"crm-i fa-trash" aria-hidden=
"true"></i>
12 <div class=
"api4-clause-fieldset">
13 <crm-search-clause clauses=
"join" format=
"json" skip=
"2 + getJoin(join[0]).conditions.length" op=
"AND" label=
"{{:: ts('If') }}" hide-label=
"true" placeholder=
"ts('Add Condition')" fields=
"fieldsForJoin(join[0])" ></crm-search-clause>
17 <div class=
"form-inline">
18 <select class=
"form-control" ng-model=
"controls.joinType" ng-options=
"o.k as o.v for o in ::joinTypes" ></select>
19 <input id=
"crm-search-add-join"
20 class=
"form-control crm-action-menu fa-plus"
21 crm-ui-select=
"{placeholder: ts('Entity'), data: getJoinEntities, dropdownCss: {width: '275px'}}"
22 on-crm-ui-select=
"$ctrl.addJoin(selection)">
26 <fieldset ng-if=
":: $ctrl.paramExists('groupBy')">
27 <div class=
"form-inline" ng-repeat=
"groupBy in $ctrl.savedSearch.api_params.groupBy">
28 <label for=
"crm-search-groupBy-{{ $index }}">{{:: ts('Group By') }}
</label>
29 <input id=
"crm-search-groupBy-{{ $index }}" class=
"form-control huge" ng-model=
"$ctrl.savedSearch.api_params.groupBy[$index]" crm-ui-select=
"{placeholder: ' ', data: fieldsForGroupBy}" ng-change=
"changeGroupBy($index)" />
32 <div class=
"form-inline">
33 <input id=
"crm-search-add-groupBy"
34 class=
"form-control crm-action-menu fa-plus"
35 crm-ui-select=
"{placeholder: ts('Group By'), data: fieldsForGroupBy, dropdownCss: {width: '300px'}}"
36 on-crm-ui-select=
"$ctrl.addParam('groupBy', selection)" >
38 <fieldset id=
"crm-search-build-functions">
39 <legend ng-click=
"controls.showFunctions = !controls.showFunctions">
40 <i class=
"crm-i fa-caret-{{ !controls.showFunctions ? 'right' : 'down' }}"></i>
41 {{:: ts('Field Transformations') }}
43 <div ng-if=
"!!controls.showFunctions">
44 <fieldset ng-repeat=
"col in $ctrl.savedSearch.api_params.select">
45 <crm-search-function expr=
"$ctrl.savedSearch.api_params.select[$index]"></crm-search-function>
51 <div class=
"crm-search-criteria-column">
52 <fieldset class=
"api4-clause-fieldset">
53 <crm-search-clause clauses=
"$ctrl.savedSearch.api_params.where" format=
"string" op=
"AND" label=
"{{:: ts('Where') }}" fields=
"fieldsForWhere" ></crm-search-clause>
55 <fieldset ng-if=
"$ctrl.paramExists('having') && $ctrl.savedSearch.api_params.groupBy.length" class=
"api4-clause-fieldset">
56 <crm-search-clause clauses=
"$ctrl.savedSearch.api_params.having" format=
"string" op=
"AND" label=
"{{:: ts('Having') }}" fields=
"fieldsForHaving" ></crm-search-clause>