If TagsInputOnList in enabled there is a "new tag" form field displayed with each search result. I propose to change this so that it behaves much like the tag link at the top of search search results where clicking the link displays the form field. The per-line add tag functionality can be grouped with other "actions" (like "place hold," "add to cart," etc). Clicking the link would display the form and automatically move the focus to the entry field.
Created attachment 9247 [details] Screenshot showing proposed interface change
Created attachment 9248 [details] [review] Bug 7980 - Group search results tag input with other actions This patch hides the tag input form in OPAC search results when TagsInputOnList is turned on. An "Add tag" is added to the "Actions" line. Clicking the link un-hides the tag input form. A "Cancel" link hides it again. The patch also moves the display of ratings to the bottom of the list so that existing tags are grouped with the other title details which are prefixed with a label ("Type:", "Availability", etc.). To test, enable the TagsInputOnList system preference. Do a search and try adding tags from the search results list.
Created attachment 9417 [details] [review] Bug 7980: [SIGNED-OFF] Group search results tag input with other actions This patch is more ergonomic for tags in search results. But I think a followup is required: 1/ The 'enter' action reload the page (whereas in the opac detail, this action adds the tag). 2/ Isn't it better to clean the input after submitting ?
(In reply to comment #3) > But I think a followup is required: > 1/ The 'enter' action reload the page (whereas in the opac detail, this > action adds the tag). I didn't notice this problem, but now that I'm testing I see it's a bug in master too. I'll investigate a fix for it and leave it up to QA to decide whether it should block this patch. > 2/ Isn't it better to clean the input after submitting ? I think so, but I would like to make this change in conjunction with a fix for Bug 5174. Clearing the submitted tag without offering some kind of confirmation of what tags were added seems unfriendly to me.
Created attachment 9779 [details] [review] [PASSED_QA] Patch
QA Comment: Looks good, works as advertised. The points Jonathan mentioned can be handled in a followup/new report. They are not really in the scope of this report, since these points already pertain to current versions of opac-results.pl / opac-tags.pl. Passed QA
A valuable ENH !