-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
SearchKit - Support conditional links #22557
Conversation
(Standard links)
|
120b1e4
to
a8bb32c
Compare
ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php
Outdated
Show resolved
Hide resolved
@colemanw in trying to test this PR I hit a possible recent regression - going to this page http://core-22557-5o32p.test-3.civicrm.org:8001/civicrm/acl/entityrole?action=update&id=2 And attempting to save I get this My understanding is that the |
@eileenmcnaughton it always responds to the hook (because that's the only way to implement a hook) but then decides to act based on the entity name. Why on earth is |
@colemanw yeah that is fixed now - so I can try again to replicate this |
a8bb32c
to
8f40366
Compare
@colemanw did you make more changes? I just tested this - it took me a bit to figure out what it was doing but once it did I added some docs https://lab.civicrm.org/documentation/docs/user-en/-/merge_requests/548 The only 'issue' (more like a feature gap) I noticed is that for tokens I can use fields not in the display but for the conditional links I can't. What I tried to do was add a link on the email field to the url civicrm/activity/email/add?action=add&reset=1&selectedChild=activity&atype=3&email_id=[Contact_Email_contact_id_01.id] but only if the on_hold field - which is not in the display = 0 Also side-issue - that url if kind of a hidden url (since normally cid rather than email id is used) but I think it would be good to define as a link in the email entity - we do define non-crud links? |
Thanks for the review @eileenmcnaughton. The change I made was to take your code style suggestions. |
Advanced feature to conditionally show/hide links in a links/buttons/menu column, based on user permissions or row values.
8f40366
to
8349890
Compare
Overview
Advanced feature to conditionally show/hide links in a links/buttons/menu column, based on user permissions or row values.
Before
Links would display unconditionally.
After
Links can be hidden based on user permissions (e.g. "access CiviCase") or according to a value (e.g.
is_active = TRUE
).