Created attachment 128139 [details] [review] Bug 29616: Replace library information popup in the OPAC with a modal This patch modifies the OPAC bibliographic detail page so that information stored in libraries' "OPAC info" field can be displayed in a modal window instead of in a tooltip. This will make it more readable, especially for libraries with so much info content that the popup can disappear off the bottom of the page. To test, apply the patch and make sure you have at least one library configured according to each of these: A. One with both branches.branchurl and branches.opac_info B. One with branches.branchurl but not branches.opac_info C. One with branches.opac_info but not branches.branchurl D. One with neither branches.branchurl nor branches.opac_info View the bibliographic detail page in the OPAC for title(s) which have holdings from the libraries you configured above. In the holdings table, check the behavior of the library name in the "Current library" or "Home library" columns * - Case A: The library name appears as a link with an "info" icon. Clicking it shows the library information in a modal window. In the modal footer, a "Visit web site" button should take you to the correct URL. - Case B: The library name appears as a link without an icon. Clicking the link takes you to the correct URL. - Case C: The library name appears as a link with an "info" icon. Clicking it shows the library information in a modal window. In the modal footer there is no "Visit web site" button. - Case D: The library name is plain text. * Display of "Current library" and/or "Home library" is controlled by the OpacLocationBranchToDisplay system preference. Do you think in Case B the link should include the target="_blank" attribute so it opens in a new window? (In reply to Lucas Gass from comment #2) > Do you think in Case B the link should include the target="_blank" attribute > so it opens in a new window? Might be something people argue about. I really like the idea of it opening in a separate tab as this has less surprise and you are leaving the current site. Others might argue that they want the catalog and the website to be perceived as the same website? > Might be something people argue about. I really like the idea of it opening
> in a separate tab as this has less surprise and you are leaving the current
> site. Others might argue that they want the catalog and the website to be
> perceived as the same website?
I typically set links to open in a different tab if it is a different domain but I also think you are right about libraries wanting the OPAC and library website to be perceived as one.
It's always possible to add the attribute via jQuery
Created attachment 129096 [details] [review] Bug 29616: Replace library information popup in the OPAC with a modal This patch modifies the OPAC bibliographic detail page so that information stored in libraries' "OPAC info" field can be displayed in a modal window instead of in a tooltip. This will make it more readable, especially for libraries with so much info content that the popup can disappear off the bottom of the page. To test, apply the patch and make sure you have at least one library configured according to each of these: A. One with both branches.branchurl and branches.opac_info B. One with branches.branchurl but not branches.opac_info C. One with branches.opac_info but not branches.branchurl D. One with neither branches.branchurl nor branches.opac_info View the bibliographic detail page in the OPAC for title(s) which have holdings from the libraries you configured above. In the holdings table, check the behavior of the library name in the "Current library" or "Home library" columns * - Case A: The library name appears as a link with an "info" icon. Clicking it shows the library information in a modal window. In the modal footer, a "Visit web site" button should take you to the correct URL. - Case B: The library name appears as a link without an icon. Clicking the link takes you to the correct URL. - Case C: The library name appears as a link with an "info" icon. Clicking it shows the library information in a modal window. In the modal footer there is no "Visit web site" button. - Case D: The library name is plain text. * Display of "Current library" and/or "Home library" is controlled by the OpacLocationBranchToDisplay system preference. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 129195 [details] [review] Bug 29616: Replace library information popup in the OPAC with a modal This patch modifies the OPAC bibliographic detail page so that information stored in libraries' "OPAC info" field can be displayed in a modal window instead of in a tooltip. This will make it more readable, especially for libraries with so much info content that the popup can disappear off the bottom of the page. To test, apply the patch and make sure you have at least one library configured according to each of these: A. One with both branches.branchurl and branches.opac_info B. One with branches.branchurl but not branches.opac_info C. One with branches.opac_info but not branches.branchurl D. One with neither branches.branchurl nor branches.opac_info View the bibliographic detail page in the OPAC for title(s) which have holdings from the libraries you configured above. In the holdings table, check the behavior of the library name in the "Current library" or "Home library" columns * - Case A: The library name appears as a link with an "info" icon. Clicking it shows the library information in a modal window. In the modal footer, a "Visit web site" button should take you to the correct URL. - Case B: The library name appears as a link without an icon. Clicking the link takes you to the correct URL. - Case C: The library name appears as a link with an "info" icon. Clicking it shows the library information in a modal window. In the modal footer there is no "Visit web site" button. - Case D: The library name is plain text. * Display of "Current library" and/or "Home library" is controlled by the OpacLocationBranchToDisplay system preference. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: The Minh Luong <the-minh.luong@inlibro.com> Created attachment 129978 [details] [review] Bug 29616: Replace library information popup in the OPAC with a modal This patch modifies the OPAC bibliographic detail page so that information stored in libraries' "OPAC info" field can be displayed in a modal window instead of in a tooltip. This will make it more readable, especially for libraries with so much info content that the popup can disappear off the bottom of the page. To test, apply the patch and make sure you have at least one library configured according to each of these: A. One with both branches.branchurl and branches.opac_info B. One with branches.branchurl but not branches.opac_info C. One with branches.opac_info but not branches.branchurl D. One with neither branches.branchurl nor branches.opac_info View the bibliographic detail page in the OPAC for title(s) which have holdings from the libraries you configured above. In the holdings table, check the behavior of the library name in the "Current library" or "Home library" columns * - Case A: The library name appears as a link with an "info" icon. Clicking it shows the library information in a modal window. In the modal footer, a "Visit web site" button should take you to the correct URL. - Case B: The library name appears as a link without an icon. Clicking the link takes you to the correct URL. - Case C: The library name appears as a link with an "info" icon. Clicking it shows the library information in a modal window. In the modal footer there is no "Visit web site" button. - Case D: The library name is plain text. * Display of "Current library" and/or "Home library" is controlled by the OpacLocationBranchToDisplay system preference. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: The Minh Luong <the-minh.luong@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> There is a bright dark blue on the buttons when clicking them, but I notice that this is true for all the buttons (like "Go") right now - so not a blocker. (In reply to Katrin Fischer from comment #8) > There is a bright dark blue on the buttons when clicking them, but I notice > that this is true for all the buttons (like "Go") right now - so not a > blocker. That appears to be from this rule in the OPAC CSS file: .btn-primary:not(:disabled):not(.disabled).active, .btn-primary:not(:disabled):not(.disabled):active, .show > .btn-primary.dropdown-toggle { color: #fff; background-color: #0062cc; border-color: #005cbf; } Do we file a new bug? It seems like perhaps it was intentional to have the blue. (In reply to Lucas Gass from comment #9) > > Do we file a new bug? It seems like perhaps it was intentional to have the > blue. Yep, please open another bug report. We will close invalid if it is on purpose. Whaooo this is reeeeeeeeeeeeeeally better Pushed to master for 22.05, thanks to everybody involved [U+1F984] (In reply to Fridolin Somers from comment #10) > (In reply to Lucas Gass from comment #9) > > > > Do we file a new bug? It seems like perhaps it was intentional to have the > > blue. > Yep, please open another bug report. > We will close invalid if it is on purpose. Done: Bug 30190 - Green buttons turn blue for a second when clicking them There are a couple of issues here.. well one really.. 1) This fails when the user is not yet logged in 2) We should be using /public/ routes for the OPAC to restrict what information is sent out for open sessions. As we already pushed a public endpoint for libraries in bug 28948 we should just be able to switch the endpoint in the API call. Created attachment 134638 [details] [review] Bug 29616: (QA follow-up) Use /public endpoints on OPAC This patch updates the new modal to use the /public version of the libraries endpoint for fetching library data. This ensure the feature works as expected prior to patron login. Follow-up varified and now pushed :) |
Created attachment 128138 [details] Screenshot showing the modal information window If you have "OPAC info" for any of your libraries this information will show up as a popup when the user, viewing the bibliographic detail page, hovers over the library name in the holdings table. I think it would be more user-friendly to have the user click to show this information in a modal dialog.