ObjectiveSubject / ccl

1 stars 0 forks source link

Create custom field for default librarian statement #48

Closed kpettinga closed 6 years ago

kpettinga commented 6 years ago

RE: Live search items: Include a description of what the librarian can offer to the user. Ie. “Contact this librarian for research consultation, reference, instructions, etc etc”

Implementation direction from @gabrielo-cuc :

If the API has the associated subjects for librarians, can we pull that data in for the description? If the API doesn't return this data, then I'm thinking we could have a boilerplate statement for each librarian that is served up from the searchbox. This would be a fine solution as long as we have the ability to edit that statement. Perhaps we can include as setting in the settings page?

We should create a text custom field where they can enter default text for librarians that have no subjects associated with them.

davekellam commented 6 years ago

Easy enough to add in a custom field. One question I have is, where should the boilerplate statement live? I don't think it makes sense on the integrations settings page, or the import options page. I could create a Staff (Librarians) Options page, nested under the Staff menu. I could also create more of a generic settings page under the Settings menu, or piggyback on one of the existing Settings pages. @gabrielo-cuc thoughts here?

davekellam commented 6 years ago

Actually, probably worth asking @kpettinga and @gabrielo-cuc are you guys having issues with 403 errors when you're logged into the production site and try to load a room's bookings?

gabriel-ortiz commented 6 years ago

@kpettinga @davekellam Yea it looks like the room reservation data isn't loading inside the dialog box. I do see the same 403 error to the admin-ajax.php URL when logged as admin.. but it seems to work fine on the frontend without logging in...

gabriel-ortiz commented 6 years ago

Also @kpettinga and @davekellam Yea it might be advantageous to have an options page for Staff. I'm sure there will be more options created in the future. Regarding the placement of that page -- i really don't have a preference. I think it would naturally fit to have it grouped with the associated Staff CPT. But I feel like it's a 50/50 split.

davekellam commented 6 years ago

Ok. I can make a Staff Options page under the Staff cpt. Just before I do that, you were implying that you wanted a GUI option? Or is that something you're happy to have as a string of text in the theme code?

davekellam commented 6 years ago

@gabrielo-cuc ^^ (and oops re: the 403 question, I meant to ask that in #45 about the room reservations. Thanks though!)

gabriel-ortiz commented 6 years ago

@davekellam eh while I'm happy to set that value in the theme codebase, but it would probably be easier for everyone if it is an GUI. Plus we might end up adding more options in the future. Thanks man!

davekellam commented 6 years ago

I've added in a statement field to the post type, as well as a settings page with a default message and a notice if that isn't set. Use the helper function get_librarian_statement( $id ) to return the statement as needed.