Project

General

Profile

Actions

Feature #9940

closed

CUNY OneSearch widget

Added by Boone Gorges over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
WordPress Plugins
Target version:
Start date:
2018-06-15
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Network-activated / mu-plugin widget will have a bit of explanatory language, along with a single-input search form and search button.

Form will submit GET request to CUNY OneSearch. URL format is https://onesearch.cuny.edu/primo-explore/search?query=any,contains,FOO&tab=default_tab&search_scope=everything&vid=CUNY&lang=en_US&offset=0, where FOO is the search term.

Note that vid=CUNY gives us the generic CUNY branding. We may one day decide to make this more fine-grained based on the campus affiliation of a site; see eg #9939. Or we could have a dropdown in the widget admin that allows the admin to select the branding. If we do this, it would make sense to have a centralized store of information about CUNY campuses.

Results should open in a new browser window.


Files


Related issues

Related to CUNY Academic Commons - Feature #9939: Campus branding widgetResolvedBoone Gorges2018-06-15

Actions
Actions #1

Updated by Boone Gorges over 6 years ago

Actions #2

Updated by Boone Gorges over 6 years ago

Ray, we should come up with a scheme for all these network-available widgets. Should we maybe just have a widgets library in mu-plugins somewhere?

Actions #3

Updated by Boone Gorges over 6 years ago

  • Tracker changed from Support to Feature
Actions #4

Updated by Boone Gorges over 6 years ago

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.

Actions #5

Updated by Maura Smale over 6 years ago

Boone Gorges wrote:

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.

This looks great, and I think this will be super useful. I defer to others re: wording -- Stephen Francoeur in particular I know has been very involved in the conversations about wording that have happened since OneSearch launched. I know every campus is different, and he might have a sense of the wording that applies most broadly. Thanks!

Actions #6

Updated by Boone Gorges about 6 years ago

  • Status changed from Testing Required to Resolved
Actions

Also available in: Atom PDF