Summary: | MARC21 530 is missing from staff interface and has no label | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | MARC Bibliographic data support | Assignee: | Katrin Fischer <katrin.fischer> |
Status: | RESOLVED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | minor | ||
Priority: | P5 - low | CC: | david, flyingendpaper, m.de.rooy, martin.renvoize |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the display of the MARC21 530 tag and subfields so that it:
- now displays in the staff interface (was missing)
- improves the display of the values by adding
. a description/label
. separators between repeated 530 tags
. missing spaces before $u and between repeated $u subfields
|
Version(s) released in: |
23.11.00,23.05.02,22.11.08
|
Circulation function: | |||
Attachments: |
Bug 26862: Improve MARC21 530 display on detail pages
Bug 26862: Improve MARC21 530 display on detail pages Bug 26862: Improve MARC21 530 display on detail pages Bug 26862: Improve MARC21 530 display on detail pages Bug 26862: Improve MARC21 530 display on detail pages |
Description
Katrin Fischer
2020-10-29 14:24:15 UTC
Created attachment 152989 [details] [review] Bug 26862: Improve MARC21 530 display on detail pages This makes some changes to the way we display field 530 in OPAC and staff interface: * Adds missing spaces before $u and between repeated $u subfields * Adds a description/label before the output of the subfields * Adds display to the staff interface (was OPAC only) * Adds separators between repeated 530 fields: * OPAC: updates mark-up to use the new CSS driven separators * Staff interface: adds | with separator class To test: * Find or create a records with multiple 530 entries * Repeat $u with multiple URLs * Verify display in staff (missing) and OPAC * Apply patch * Verify display is improved :D Created attachment 152990 [details] [review] Bug 26862: Improve MARC21 530 display on detail pages This makes some changes to the way we display field 530 in OPAC and staff interface: * Adds missing spaces before $u and between repeated $u subfields * Adds a description/label before the output of the subfields * Adds display to the staff interface (was OPAC only) * Adds separators between repeated 530 fields: * OPAC: updates mark-up to use the new CSS driven separators * Staff interface: adds | with separator class To test: * Find or create a records with multiple 530 entries * Repeat $u with multiple URLs * Verify display in staff (missing) and OPAC * Apply patch * Verify display is improved :D Created attachment 152993 [details] [review] Bug 26862: Improve MARC21 530 display on detail pages This makes some changes to the way we display field 530 in OPAC and staff interface: * Adds missing spaces before $u and between repeated $u subfields * Adds a description/label before the output of the subfields * Adds display to the staff interface (was OPAC only) * Adds separators between repeated 530 fields: * OPAC: updates mark-up to use the new CSS driven separators * Staff interface: adds | with separator class To test: * Find or create a records with multiple 530 entries * Repeat $u with multiple URLs * Verify display in staff (missing) and OPAC * Apply patch * Verify display is improved :D Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. Change the BKS framework so that 530 can be edited in the staff interface. Created attachment 153077 [details] [review] Bug 26862: Improve MARC21 530 display on detail pages This makes some changes to the way we display field 530 in OPAC and staff interface: * Adds missing spaces before $u and between repeated $u subfields * Adds a description/label before the output of the subfields * Adds display to the staff interface (was OPAC only) * Adds separators between repeated 530 fields: * OPAC: updates mark-up to use the new CSS driven separators * Staff interface: adds | with separator class To test: * Find or create a records with multiple 530 entries * Repeat $u with multiple URLs * Verify display in staff (missing) and OPAC * Apply patch * Verify display is improved :D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Thank you, David and Heather! Heather, if I work on other XSLT patches, would you like me to CC you? Sure, Katrin! Yes, please do! I felt that this was a bug I could really test.:) Happy to help! --h2 <xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute> You might need to str-encode-uri and normalize-space stuff here. Something like (do not copy): <xsl:value-of select="str:encode-uri(concat($scriptname,'?q=ti,phr:',translate($quoted_title, '()', '')),false())"/> <xsl:value-of select="normalize-space(marc:subfield[@code=$cnum_subfield])"/> Why do you open a new window in OPAC (pref dependent) and not in staff? Could imagine that staff could have it. (In reply to Marcel de Rooy from comment #8) > <xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute> > You might need to str-encode-uri and normalize-space stuff here. > Something like (do not copy): > <xsl:value-of > select="str:encode-uri(concat($scriptname,'?q=ti,phr:', > translate($quoted_title, '()', '')),false())"/> > <xsl:value-of select="normalize-space(marc:subfield[@code=$cnum_subfield])"/> You might ignore this remark looking at e.g. 856u > You might ignore this remark looking at e.g. 856(In reply to Marcel de Rooy from comment #8) > <xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute> > You might need to str-encode-uri and normalize-space stuff here. > Something like (do not copy): > <xsl:value-of > select="str:encode-uri(concat($scriptname,'?q=ti,phr:', > translate($quoted_title, '()', '')),false())"/> > <xsl:value-of select="normalize-space(marc:subfield[@code=$cnum_subfield])"/> This part pre-dates my patch, I can have a look at 856. > Why do you open a new window in OPAC (pref dependent) and not in staff? > Could imagine that staff could have it. Because we don't have an equivalent of the pref for the staff interface and we don't use the OPAC one in staff either. I stumbled on that too when working on the patch, should maybe have left a note :) (In reply to Katrin Fischer from comment #10) > > You might ignore this remark looking at e.g. 856(In reply to Marcel de Rooy from comment #8) > > <xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute> > > You might need to str-encode-uri and normalize-space stuff here. > > Something like (do not copy): > > <xsl:value-of > > select="str:encode-uri(concat($scriptname,'?q=ti,phr:', > > translate($quoted_title, '()', '')),false())"/> > > <xsl:value-of select="normalize-space(marc:subfield[@code=$cnum_subfield])"/> > > This part pre-dates my patch, I can have a look at 856. I had a look, but I am not sure this applies here. $u is a full URL here, not a parameter we use to build a search URL, so there should not be a need to encode it - it might even break things if it's already encoded. Do you agree? > > Why do you open a new window in OPAC (pref dependent) and not in staff? > > Could imagine that staff could have it. > > Because we don't have an equivalent of the pref for the staff interface and > we don't use the OPAC one in staff either. I stumbled on that too when > working on the patch, should maybe have left a note :) See: Bug 29739 - Add a staff counterpart for OPACURLOpenInNewWindow Currently we only open the "OPAC" link and the links to authorities in a new tab, so behavior is consistent with this patch, even if it could be improved. Created attachment 153311 [details] [review] Bug 26862: Improve MARC21 530 display on detail pages This makes some changes to the way we display field 530 in OPAC and staff interface: * Adds missing spaces before $u and between repeated $u subfields * Adds a description/label before the output of the subfields * Adds display to the staff interface (was OPAC only) * Adds separators between repeated 530 fields: * OPAC: updates mark-up to use the new CSS driven separators * Staff interface: adds | with separator class To test: * Find or create a records with multiple 530 entries * Repeat $u with multiple URLs * Verify display in staff (missing) and OPAC * Apply patch * Verify display is improved :D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Passing QA. What I miss (not only here, but in general) is additional validation of what we entered in $u or similar fields. Learned by experience that there may be trailing spaces in such fields breaking URLs, and so on. And on the subject of new windows, I would rather open a new window by default than replace the current one just as we do now. But that may be a personal pref. We should indeed create the staff counterpart of the OPAC pref. So no blockers left here. Pushed to master for 23.11. Nice work everyone, thanks! Thanks for all the hard work! Pushed to 23.05.x for the next release Nice work everyone! Pushed to oldstable for 22.11.x |