return [
[
- 'name' => 'SavedSearch_label_format',
+ 'name' => 'SavedSearch_Label_Formats',
'entity' => 'SavedSearch',
'cleanup' => 'unused',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
- 'name' => 'label_format',
- 'label' => E::ts('Label Format'),
- 'api_entity' => 'OptionGroup',
+ 'name' => 'Label_Formats',
+ 'label' => E::ts('Label Formats'),
+ 'api_entity' => 'OptionValue',
'api_params' => [
'version' => 4,
'select' => [
- 'OptionGroup_OptionValue_option_group_id_01.label',
- 'title',
- 'description',
- 'OptionGroup_OptionValue_option_group_id_01.is_reserved',
- 'OptionGroup_OptionValue_option_group_id_01.grouping',
- 'OptionGroup_OptionValue_option_group_id_01.is_default',
+ 'label',
+ 'option_group_id:label',
+ 'grouping',
+ 'is_default',
+ 'is_reserved',
],
'orderBy' => [],
'where' => [
[
- 'name',
+ 'option_group_id:name',
'IN',
[
'label_format',
],
],
'groupBy' => [],
- 'join' => [
- [
- 'OptionValue AS OptionGroup_OptionValue_option_group_id_01',
- 'LEFT',
- [
- 'id',
- '=',
- 'OptionGroup_OptionValue_option_group_id_01.option_group_id',
- ],
- ],
- ],
+ 'join' => [],
'having' => [],
],
],
],
],
[
- 'name' => 'SavedSearch_label_format_SearchDisplay_label_format_Table_1',
+ 'name' => 'SavedSearch_Label_Formats_SearchDisplay_Label_Formats_Table_1',
'entity' => 'SearchDisplay',
'cleanup' => 'unused',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
- 'name' => 'label_format_Table_1',
- 'label' => E::ts('Label Format Table 1'),
- 'saved_search_id.name' => 'label_format',
+ 'name' => 'Label_Formats_Table_1',
+ 'label' => E::ts('Label Formats Table 1'),
+ 'saved_search_id.name' => 'Label_Formats',
'type' => 'table',
'settings' => [
- 'description' => '',
+ 'description' => NULL,
'sort' => [],
'limit' => 50,
'pager' => [
- 'show_count' => FALSE,
- 'expose_limit' => FALSE,
'hide_single' => TRUE,
],
'placeholder' => 5,
'columns' => [
[
'type' => 'field',
- 'key' => 'OptionGroup_OptionValue_option_group_id_01.label',
+ 'key' => 'label',
'dataType' => 'String',
'label' => E::ts('Name'),
'sortable' => TRUE,
],
[
'type' => 'field',
- 'key' => 'title',
- 'dataType' => 'String',
- 'label' => E::ts('Used for'),
- 'sortable' => TRUE,
- ],
- [
- 'type' => 'field',
- 'key' => 'OptionGroup_OptionValue_option_group_id_01.grouping',
+ 'key' => 'grouping',
'dataType' => 'String',
'label' => E::ts('Grouping'),
'sortable' => TRUE,
],
[
'type' => 'field',
- 'key' => 'OptionGroup_OptionValue_option_group_id_01.is_default',
+ 'key' => 'is_default',
'dataType' => 'Boolean',
'label' => E::ts('Default'),
'sortable' => TRUE,
'icon' => 'fa-check',
'side' => 'left',
'if' => [
- 'OptionGroup_OptionValue_option_group_id_01.is_default',
+ 'is_default',
'=',
TRUE,
],
],
[
'type' => 'field',
- 'key' => 'OptionGroup_OptionValue_option_group_id_01.is_reserved',
+ 'key' => 'is_reserved',
'dataType' => 'Boolean',
- 'label' => E::ts('Reserved'),
+ 'label' => E::ts('Reserved?'),
'sortable' => TRUE,
],
[
'icon' => 'fa-pencil',
'text' => E::ts('Edit'),
'style' => 'default',
- 'path' => 'civicrm/admin/labelFormats/edit?action=update&id=[OptionGroup_OptionValue_option_group_id_01.id]&group=[name]&reset=1',
+ 'path' => 'civicrm/admin/labelFormats/edit?action=update&id=[id]&group=[option_group_id:name]&reset=1',
'task' => '',
'condition' => [],
],
[
- 'path' => 'civicrm/admin/labelFormats/edit?action=copy&id=[OptionGroup_OptionValue_option_group_id_01.id]&group=[name]&reset=1',
- 'icon' => 'fa-clone',
- 'text' => E::ts('Copy'),
- 'style' => 'default',
- 'condition' => [],
- 'task' => '',
'entity' => '',
'action' => '',
'join' => '',
'target' => 'crm-popup',
+ 'icon' => 'fa-clone',
+ 'text' => E::ts('Copy'),
+ 'style' => 'default',
+ 'path' => 'civicrm/admin/labelFormats/edit?action=copy&id=[id]&group=[option_group_id:name]&reset=1',
+ 'task' => '',
+ 'condition' => [],
],
[
- 'entity' => 'OptionValue',
- 'action' => 'delete',
- 'join' => 'OptionGroup_OptionValue_option_group_id_01',
- 'target' => 'crm-popup',
- 'icon' => 'fa-trash',
+ 'path' => 'civicrm/admin/labelFormats/edit?action=delete&id=[id]&group=[option_group_id:name]&reset=1',
+ 'icon' => 'fa-trash-o',
'text' => E::ts('Delete'),
'style' => 'danger',
- 'path' => '',
- 'task' => '',
'condition' => [
- 'OptionGroup_OptionValue_option_group_id_01.is_reserved',
+ 'is_reserved',
'=',
FALSE,
],
+ 'task' => '',
+ 'entity' => '',
+ 'action' => '',
+ 'join' => '',
+ 'target' => 'crm-popup',
],
],
'type' => 'menu',
'table',
'table-striped',
],
+ 'draggable' => 'weight',
'toolbar' => [
[
- 'action' => '',
- 'entity' => '',
- 'text' => E::ts('Add Label Format'),
- 'icon' => '',
+ 'path' => 'civicrm/admin/labelFormats/edit?action=add&id=[id]&group=[option_group_id:name]&reset=1',
+ 'icon' => 'fa-plus',
+ 'text' => E::ts('Add'),
'style' => 'default',
- 'target' => 'crm-popup',
- 'join' => '',
- 'path' => 'civicrm/admin/labelFormats/edit?action=add&reset=1',
- 'task' => '',
'condition' => [],
+ 'task' => '',
+ 'entity' => '',
+ 'action' => '',
+ 'join' => '',
+ 'target' => 'crm-popup',
],
],
- 'headerCount' => FALSE,
],
],
'match' => [