I've finished a first implementation. Relevant changesets:
https://github.com/cuny-academic-commons/cac/commit/233d6248d7fa4b13ecea9858a5987f9be819c793
https://github.com/cuny-academic-commons/cac/commit/9380d5e4645e5a1682669d1c2a0d5dd4d4a2a666
https://github.com/cuny-academic-commons/cac/commit/06b6d3515dd2b171e2e2d6a270048f33b7ddd94b
First, for Ray, a couple of notes. (a) I started a central registry of CUNY campus information, which I can also use for #9939. In the future, we may want to extend this to cover xprofile fields, etc. https://github.com/cuny-academic-commons/cac/blob/06b6d3515dd2b171e2e2d6a270048f33b7ddd94b/wp-content/mu-plugins/cuny-campuses.php (b) I set up a simple infrastructure for sitewide widgets, but you should feel free to modify. See https://github.com/cuny-academic-commons/cac/blob/06b6d3515dd2b171e2e2d6a270048f33b7ddd94b/wp-content/mu-plugins/cac-functions.php#L46, https://github.com/cuny-academic-commons/cac/tree/06b6d3515dd2b171e2e2d6a270048f33b7ddd94b/wp-content/mu-plugins/widgets
Everyone else, see the attached screenshots for some visuals. As you can see, the Title and Description field are customizable. 'Campus' is a dropdown of all CUNY campuses; by default, none is selected. On the front end, when clicking Search, a new tab is launched that loads the OneSearch results corresponding to the entered search term; if a CUNY campus is set in the widget settings, that campus's visual settings are used, otherwise it's the generic CUNY branding. (SPS and SPH don't have their own branding, as far as I can see.) The OneSearch query syntax is a bit funky, which means that I have to assemble the query URL in JavaScript. When JS is not available, I've got a shim in place (the query is submitted to a subpage of the Commons, which translates it into a OneSearch query and then redirects to OneSearch).
There's only so much we can do to enforce styling across themes. IMO we should probably inherit most form styling (fields, buttons, etc) from the theme.
Feedback welcome on the following:
- Functionality/flow
- Wording/labels/default text
- General (ie cross-theme) styling
It's available for testing on cdev as well.