From: Aidan Saunders Date: Thu, 7 Dec 2023 23:01:36 +0000 (+0000) Subject: Label formats v2 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8bcde0aec7b05ce760887474c4c0208a019d31db;p=civicrm-core.git Label formats v2 --- diff --git a/ext/civicrm_admin_ui/ang/afsearchLabelFormat.aff.html b/ext/civicrm_admin_ui/ang/afsearchLabelFormat.aff.html deleted file mode 100644 index e66ad29350..0000000000 --- a/ext/civicrm_admin_ui/ang/afsearchLabelFormat.aff.html +++ /dev/null @@ -1,14 +0,0 @@ -
-
- - -
-
{{:: 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_admin_ui/ang/afsearchLabelFormats.aff.html b/ext/civicrm_admin_ui/ang/afsearchLabelFormats.aff.html new file mode 100644 index 0000000000..ddccba5e90 --- /dev/null +++ b/ext/civicrm_admin_ui/ang/afsearchLabelFormats.aff.html @@ -0,0 +1,20 @@ +
+ +
{{:: 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_admin_ui/ang/afsearchLabelFormat.aff.php b/ext/civicrm_admin_ui/ang/afsearchLabelFormats.aff.php similarity index 74% rename from ext/civicrm_admin_ui/ang/afsearchLabelFormat.aff.php rename to ext/civicrm_admin_ui/ang/afsearchLabelFormats.aff.php index d0d3f0d498..fda5b7c984 100644 --- a/ext/civicrm_admin_ui/ang/afsearchLabelFormat.aff.php +++ b/ext/civicrm_admin_ui/ang/afsearchLabelFormats.aff.php @@ -4,11 +4,10 @@ use CRM_CivicrmAdminUi_ExtensionUtil as E; return [ 'type' => 'search', 'title' => E::ts('Label Formats'), - 'description' => E::ts('Label Formats'), 'icon' => 'fa-list-alt', 'server_route' => 'civicrm/admin/labelFormats', 'permission' => [ 'administer CiviCRM', ], - 'modified_date' => '2023-12-06 18:52:54', + 'modified_date' => '2023-12-07 22:54:39', ]; diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_label_format.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Label_Formats.mgd.php similarity index 62% rename from ext/civicrm_admin_ui/managed/SavedSearch_label_format.mgd.php rename to ext/civicrm_admin_ui/managed/SavedSearch_Label_Formats.mgd.php index 406f8750c5..755a9b3c9f 100644 --- a/ext/civicrm_admin_ui/managed/SavedSearch_label_format.mgd.php +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Label_Formats.mgd.php @@ -3,30 +3,29 @@ use CRM_CivicrmAdminUi_ExtensionUtil as E; 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', @@ -35,17 +34,7 @@ return [ ], ], 'groupBy' => [], - 'join' => [ - [ - 'OptionValue AS OptionGroup_OptionValue_option_group_id_01', - 'LEFT', - [ - 'id', - '=', - 'OptionGroup_OptionValue_option_group_id_01.option_group_id', - ], - ], - ], + 'join' => [], 'having' => [], ], ], @@ -55,52 +44,43 @@ return [ ], ], [ - '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, @@ -110,7 +90,7 @@ return [ 'icon' => 'fa-check', 'side' => 'left', 'if' => [ - 'OptionGroup_OptionValue_option_group_id_01.is_default', + 'is_default', '=', TRUE, ], @@ -119,9 +99,9 @@ return [ ], [ '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, ], [ @@ -138,37 +118,37 @@ return [ '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', @@ -180,21 +160,21 @@ return [ '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' => [