My libraries would like to see their library name either highlighted from amongst the pile of libraries that are displayed when one searches for something in the OPAC. Really what they would like is for their holding to be moved to the front of the pack AND highlighted. Where I mean is when one goes to the OPAC and does a keyword search for something, like 'Humger Games.' A result list is provided to them with brief bibliographic information, an image, and a list of libraries and call numbers in green text (for available items). It is this listing of libraries in green text that they would like to have altered so that their item is listed first and it is highlighted. We might also want to explore changing the item listing on an individual record view in the OPAC so that the home library is listed first and all the other libraries are listed alphabetically behind it, but this is a lower priority.
This will work only when user is logged in. Items that belong to the user's branch will be shown first and in larger font in both search results. The availability status will have no impact, items will be show first and highlighted even if those items are unavailable. In the catalog detail page (Normal view), the items that belong to the user's branch will be show first and the rows have a different background color. This is on the OPAC only. A new system preference HighlightOwnItemsOnOPAC will be created to control this behaviour.
Customer would like to have this behavior for users not logged in to the OPAC. Modified design: We will use the OPAC URL being used (e.g. library1.domain.org) to identify the user's library. Once the library is known we can highlight the items in that library in the OPAC search results and in the OPAC detail page. The assumption here is that a different URL can be setup for each library on the system that wants to use this feature. So there could be a common URL for all libraries that are on the particular Koha install, say www.domain.org. And then each library that needs this feature will have their own URL, say library1.domain.org, library2.domain.org.
Savitra, Would using the URL field in the libraries table work? When you set up a library in the libraries admin area you can enter the branch URL - maybe the pattern of the URL doesn't matter so much if you use that field. Just an idea ... not sure if I'm at all right in this assumption. Nicole
Nicole, that won't work, to use something from the library table, we would need to know which library the user belongs to. We don't know that when the user is not logged in. If setting up a different url for the library is not possible, we can consider asking the user to select her home branch when they visit the home page. The selection can be stored in a cookie. Once the cookie expires (maybe after a few days), they will need to select the branch once again.
Created attachment 13135 [details] [review] Bug 7740 - Highlight items in own library in search results/detail page in OPAC This feature enables a particular library's items to be emphasized and moved to the first position on the search results and details pages of the OPAC. It is enabled by the sytem preference HighlightOwnItemsOnOPAC. To choose which branches items are emphasized, use the system preference HighlightOwnItemsOnOPACWhich. It has two modes. If set to PatronBranch, the items emphasized will be those of the same library as the patron's library. If no one is logged into the opac, no items will be highlighted. If set to OpacURLBranch, the library is chosen based on the Apache environment variable BRANCHCODE. For example, this could be added to the OPAC section of koha-httpd.conf: SetEnv BRANCHCODE "CPL" The point of this feature is to allow each library on a given Koha server to have a specific subdomain for the opac where that library's items are empasized. That was http://branch1.opac.mylibrary.org will emphasize the items of branch1, while http://branch2.opac.mylibrary.org will emphasize the items of branch2.
Created attachment 13136 [details] [review] Bug 7740 - Highlight items in own library in search results/detail page in OPAC This feature enables a particular library's items to be emphasized and moved to the first position on the search results and details pages of the OPAC. It is enabled by the sytem preference HighlightOwnItemsOnOPAC. To choose which branches items are emphasized, use the system preference HighlightOwnItemsOnOPACWhich. It has two modes. If set to PatronBranch, the items emphasized will be those of the same library as the patron's library. If no one is logged into the opac, no items will be highlighted. If set to OpacURLBranch, the library is chosen based on the Apache environment variable BRANCHCODE. For example, this could be added to the OPAC section of koha-httpd.conf: SetEnv BRANCHCODE "CPL" The point of this feature is to allow each library on a given Koha server to have a specific subdomain for the opac where that library's items are empasized. That was http://branch1.opac.mylibrary.org will emphasize the items of branch1, while http://branch2.opac.mylibrary.org will emphasize the items of branch2.
Created attachment 13140 [details] [review] Bug 7740 - Highlight items in own library in search results/detail page in OPAC [v3.08.03] This feature enables a particular library's items to be emphasized and moved to the first position on the search results and details pages of the OPAC. It is enabled by the sytem preference HighlightOwnItemsOnOPAC. To choose which branches items are emphasized, use the system preference HighlightOwnItemsOnOPACWhich. It has two modes. If set to PatronBranch, the items emphasized will be those of the same library as the patron's library. If no one is logged into the opac, no items will be highlighted. If set to OpacURLBranch, the library is chosen based on the Apache environment variable BRANCHCODE. For example, this could be added to the OPAC section of koha-httpd.conf: SetEnv BRANCHCODE "CPL" The point of this feature is to allow each library on a given Koha server to have a specific subdomain for the opac where that library's items are empasized. That was http://branch1.opac.mylibrary.org will emphasize the items of branch1, while http://branch2.opac.mylibrary.org will emphasize the items of branch2. Conflicts: installer/data/mysql/sysprefs.sql installer/data/mysql/updatedatabase.pl koha-tmpl/opac-tmpl/prog/en/css/opac.css koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt
This patch no longer applies. Can you rebase and resubmit?
Created attachment 15118 [details] [review] Bug 7740 - Highlight items in own library in search results/detail page in OPAC This feature enables a particular library's items to be emphasized and moved to the first position on the search results and details pages of the OPAC. It is enabled by the sytem preference HighlightOwnItemsOnOPAC. To choose which branches items are emphasized, use the system preference HighlightOwnItemsOnOPACWhich. It has two modes. If set to PatronBranch, the items emphasized will be those of the same library as the patron's library. If no one is logged into the opac, no items will be highlighted. If set to OpacURLBranch, the library is chosen based on the Apache environment variable BRANCHCODE. For example, this could be added to the OPAC section of koha-httpd.conf: SetEnv BRANCHCODE "CPL" The point of this feature is to allow each library on a given Koha server to have a specific subdomain for the opac where that library's items are empasized. That was http://branch1.opac.mylibrary.org will emphasize the items of branch1, while http://branch2.opac.mylibrary.org will emphasize the items of branch2.
I have tested this and it works the way I would expect it to. Nora Blake
Created attachment 16036 [details] [review] Bug 7740 - Highlight items in own library in search results/detail page in OPAC This feature enables a particular library's items to be emphasized and moved to the first position on the search results and details pages of the OPAC. It is enabled by the sytem preference HighlightOwnItemsOnOPAC. To choose which branches items are emphasized, use the system preference HighlightOwnItemsOnOPACWhich. It has two modes. If set to PatronBranch, the items emphasized will be those of the same library as the patron's library. If no one is logged into the opac, no items will be highlighted. If set to OpacURLBranch, the library is chosen based on the Apache environment variable BRANCHCODE. For example, this could be added to the OPAC section of koha-httpd.conf: SetEnv BRANCHCODE "CPL" The point of this feature is to allow each library on a given Koha server to have a specific subdomain for the opac where that library's items are empasized. That was http://branch1.opac.mylibrary.org will emphasize the items of branch1, while http://branch2.opac.mylibrary.org will emphasize the items of branch2.
Created attachment 16053 [details] [review] [Signed off] Bug 7740 - Highlight items in own library in search results/detail page in OPAC This feature enables a particular library's items to be emphasized and moved to the first position on the search results and details pages of the OPAC. It is enabled by the sytem preference HighlightOwnItemsOnOPAC. To choose which branches items are emphasized, use the system preference HighlightOwnItemsOnOPACWhich. It has two modes. If set to PatronBranch, the items emphasized will be those of the same library as the patron's library. If no one is logged into the opac, no items will be highlighted. If set to OpacURLBranch, the library is chosen based on the Apache environment variable BRANCHCODE. For example, this could be added to the OPAC section of koha-httpd.conf: SetEnv BRANCHCODE "CPL" The point of this feature is to allow each library on a given Koha server to have a specific subdomain for the opac where that library's items are empasized. That was http://branch1.opac.mylibrary.org will emphasize the items of branch1, while http://branch2.opac.mylibrary.org will emphasize the items of branch2. Signed-off-by: Melia Meggs <melia@bywatersolutions.com> Signed-off-by: Nora Blake <nblake@masslibsystem.org>
I'm signing off this patch on behalf of Nora.
Test plan: * apply the patch * activate the syspref HighlightOwnItemsOnOPAC to <<emphasize>> results from the <<patron home branche>> by moving the results to the front and increasing the size or highlighting the rows for those results. * go to OPAC, and login * search for a biblio that has at least 2 items, one at patron branch, one not. * in the result list, the item from patron branch is highlighted, the other one isn't * in the detail page, same thing QA comment: * the css addition was missing to ccsr theme, i've added it in a follow-up * this patch adds a my $branches = GetBranches() in opac-detail. This has also been introduced later, resulting in a perlcritic error. I've fixed it in another follow-up * work fine, clean code. * tested with and without XSLT. with XSLT, the opac-detail is OK, but the result IS NOT. Looking at koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl, it appears that there is no code to handle this syspref. Please fix & resubmit (and do that for MARC21, NORMARC & UNIMARC please, should be easy once you've made it for MARC21, should be easy to do it for others). I think it's
Created attachment 16741 [details] [review] Bug 7740 - Highlight items in own library in search results/detail page in OPAC This feature enables a particular library's items to be emphasized and moved to the first position on the search results and details pages of the OPAC. It is enabled by the sytem preference HighlightOwnItemsOnOPAC. To choose which branches items are emphasized, use the system preference HighlightOwnItemsOnOPACWhich. It has two modes. If set to PatronBranch, the items emphasized will be those of the same library as the patron's library. If no one is logged into the opac, no items will be highlighted. If set to OpacURLBranch, the library is chosen based on the Apache environment variable BRANCHCODE. For example, this could be added to the OPAC section of koha-httpd.conf: SetEnv BRANCHCODE "CPL" The point of this feature is to allow each library on a given Koha server to have a specific subdomain for the opac where that library's items are empasized. That was http://branch1.opac.mylibrary.org will emphasize the items of branch1, while http://branch2.opac.mylibrary.org will emphasize the items of branch2. Signed-off-by: Melia Meggs <melia@bywatersolutions.com> Signed-off-by: Nora Blake <nblake@masslibsystem.org>
Created attachment 16742 [details] [review] Bug 7740 follow-up: css additions for ccsr theme
Created attachment 16743 [details] [review] Bug 7740 follow-up : removing duplicate declaration the my $branches = GetBranches(); already exist at line 444 (introduced by this patch)
Created attachment 16755 [details] [review] Bug 7740 - Highlight items in own library in search results/detail page in OPAC This feature enables a particular library's items to be emphasized and moved to the first position on the search results and details pages of the OPAC. It is enabled by the sytem preference HighlightOwnItemsOnOPAC. To choose which branches items are emphasized, use the system preference HighlightOwnItemsOnOPACWhich. It has two modes. If set to PatronBranch, the items emphasized will be those of the same library as the patron's library. If no one is logged into the opac, no items will be highlighted. If set to OpacURLBranch, the library is chosen based on the Apache environment variable BRANCHCODE. For example, this could be added to the OPAC section of koha-httpd.conf: SetEnv BRANCHCODE "CPL" The point of this feature is to allow each library on a given Koha server to have a specific subdomain for the opac where that library's items are empasized. That was http://branch1.opac.mylibrary.org will emphasize the items of branch1, while http://branch2.opac.mylibrary.org will emphasize the items of branch2. Signed-off-by: Melia Meggs <melia@bywatersolutions.com> Signed-off-by: Nora Blake <nblake@masslibsystem.org>
Created attachment 16756 [details] [review] Bug 7740 follow-up: css additions for ccsr theme Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 16757 [details] [review] Bug 7740 - Highlight items in own library in search results/detail page in OPAC This feature enables a particular library's items to be emphasized and moved to the first position on the search results and details pages of the OPAC. It is enabled by the sytem preference HighlightOwnItemsOnOPAC. To choose which branches items are emphasized, use the system preference HighlightOwnItemsOnOPACWhich. It has two modes. If set to PatronBranch, the items emphasized will be those of the same library as the patron's library. If no one is logged into the opac, no items will be highlighted. If set to OpacURLBranch, the library is chosen based on the Apache environment variable BRANCHCODE. For example, this could be added to the OPAC section of koha-httpd.conf: SetEnv BRANCHCODE "CPL" The point of this feature is to allow each library on a given Koha server to have a specific subdomain for the opac where that library's items are empasized. That was http://branch1.opac.mylibrary.org will emphasize the items of branch1, while http://branch2.opac.mylibrary.org will emphasize the items of branch2. Signed-off-by: Melia Meggs <melia@bywatersolutions.com> Signed-off-by: Nora Blake <nblake@masslibsystem.org>
Created attachment 16758 [details] [review] Bug 7740 follow-up: css additions for ccsr theme Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 16759 [details] [review] Bug 7740 follow-up : removing duplicate declaration the my $branches = GetBranches(); already exist at line 444 (introduced by this patch) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 16760 [details] [review] Bug 7740 - Followup - Add Non-XSLT Caveaut to system preference
Talked to Paul, agreed that this would very difficult to implement in XSLT and it would be acceptable just to note this feature only works for non-xslt.
QA comment * passes koha-qa * the workaround for non-XSLT is not the best possible option, but at least users are warned. passed QA
Created attachment 16811 [details] [review] [PASSED QA] Bug 7740 - Highlight items in own library in search results/detail page in OPAC This feature enables a particular library's items to be emphasized and moved to the first position on the search results and details pages of the OPAC. It is enabled by the sytem preference HighlightOwnItemsOnOPAC. To choose which branches items are emphasized, use the system preference HighlightOwnItemsOnOPACWhich. It has two modes. If set to PatronBranch, the items emphasized will be those of the same library as the patron's library. If no one is logged into the opac, no items will be highlighted. If set to OpacURLBranch, the library is chosen based on the Apache environment variable BRANCHCODE. For example, this could be added to the OPAC section of koha-httpd.conf: SetEnv BRANCHCODE "CPL" The point of this feature is to allow each library on a given Koha server to have a specific subdomain for the opac where that library's items are empasized. That was http://branch1.opac.mylibrary.org will emphasize the items of branch1, while http://branch2.opac.mylibrary.org will emphasize the items of branch2. Signed-off-by: Melia Meggs <melia@bywatersolutions.com> Signed-off-by: Nora Blake <nblake@masslibsystem.org> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Created attachment 16812 [details] [review] [PASSED QA] Bug 7740 follow-up: css additions for ccsr theme Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Created attachment 16813 [details] [review] [PASSED QA] Bug 7740 follow-up : removing duplicate declaration the my $branches = GetBranches(); already exist at line 444 (introduced by this patch) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Created attachment 16814 [details] [review] [PASSED QA] Bug 7740 - Followup - Add Non-XSLT Caveaut to system preference Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch has been pushed to master.