<crm-search-clause clauses="$ctrl.savedSearch.api_params.where" format="string" op="AND" label="{{:: ts('Where') }}" fields="fieldsForWhere" allow-functions="true" ></crm-search-clause>
</fieldset>
<fieldset ng-if="$ctrl.paramExists('having') && $ctrl.savedSearch.api_params.groupBy.length" class="api4-clause-fieldset">
- <crm-search-clause clauses="$ctrl.savedSearch.api_params.having" format="string" op="AND" label="{{:: ts('Having') }}" fields="fieldsForHaving" ></crm-search-clause>
+ <crm-search-clause clauses="$ctrl.savedSearch.api_params.having" format="string" op="AND" label="{{:: ts('Having') }}" help="having" fields="fieldsForHaving" ></crm-search-clause>
</fieldset>
</div>
</div>
savedSearch: '<'
},
templateUrl: '~/crmSearchAdmin/crmSearchAdmin.html',
- controller: function($scope, $element, $location, $timeout, crmApi4, dialogService, searchMeta) {
+ controller: function($scope, $element, $location, $timeout, crmApi4, dialogService, searchMeta, crmUiHelp) {
var ts = $scope.ts = CRM.ts('org.civicrm.search_kit'),
ctrl = this,
afformLoad,
fieldsForJoinGetters = {};
+ $scope.hs = crmUiHelp({file: 'CRM/Search/Help/Compose'});
this.afformEnabled = 'org.civicrm.afform' in CRM.crmSearchAdmin.modules;
this.afformAdminEnabled = (CRM.checkPerm('administer CiviCRM') || CRM.checkPerm('administer afform')) &&
allowFunctions: '<',
skip: '<',
label: '@',
+ help: '@',
hideLabel: '@',
placeholder: '<',
deleteGroup: '&'
},
templateUrl: '~/crmSearchAdmin/crmSearchClause.html',
- controller: function ($scope, $element, searchMeta) {
+ controller: function ($scope, $element, searchMeta, crmUiHelp) {
var ts = $scope.ts = CRM.ts('org.civicrm.search_kit'),
ctrl = this,
meta = {};
this.$onInit = function() {
ctrl.hasParent = !!$element.attr('delete-group');
+ $scope.hs = crmUiHelp({file: 'CRM/Search/Help/Compose'});
};
// Gets the first arg of type "field"
-<legend ng-if="!$ctrl.hideLabel">{{ $ctrl.label || ts('%1 group', {1: $ctrl.conjunctions[$ctrl.op]}) }}</legend>
+<legend ng-if="!$ctrl.hideLabel">
+ {{ $ctrl.label || ts('%1 group', {1: $ctrl.conjunctions[$ctrl.op]}) }}
+ <a ng-if="$ctrl.help" crm-ui-help="hs({id: $ctrl.help, title: $ctrl.label})"></a>
+</legend>
<div class="btn-group btn-group-xs" ng-if=":: $ctrl.hasParent">
<button type="button" class="btn btn-danger-outline" ng-click="$ctrl.deleteGroup()" title="{{:: ts('Remove group') }}">
<i class="crm-i fa-trash" aria-hidden="true"></i>
<input type="checkbox" ng-checked="col.rewrite" ng-click="$ctrl.parent.toggleRewrite(col)" >
{{:: ts('Rewrite Text') }}
</label>
+ <a crm-ui-help="hs({id: 'rewrite', title: ts('Rewrite Text')})"></a>
<textarea rows="2" class="form-control crm-flex-1" ng-if="col.rewrite" ng-model="col.rewrite" ng-model-options="{updateOn: 'blur'}"></textarea>
<crm-search-admin-token-select ng-if="col.rewrite" model="col" field="rewrite" suffix=":label"></crm-search-admin-token-select>
</div>
<input type="checkbox" ng-checked="col.rewrite" ng-click="$ctrl.parent.toggleRewrite(col)" >
{{:: ts('Rewrite HTML') }}
</label>
+ <a crm-ui-help="hs({id: 'rewrite', title: ts('Rewrite HTML')})"></a>
<textarea rows="2" class="form-control crm-flex-1" ng-if="col.rewrite" ng-model="col.rewrite" ng-model-options="{updateOn: 'blur'}"></textarea>
<crm-search-admin-token-select ng-if="col.rewrite" model="col" field="rewrite" suffix=":label"></crm-search-admin-token-select>
</div>
parent: '^crmSearchAdminDisplay'
},
templateUrl: '~/crmSearchAdmin/displays/searchAdminDisplayGrid.html',
- controller: function($scope, searchMeta) {
+ controller: function($scope, searchMeta, crmUiHelp) {
var ts = $scope.ts = CRM.ts('org.civicrm.search_kit'),
ctrl = this;
+ $scope.hs = crmUiHelp({file: 'CRM/Search/Help/Display'});
this.getColTypes = function() {
return ctrl.parent.colTypes;
parent: '^crmSearchAdminDisplay'
},
templateUrl: '~/crmSearchAdmin/displays/searchAdminDisplayList.html',
- controller: function($scope, searchMeta) {
+ controller: function($scope, searchMeta, crmUiHelp) {
var ts = $scope.ts = CRM.ts('org.civicrm.search_kit'),
ctrl = this;
+ $scope.hs = crmUiHelp({file: 'CRM/Search/Help/Display'});
this.getColTypes = function() {
return ctrl.parent.colTypes;
parent: '^crmSearchAdminDisplay'
},
templateUrl: '~/crmSearchAdmin/displays/searchAdminDisplayTable.html',
- controller: function($scope, searchMeta, formatForSelect2) {
+ controller: function($scope, searchMeta, formatForSelect2, crmUiHelp) {
var ts = $scope.ts = CRM.ts('org.civicrm.search_kit'),
ctrl = this;
+ $scope.hs = crmUiHelp({file: 'CRM/Search/Help/Display'});
this.tableClasses = [
{name: 'table', label: ts('Row Borders')},
--- /dev/null
+{htxt id="having"}
+ <p>{ts}Unlike the WHERE clause which filters data in the database, HAVING filters the results shown in the table. This allows filtering of aggregate data or field transformations.{/ts}</p>
+ <p>{ts}Note: Rewrite occurs after HAVING has been applied, so does not affect the HAVING filter.{/ts}</p>
+{/htxt}
--- /dev/null
+{htxt id="rewrite"}
+ <p>{ts}Both search tokens and smarty tags are supported when rewriting fields.{/ts}</p>
+{/htxt}