_.each(CRM.crmSearchAdmin.displayTypes, function(type) {
html +=
'<div ng-switch-when="' + type.id + '">\n' +
+ ' <div class="help-block"><i class="crm-i ' + type.icon + '"></i> ' + _.escape(type.description) + '</div>' +
' <search-admin-display-' + type.id + ' api-entity="$ctrl.savedSearch.api_entity" api-params="$ctrl.savedSearch.api_params" display="$ctrl.display"></search-admin-display-' + type.id + '>\n' +
' <hr>\n' +
' <button type="button" class="btn btn-{{ !$ctrl.stale ? \'success\' : $ctrl.preview ? \'warning\' : \'primary\' }}" ng-click="$ctrl.previewDisplay()" ng-disabled="!$ctrl.stale">\n' +
<i class="crm-i fa-plus"></i> {{:: ts('Add...') }} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
- <li ng-if="!$ctrl.savedSearch.groups.length">
+ <li ng-if="!$ctrl.savedSearch.groups.length" title="{{:: ts('Smart group of contacts based on search results') }}">
<a href ng-click="$ctrl.addGroup()">
<i class="crm-i fa-users"></i>
{{:: ts('Smart Group') }}
</li>
<li class="dropdown-header">{{:: ts('Display') }}</li>
<li ng-repeat="type in ::$ctrl.displayTypes">
- <a href ng-click="$ctrl.addDisplay(type.id)">
+ <a href ng-click="$ctrl.addDisplay(type.id)" title="{{:: type.description }}">
<i class="crm-i {{:: type.icon }}"></i>
{{:: type.label }}
</a>
'version' => 4,
'values' => [
'name' => 'search_display_type',
- 'title' => 'Search Display Type',
+ 'title' => E::ts('Search Display Type'),
'is_reserved' => TRUE,
'is_active' => TRUE,
'option_value_fields' => [
'value' => 'table',
'name' => 'crm-search-display-table',
'label' => E::ts('Table'),
+ 'description' => E::ts('A table displays results in rows and columns, with an optional pager and selectable actions. The styling of rows and columns is highly configurable.'),
'icon' => 'fa-table',
'is_reserved' => TRUE,
'is_active' => TRUE,
'value' => 'list',
'name' => 'crm-search-display-list',
'label' => E::ts('List'),
+ 'description' => E::ts('Lists are highly flexible and display results on one or more lines. Each field can be styled differently or given a custom css class.'),
'icon' => 'fa-list',
'is_reserved' => TRUE,
'is_active' => TRUE,
'value' => 'grid',
'name' => 'crm-search-display-grid',
'label' => E::ts('Grid'),
+ 'description' => E::ts('Grid displays are useful for image gallery thumbnails and other content to show side-by side.'),
'icon' => 'fa-th',
'is_reserved' => TRUE,
'is_active' => TRUE,
'value' => 'autocomplete',
'name' => 'crm-search-display-autocomplete',
'label' => E::ts('Autocomplete'),
+ 'description' => E::ts('Autocompletes are form fields that give results from this search as the user types. Creating a display is optional and allows customization of how each result appears in the dropdown.'),
'icon' => 'fa-keyboard-o',
'is_reserved' => TRUE,
'is_active' => TRUE,