-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24512 from colemanw/contactTypeSearch
AdminUI - Add SearchKit-based screen for Administer Contact Types
- Loading branch information
Showing
22 changed files
with
284 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div af-fieldset=""> | ||
<div class="af-markup"> | ||
<div class="help"> | ||
{{:: ts('CiviCRM comes with 3 basic (built-in) contact types: Individual, Household, and Organization. You can create additional contact types based on these basic types to further differentiate contacts (for example you might create Student, Parent, Staff, and /or Volunteer "subtypes" from the basic Individual type...). You can also re-name the built-in types. Contact subtypes are especially useful when you need to collect and display different sets of custom data for different types of contacts.') }} | ||
<a href="https://docs.civicrm.org/user/en/latest/organising-your-data/contacts/" target="_blank" class="crm-doc-link no-popup">{{:: ts('Learn more...') }}</a> | ||
</div> | ||
</div> | ||
<crm-search-display-table search-name="Administer_Contact_Types" display-name="Contact_Types_Table"></crm-search-display-table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "search", | ||
"title": "Contact Types", | ||
"description": "Administer contact types and sub-types", | ||
"icon": "fa-list-alt", | ||
"server_route": "civicrm/admin/options/subtype", | ||
"permission": "access CiviCRM" | ||
} |
151 changes: 151 additions & 0 deletions
151
ext/civicrm_admin_ui/managed/SavedSearch_Administer_Contact_Types.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
<?php | ||
return [ | ||
[ | ||
'name' => 'SavedSearch_Administer_Contact_Types', | ||
'entity' => 'SavedSearch', | ||
'cleanup' => 'always', | ||
'update' => 'unmodified', | ||
'params' => [ | ||
'version' => 4, | ||
'values' => [ | ||
'name' => 'Administer_Contact_Types', | ||
'label' => 'Administer Contact Types', | ||
'form_values' => NULL, | ||
'mapping_id' => NULL, | ||
'search_custom_id' => NULL, | ||
'api_entity' => 'ContactType', | ||
'api_params' => [ | ||
'version' => 4, | ||
'select' => [ | ||
'label', | ||
'parent_id:label', | ||
'description', | ||
], | ||
'orderBy' => [], | ||
'where' => [], | ||
'groupBy' => [], | ||
'join' => [], | ||
'having' => [], | ||
], | ||
'expires_date' => NULL, | ||
'description' => NULL, | ||
], | ||
], | ||
], | ||
[ | ||
'name' => 'SavedSearch_Administer_Contact_Types_SearchDisplay_Contact_Types_Table', | ||
'entity' => 'SearchDisplay', | ||
'cleanup' => 'always', | ||
'update' => 'unmodified', | ||
'params' => [ | ||
'version' => 4, | ||
'values' => [ | ||
'name' => 'Contact_Types_Table', | ||
'label' => 'Contact Types Table', | ||
'saved_search_id.name' => 'Administer_Contact_Types', | ||
'type' => 'table', | ||
'settings' => [ | ||
'actions' => FALSE, | ||
'limit' => 50, | ||
'classes' => [ | ||
'table', | ||
'table-striped', | ||
], | ||
'pager' => [ | ||
'show_count' => TRUE, | ||
], | ||
'placeholder' => 5, | ||
'sort' => [ | ||
[ | ||
'parent_id:label', | ||
'ASC', | ||
], | ||
[ | ||
'label', | ||
'ASC', | ||
], | ||
], | ||
'columns' => [ | ||
[ | ||
'type' => 'field', | ||
'key' => 'label', | ||
'dataType' => 'String', | ||
'label' => 'Label', | ||
'sortable' => TRUE, | ||
'icons' => [ | ||
[ | ||
'field' => 'icon', | ||
'side' => 'left', | ||
], | ||
], | ||
'editable' => TRUE, | ||
], | ||
[ | ||
'type' => 'field', | ||
'key' => 'parent_id:label', | ||
'dataType' => 'Integer', | ||
'label' => 'Parent', | ||
'sortable' => TRUE, | ||
'icons' => [ | ||
[ | ||
'icon' => 'fa-lock', | ||
'side' => 'left', | ||
'if' => [ | ||
'parent_id:label', | ||
'IS EMPTY', | ||
], | ||
], | ||
], | ||
], | ||
[ | ||
'type' => 'field', | ||
'key' => 'description', | ||
'dataType' => 'Text', | ||
'label' => 'Description', | ||
'sortable' => TRUE, | ||
'editable' => TRUE, | ||
], | ||
[ | ||
'size' => 'btn-sm', | ||
'links' => [ | ||
[ | ||
'entity' => 'ContactType', | ||
'action' => 'update', | ||
'join' => '', | ||
'target' => 'crm-popup', | ||
'icon' => 'fa-pencil', | ||
'text' => 'Edit', | ||
'style' => 'default', | ||
'path' => '', | ||
'condition' => [], | ||
], | ||
[ | ||
'entity' => 'ContactType', | ||
'action' => 'delete', | ||
'join' => '', | ||
'target' => 'crm-popup', | ||
'icon' => 'fa-trash', | ||
'text' => 'Delete', | ||
'style' => 'danger', | ||
'path' => '', | ||
'condition' => [ | ||
'parent_id:label', | ||
'IS NOT EMPTY', | ||
], | ||
], | ||
], | ||
'type' => 'buttons', | ||
'alignment' => 'text-right', | ||
], | ||
], | ||
'addButton' => [ | ||
'path' => 'civicrm/admin/options/subtype/edit?action=add&reset=1', | ||
'text' => 'Add Contact Type', | ||
'icon' => 'fa-plus', | ||
], | ||
], | ||
'acl_bypass' => FALSE, | ||
], | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.