Created attachment 25747 [details] [review] Small improvements for the availability informations in the search results list on the OPAC. This patch contains small modifications to the template of OPAC search results. Theses modifications affect the "Availability" line : * Add a linebreak after each location. * Add the text "Call Number:" before call numbers. To test this patch, simply do a search on the OPAC and check the format of availability informations for each search result. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
There's a merge problem. I'll let the original author rebase before I sign off, rather than me sign off on my rebase of it.
I think this change could be something not everyone will agree to as it sounds like the items line will take up a lot more space for bigger consortia with lots of libraries.
Yes, the substitution of a comma for a line break does increase vertical spacing. However, I personally find it more visually appealing and less of a giant blur from one into another. The vertical spacing increases *IF* there are multiple branches with the same biblio. A single branch would not experience any visual difference.
This sounds like the kind of change that could be better handled by using a custom XSL stylesheet.
You're probably right, Owen. Though, you'd have to keep re-patching, if the default templates shifted for security reasons. Which is probably why they want it in the default.
There are system preferences for defining your own custom XSLT paths to be used for OPAC and staff, so repatching won't be needed. Of course, you will have to add new features to your custom files or add your changes to a copy of the default again, but updates won't overwrite your changes.
Created attachment 25921 [details] [review] New version of the patch. Rebase on current master. Here is a new version of the patch. In the end, we think this new view is easier to read and understand for patrons, and this is why we are sharing this patch. Also, I won't hide updates would be a lot easier for us if we didn't have to reapply our patch everytime we want to update Koha. ;)
Changes to koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl 2008: 13 2009: 14 2010: 14 2011: 10 2012: 9 2013: 6 2014: 1 It would seem to me that the amount the template is changing is going down, but with it changing every 1-2 months, I can understand why the change is desired in master. Is there a way to system preference the line break vs. comma in XSLT? Perhaps that would be more acceptable, and default to comma given that is the current behaviour. I changed this to in discussion, because as far as I can tell this patch won't make it past QA, because of the comma vs. line break difference and because perhaps a system preference thought may save this desired line break functionality.
QA issues: - The patch only changes prog, not bootstrap - "Call Number" is incorrectly capitalized. If we want to avoid custom XSLT the compromise would be to add markup and classes to the XSL so that the these snippets of text can be styled and/or hidden as desired: - Wrap the individual library lines in a span which can be made "display:block" in custom CSS. - Wrap the "cal number" text in a span which is hidden by default in the CSS. Use custom CSS to show it.
Created attachment 29681 [details] [review] Small improvements for the availability informations in the search results list on the OPAC. * Add linebreaks to each location via CSS spans. * Add the text "Call number:" before call numbers hidden by default.
Created attachment 29682 [details] [review] Bug 11881 - Follow-up: Add CSS entries to opac.css (prog) This adds the two classes in the spans into opac.css, and it can be overridden in a custom style sheet as needed. Only for the prog theme. To test, apply both prog patches and simply do a search on the OPAC and check the format of availability informations for each search result. By default it should be unchanged. Override the defaults by adding the following into a custom CSS file: .CommasWithLinebreaks { display: block; # block - line breaks, inline - all one line } .LabelCallNumber { display: inline; # inline - display, none - don't display } The call number will be labelled, and items will have line breaks added in the listing.
Mark, did you forget to set this bugs as « Needs Signoff » ?
No, because of comment 9 requiring a bootstrap portion of the patch. I just fixed the prog side.
Created attachment 29873 [details] [review] Bug 11881: (Follow-up) Add the CommasWithLinebreaks and LabelCallNumber classes to Bootstrap them and fix the Call number typo
Comment on attachment 29873 [details] [review] Bug 11881: (Follow-up) Add the CommasWithLinebreaks and LabelCallNumber classes to Bootstrap them and fix the Call number typo Another patch will follow with all required files
Created attachment 29874 [details] [review] Bug 11881: (Follow-up) Add the CommasWithLinebreaks and LabelCallNumber classes to Bootstrap them and fix the Call number typo
Bootstrap is now supported
Created attachment 29875 [details] [review] Bug 11881: (Follow-up) Add the CommasWithLinebreaks and LabelCallNumber classes to Bootstrap them and fix the Call number typo rebased to apply cleanly -- Mark Tompsett
Patch doesn't apply Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/opac-tmpl/bootstrap/less/opac.less Auto-merging koha-tmpl/opac-tmpl/bootstrap/css/opac.css CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/css/opac.css Failed to merge in the changes. Patch failed at 0001 Bug 11881: (Follow-up) Add the CommasWithLinebreaks and LabelCallNumber classes to Bootstrap them and fix the Call number typo When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-11881-Follow-up-Add-the-CommasWithLinebreaks-a-aaGWGn.patch
Created attachment 34004 [details] [review] Small improvements for the availability informations in the search results list on the OPAC.
To test: I) Apply the patch validate: no breakline nor "Call Number:" text. II) Include the following test in the OPACUserCSS preference: .searchresults .CommasWithLinebreaks { display: block; # block - line breaks, inline - all one line } .searchresults .LabelCallNumber { display: inline; # inline - display, none - don't display } validate: Breakline or "Call Number:" text.
Created attachment 36470 [details] [review] [SIGNED-OFF] Small improvements for the availability informations in the search results list on the OPAC. http://bugs.koha-community.org/show_bug.cgi?id=11881 Signed-off-by: Nicole <nicole@bywatersolutions.com>
Simith, The css file is generated from the less file (less/opac.less). You need to attach to the patch the change you have done to this file too.
Created attachment 36496 [details] [review] Add changes to opac.less
opac.less file added
(In reply to simith.doliveira from comment #25) > opac.less file added Ok thanks. No signoff needed for this one.
The opac.css does not look good. With your patch: -rw-r--r-- 1 koha koha 42132 Mar 4 16:25 bootstrap/css/opac.css $lessc --compress bootstrap/less/opac.less > bootstrap/css/opac.css -rw-r--r-- 1 koha koha 42946 Mar 4 16:25 bootstrap/css/opac.css
Created attachment 36510 [details] [review] Small improvements for the availability informations in the search results list on the OPAC This patch contains small modifications to the template of OPAC search results. Theses modifications affect the "Availability" line : * Add a linebreak after each location. * Add the text "Call Number:" before call numbers. To test: I) Apply the patch II) Include the following test in the OPACUserCSS preference: .searchresults .CommasWithLinebreaks { display: block; # block - line breaks, inline - all one line } .searchresults .LabelCallNumber { display: inline; # inline - display, none - don't display } III) Do a search on the OPAC IV) Validate : check the format of availability informations for each search result (Breakline or "Call Number:" text). Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
I created a new patch with just MARC21slim2OPACResults.xsl file because reading the comments #2, #4, #9 and #21 we don't need .css ou .less files.
(In reply to Jonathan Druart from comment #27) > The opac.css does not look good. > With your patch: > -rw-r--r-- 1 koha koha 42132 Mar 4 16:25 bootstrap/css/opac.css > > $lessc --compress bootstrap/less/opac.less > bootstrap/css/opac.css > -rw-r--r-- 1 koha koha 42946 Mar 4 16:25 bootstrap/css/opac.css mtompset@ubuntu:~/kohaclone$ git reset --hard origin/master HEAD is now at 45e5afb Bug 13731: Suggestions reason does not save on updating the status mtompset@ubuntu:~/kohaclone$ ls -la koha-tmpl/opac-tmpl/bootstrap/css/opac.css -rw-rw-r-- 1 mtompset mtompset 42879 Mar 5 00:01 koha-tmpl/opac-tmpl/bootstrap/css/opac.css mtompset@ubuntu:~/kohaclone$ lessc --compress koha-tmpl/opac-tmpl/bootstrap/less/opac.less > koha-tmpl/opac-tmpl/bootstrap/css/opac.css mtompset@ubuntu:~/kohaclone$ ls -la koha-tmpl/opac-tmpl/bootstrap/css/opac.css -rw-rw-r-- 1 mtompset mtompset 43371 Mar 5 00:01 koha-tmpl/opac-tmpl/bootstrap/css/opac.css mtompset@ubuntu:~/kohaclone$ I don't think it is this patch per say.
I have stared at this for a while, there are some things I am not completely happy with: 1) There is a visible change on the result list with this patch - the added 'Call number: ' in front of every entry. This can be hidden with CSS, so I think it's probably ok. Example: Availability: Items available for loan: Fairfield [Call number: 320] (1), Franklin [Call number: 320] (1), Riverside [Call number: 320] (1), Union [Call number: 320] (1). 2) I am stumbling a bit over 'CommasWithLinebreaks' as a class name. I'd like something that describes the content better. 3) The 'Call number: ' change is not consistent. If you have an item whose item type is marked as not for loan, it will show up separately: Example: Availability: Items available for loan: Franklin [Call number: 320] (1), Riverside [Call number: 320] (1), Union [Call number: 320] (1). Items available for reference: Fairfield [320] (1 ). Failing for 3) - would be good to get another opinion on 1) and 2).
Katrin, you'll note the obsoleted "Add changes to opac.less" file which an be used to build tweaks to the opac.css file which would hide the label. So, I don't think (1) is an issue, except that perhaps the less and corresponding css change shouldn't be obsoleted? CommasWithLinebreaks is EXACTLY what it can be used for. With the appropriate CSS, Linebreaks between the items can be forced. I don't think the name is so far off what it actually is intended to do. So, I don't see an issue with (2). However, you rightly point out (3) is inconsistent. I agree that should be fixed before signing off.
Created attachment 42487 [details] [review] Small improvements for the availability informations in the search results list on the OPAC This patch contains small modifications to the template of OPAC search results. Theses modifications affect the "Availability" line : * Add a linebreak after each location. * Add the text "Call Number:" before call numbers. To test: I) Apply the patch II) Include the following test in the OPACUserCSS preference: .searchresults .CommasWithLinebreaks { display: block; # block - line breaks, inline - all one line } .searchresults .LabelCallNumber { display: inline; # inline - display, none - don't display } III) Do a search on the OPAC IV) Validate : check the format of availability informations for each search result (Breakline or "Call Number:" text). Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 42488 [details] [review] Bug 11881 - Small improvements for Items available for reference As said on comment #31, Items available for reference weren't displayed like Items avaible for loan. Now, they are, I wrapped them in CommasWithLinebreaks class and LabelCallNumber class
Created attachment 42489 [details] [review] Small improvements for the availability informations in the search results list on the OPAC This patch contains small modifications to the template of OPAC search results. Theses modifications affect the "Availability" line : * Add a linebreak after each location. * Add the text "Call Number:" before call numbers. To test: I) Apply the patch II) Include the following test in the OPACUserCSS preference: .searchresults .CommasWithLinebreaks { display: block; # block - line breaks, inline - all one line } .searchresults .LabelCallNumber { display: inline; # inline - display, none - don't display } III) Do a search on the OPAC IV) Validate : check the format of availability informations for each search result (Breakline or "Call Number:" text). Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) http://bugs.koha-community.org/show_bug.cgi?id=11881 Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Created attachment 42490 [details] [review] Bug 11881 - Small improvements for Items available for reference As said on comment #31, Items available for reference weren't displayed like Items avaible for loan. Now, they are, I wrapped them in CommasWithLinebreaks class and LabelCallNumber class Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
One small thing I noticed was an extra line between the available items list and the Checked Out(1) line after I had applied the CSS snippet
(In reply to Nick Clemens from comment #37) > One small thing I noticed was an extra line between the available items list > and the Checked Out(1) line after I had applied the CSS snippet Is 'Checked out' supposed to be on the same line as an [Call number : 320] ? I just want to be sure I correct it the good way. I was thinking about it because there's other unavailable classes like Withdrawn, Lost, Damaged, etc. Are they supposed to be on the same line too ? Wouldn't it weird if it was only in the same line as one Call Number even if there is three Call Number ?
Created attachment 42807 [details] [review] Bug 11881: Small improvements for the availability informations in the search results list on the OPAC This patch contains small modifications to the template of OPAC search results. Theses modifications affect the "Availability" line : * Add a linebreak after each location. * Add the text "Call Number:" before call numbers. To test: I) Apply the patch II) Include the following test in the OPACUserCSS preference: .searchresults .CommasWithLinebreaks { display: block; # block - line breaks, inline - all one line } .searchresults .LabelCallNumber { display: inline; # inline - display, none - don't display } III) Do a search on the OPAC IV) Validate : check the format of availability informations for each search result (Breakline or "Call Number:" text). Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 42808 [details] [review] Bug 11881 - Small improvements for Items available for reference As said on comment #31, Items available for reference weren't displayed like Items avaible for loan. Now, they are, I wrapped them in CommasWithLinebreaks class and LabelCallNumber class Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Looks fine by me. I am waiting for a confirmation from Katrin before passing QA on it.
No problem with the patch itself, but I am not a fan of the name of the class: CommasWithLinebreaks A good rule is not to name classes on appearance, as appearance can change with CSS, but according to what they contain - something that describes that it's the item information for one branch maybe.
Created attachment 43946 [details] [review] [PASSED QA] Bug 11881: Small improvements for the availability informations in the search results list on the OPAC This patch contains small modifications to the template of OPAC search results. Theses modifications affect the "Availability" line : * Add a linebreak after each location. * Add the text "Call Number:" before call numbers. To test: I) Apply the patch II) Include the following test in the OPACUserCSS preference: .searchresults .CommasWithLinebreaks { display: block; # block - line breaks, inline - all one line } .searchresults .LabelCallNumber { display: inline; # inline - display, none - don't display } III) Do a search on the OPAC IV) Validate : check the format of availability informations for each search result (Breakline or "Call Number:" text). Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 43947 [details] [review] [OPTIONAL] Bug 11881: QA follow-up - rename class A suggestion for renaming the class to be a bit more "content" then "appearance". Strictly optional. .ItemSummary { display: block; # block - line breaks, inline - all one line } .LabelCallNumber { display: inline; # inline - display, none - don't display }
Created attachment 43948 [details] [review] [PASSED QA] Bug 11881: Small improvements for the availability informations in the search results list on the OPAC This patch contains small modifications to the template of OPAC search results. Theses modifications affect the "Availability" line : * Add a linebreak after each location. * Add the text "Call Number:" before call numbers. To test: I) Apply the patch II) Include the following test in the OPACUserCSS preference: .searchresults .CommasWithLinebreaks { display: block; # block - line breaks, inline - all one line } .searchresults .LabelCallNumber { display: inline; # inline - display, none - don't display } III) Do a search on the OPAC IV) Validate : check the format of availability informations for each search result (Breakline or "Call Number:" text). Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 43949 [details] [review] [PASSED QA] Bug 11881 - Small improvements for Items available for reference As said on comment #31, Items available for reference weren't displayed like Items avaible for loan. Now, they are, I wrapped them in CommasWithLinebreaks class and LabelCallNumber class Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 43950 [details] [review] [OPTIONAL] Bug 11881: QA follow-up - rename class A suggestion for renaming the class to be a bit more "content" then "appearance". Strictly optional. .ItemSummary { display: block; # block - line breaks, inline - all one line } .LabelCallNumber { display: inline; # inline - display, none - don't display }
Patches pushed to master. Thanks Simith and Genevieve!