Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) Convert Administer Option Groups/Values partially to SK #25180

Closed
wants to merge 3 commits into from

Conversation

aydun
Copy link
Contributor

@aydun aydun commented Dec 15, 2022

Overview

This moves the listing of Option Groups and Option Values in the Administer menus to SearchKit.

Viewing of individual Option Groups & Values is still done by the old forms as is creation of new Groups & Values.

Before

civicrm/admin/options and related links all handled by old world

After

civicrm/admin/options and some related links handled by SearchKit

Technical Details

This tries to allow OptionGroups and OptionValues to be listed via SearchKit

Some OptionGroups have paths (defined in xml) for specific handling.
CRM_Admin_Page_Options is called many ways. The intent is to allow
those with non-specific handling to be processed via SearchKit while others
go through the legacy route. Hopefully most of the special handling can be removed in a later phase.

It does this by creating alias URL's for civicrm/admin/options/{edit,add,update,delete}
With the extension enabled, civicrm/admin/options provides the
OptionGroup listing.
OptionValue links go to civicrm/admin/options/edit and handled by SearchKit -
unless they have special handling in which case they go to the legacy
URL's. The appropriate link is determined by a new Calculated Field
OptionGroup.edit_link

Comments

  1. OptionGroup descriptions have been added to the description field but we need a way to display that in the help text area. See Add Option Group descriptions from templates/CRM/Admin/Page/Options.tpl #25143
  2. The Add OptionValue button is not working as the [option_group_id] token is not replaced. This is working in the comparable Add CustomField display but there's some magic missing!
  3. It needs liberal sprinkling of ts()'s but we probably need other changes.

Enhance OptionGroup metadata
Make view, add, edit options work via `civicrm/admin/options/edit` URL
@civibot
Copy link

civibot bot commented Dec 15, 2022

(Standard links)

@civibot civibot bot added the master label Dec 15, 2022
@aydun
Copy link
Contributor Author

aydun commented Dec 15, 2022

@colemanw Here's a first attempt at disentangling some of the OptionGroup/OptionValue complexity and moving it to SearchKit. Does the approach make sense?

Some OptionGroups have paths (defined in xml) for specific handling.
CRM_Admin_Page_Options is called many ways.  The intent is to allow
those with non-specific handling to be processed via SK while others
go through the legacy route.

It does this by creating alias URL's for civicrm/admin/options/{edit,add,update,delete}
With the extension enabled, 'civicrm/admin/options' provides the
OptionGroup listing.
OptionValue links go to 'civicrm/admin/options/edit' and handled by SK -
unless they have special handling in which case they go to the legacy
URL's.  The appropriate link is determined by a new Calculated Field
OptionGroup.edit_link
@colemanw
Copy link
Member

@aydun there's a lot going on here but what about a PR just for updating the OptionGroup DAO metadata.

aydun added a commit to aydun/civicrm-core that referenced this pull request Dec 16, 2022
aydun added a commit to aydun/civicrm-core that referenced this pull request Dec 16, 2022
aydun added a commit to aydun/civicrm-core that referenced this pull request Jan 12, 2023
@civicrm-builder
Copy link

Can one of the admins verify this patch?

@colemanw
Copy link
Member

See #25387

larssandergreen pushed a commit to larssandergreen/civicrm-core that referenced this pull request Jan 24, 2023
@colemanw colemanw closed this Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants