Updates to Label Format display
authorAidan Saunders <aidan.saunders@squiffle.uk>
Wed, 6 Dec 2023 19:03:04 +0000 (19:03 +0000)
committerAidan Saunders <aidan.saunders@squiffle.uk>
Wed, 6 Dec 2023 19:03:04 +0000 (19:03 +0000)
ext/civicrm_search_ui/ang/afsearchLabelFormat.aff.html
ext/civicrm_search_ui/ang/afsearchLabelFormat.aff.php
ext/civicrm_search_ui/managed/SavedSearch_label_format.mgd.php

index 179435de8c1ad8be883194ef9752b22da0a0888b..e66ad293501a5937a6fc2643be7cda149053098c 100644 (file)
@@ -1,12 +1,14 @@
 <div af-fieldset="">
   <div class="af-markup">
     
+    
     <div class="help">
     <div>{{:: ts('You can configure one or more Label Formats for your CiviCRM installation. Label Formats are used when creating mailing labels.')}}<br/>
 {{:: ts('You can change which fields are printed on each label in')}} <a href="/civicrm/admin/setting/preferences/address?reset=1">{{:: ts('Address Settings')}}</a>.</div>
     </div>
 
   
+  
   </div>
   <crm-search-display-table search-name="label_format" display-name="label_format_Table_1"></crm-search-display-table>
 </div>
index 31058670f3ecfc192c31d5f680371fe10af041ff..88742dfb1b29bd3df89470f6892bfa182dca1150 100644 (file)
@@ -3,9 +3,12 @@ use CRM_CivicrmSearchUi_ExtensionUtil as E;
 
 return [
   'type' => 'search',
-  'title' => E::ts('Label Format form'),
-  'description' => E::ts('Label Format form'),
+  'title' => E::ts('Label Formats'),
+  'description' => E::ts('Label Formats'),
   'icon' => 'fa-list-alt',
   'server_route' => 'civicrm/searchkit_ui/admin/labelFormats',
-  'modified_date' => '2023-12-05 04:11:31',
+  'permission' => [
+    'administer CiviCRM',
+  ],
+  'modified_date' => '2023-12-06 18:52:54',
 ];
index 3ca6e32d2f29914dcec8610b5eb48458350cfb56..0a225004fbf95fea5d92898828bfad38e6649ad3 100644 (file)
@@ -19,9 +19,9 @@ return [
             'OptionGroup_OptionValue_option_group_id_01.label',
             'title',
             'description',
-            'is_active',
             'is_reserved',
             'OptionGroup_OptionValue_option_group_id_01.grouping',
+            'OptionGroup_OptionValue_option_group_id_01.is_default',
           ],
           'orderBy' => [],
           'where' => [
@@ -70,7 +70,11 @@ return [
           'description' => '',
           'sort' => [],
           'limit' => 50,
-          'pager' => [],
+          'pager' => [
+            'show_count' => FALSE,
+            'expose_limit' => FALSE,
+            'hide_single' => TRUE,
+          ],
           'placeholder' => 5,
           'columns' => [
             [
@@ -96,10 +100,22 @@ return [
             ],
             [
               'type' => 'field',
-              'key' => 'is_active',
+              'key' => 'OptionGroup_OptionValue_option_group_id_01.is_default',
               'dataType' => 'Boolean',
-              'label' => E::ts('Enabled'),
+              'label' => E::ts('Default'),
               'sortable' => TRUE,
+              'rewrite' => '{ }',
+              'icons' => [
+                [
+                  'icon' => 'fa-check',
+                  'side' => 'left',
+                  'if' => [
+                    'OptionGroup_OptionValue_option_group_id_01.is_default',
+                    '=',
+                    TRUE,
+                  ],
+                ],
+              ],
             ],
             [
               'type' => 'field',
@@ -109,64 +125,37 @@ return [
               'sortable' => TRUE,
             ],
             [
+              'text' => '',
+              'style' => 'default',
               'size' => 'btn-xs',
+              'icon' => 'fa-bars',
               'links' => [
                 [
                   'entity' => '',
                   'action' => '',
                   'join' => '',
                   'target' => 'crm-popup',
-                  'icon' => '',
+                  'icon' => 'fa-pencil',
                   'text' => E::ts('Edit'),
                   'style' => 'default',
-                  'path' => 'civicrm/admin/labelFormats?action=update&id=[OptionGroup_OptionValue_option_group_id_01.id]&group=[name]&reset=1',
+                  'path' => 'civicrm/admin/labelFormats/edit?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' => '',
+                  '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',
-                  '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',
-                  ],
+                  'entity' => '',
+                  'action' => '',
+                  'join' => '',
+                  'target' => 'crm-popup',
                 ],
               ],
-              'type' => 'buttons',
+              'type' => 'menu',
               'alignment' => 'text-right',
             ],
           ],
@@ -184,11 +173,12 @@ return [
               'style' => 'default',
               'target' => 'crm-popup',
               'join' => '',
-              'path' => 'civicrm/admin/labelFormats?action=add&reset=1',
+              'path' => 'civicrm/admin/labelFormats/edit?action=add&reset=1',
               'task' => '',
               'condition' => [],
             ],
           ],
+          'headerCount' => FALSE,
         ],
       ],
       'match' => [