From: Dewy Date: Tue, 5 Dec 2023 12:21:00 +0000 (-0800) Subject: searchui : new screen label format X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4f4776ecc98b10fd0ab3c5033e7431d72f2f7afe;p=civicrm-core.git searchui : new screen label format --- diff --git a/ext/civicrm_search_ui/ang/afsearchLabelFormat.aff.html b/ext/civicrm_search_ui/ang/afsearchLabelFormat.aff.html new file mode 100644 index 0000000000..179435de8c --- /dev/null +++ b/ext/civicrm_search_ui/ang/afsearchLabelFormat.aff.html @@ -0,0 +1,12 @@ +
+
+ +
+
{{:: ts('You can configure one or more Label Formats for your CiviCRM installation. Label Formats are used when creating mailing labels.')}}
+{{:: ts('You can change which fields are printed on each label in')}} {{:: ts('Address Settings')}}.
+
+ + +
+ +
diff --git a/ext/civicrm_search_ui/ang/afsearchLabelFormat.aff.php b/ext/civicrm_search_ui/ang/afsearchLabelFormat.aff.php new file mode 100644 index 0000000000..31058670f3 --- /dev/null +++ b/ext/civicrm_search_ui/ang/afsearchLabelFormat.aff.php @@ -0,0 +1,11 @@ + 'search', + 'title' => E::ts('Label Format form'), + 'description' => E::ts('Label Format form'), + 'icon' => 'fa-list-alt', + 'server_route' => 'civicrm/searchkit_ui/admin/labelFormats', + 'modified_date' => '2023-12-05 04:11:31', +]; diff --git a/ext/civicrm_search_ui/managed/SavedSearch_label_format.mgd.php b/ext/civicrm_search_ui/managed/SavedSearch_label_format.mgd.php new file mode 100644 index 0000000000..3ca6e32d2f --- /dev/null +++ b/ext/civicrm_search_ui/managed/SavedSearch_label_format.mgd.php @@ -0,0 +1,200 @@ + 'SavedSearch_label_format', + 'entity' => 'SavedSearch', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'name' => 'label_format', + 'label' => E::ts('label format'), + 'api_entity' => 'OptionGroup', + 'api_params' => [ + 'version' => 4, + 'select' => [ + 'OptionGroup_OptionValue_option_group_id_01.label', + 'title', + 'description', + 'is_active', + 'is_reserved', + 'OptionGroup_OptionValue_option_group_id_01.grouping', + ], + 'orderBy' => [], + 'where' => [ + [ + 'name', + 'IN', + [ + 'label_format', + 'name_badge', + ], + ], + ], + 'groupBy' => [], + 'join' => [ + [ + 'OptionValue AS OptionGroup_OptionValue_option_group_id_01', + 'LEFT', + [ + 'id', + '=', + 'OptionGroup_OptionValue_option_group_id_01.option_group_id', + ], + ], + ], + 'having' => [], + ], + ], + 'match' => [ + 'name', + ], + ], + ], + [ + 'name' => 'SavedSearch_label_format_SearchDisplay_label_format_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', + 'type' => 'table', + 'settings' => [ + 'description' => '', + 'sort' => [], + 'limit' => 50, + 'pager' => [], + 'placeholder' => 5, + 'columns' => [ + [ + 'type' => 'field', + 'key' => 'OptionGroup_OptionValue_option_group_id_01.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', + 'dataType' => 'String', + 'label' => E::ts('Grouping'), + 'sortable' => TRUE, + ], + [ + 'type' => 'field', + 'key' => 'is_active', + 'dataType' => 'Boolean', + 'label' => E::ts('Enabled'), + 'sortable' => TRUE, + ], + [ + 'type' => 'field', + 'key' => 'is_reserved', + 'dataType' => 'Boolean', + 'label' => E::ts('Reserved'), + 'sortable' => TRUE, + ], + [ + 'size' => 'btn-xs', + 'links' => [ + [ + 'entity' => '', + 'action' => '', + 'join' => '', + 'target' => 'crm-popup', + 'icon' => '', + 'text' => E::ts('Edit'), + 'style' => 'default', + 'path' => 'civicrm/admin/labelFormats?action=update&id=[OptionGroup_OptionValue_option_group_id_01.id]&group=[name]&reset=1', + 'task' => '', + 'condition' => [], + ], + ], + 'type' => 'buttons', + 'alignment' => 'text-right', + ], + [ + 'size' => 'btn-xs', + 'links' => [ + [ + 'entity' => '', + 'action' => '', + 'join' => '', + 'target' => '', + 'icon' => '', + 'text' => E::ts('Copy'), + 'style' => 'default', + 'path' => 'civicrm/admin/labelFormats?action=copy&id=[OptionGroup_OptionValue_option_group_id_01.id]&group=[name]&reset=1', + 'task' => '', + 'condition' => [], + ], + ], + 'type' => 'buttons', + 'alignment' => 'text-right', + ], + [ + 'size' => 'btn-xs', + 'links' => [ + [ + 'entity' => 'OptionValue', + 'action' => 'delete', + 'join' => 'OptionGroup_OptionValue_option_group_id_01', + 'target' => 'crm-popup', + 'icon' => 'fa-trash', + 'text' => E::ts('Delete'), + 'style' => 'danger', + 'path' => '', + 'task' => '', + 'condition' => [ + 'OptionGroup_OptionValue_option_group_id_01.grouping', + '=', + 'Custom', + ], + ], + ], + 'type' => 'buttons', + 'alignment' => 'text-right', + ], + ], + 'actions' => FALSE, + 'classes' => [ + 'table', + 'table-striped', + ], + 'toolbar' => [ + [ + 'action' => '', + 'entity' => '', + 'text' => E::ts('Add Label Format'), + 'icon' => '', + 'style' => 'default', + 'target' => 'crm-popup', + 'join' => '', + 'path' => 'civicrm/admin/labelFormats?action=add&reset=1', + 'task' => '', + 'condition' => [], + ], + ], + ], + ], + 'match' => [ + 'saved_search_id', + 'name', + ], + ], + ], +];