Summary: | Add id tags to each MARC note in the display | ||
---|---|---|---|
Product: | Koha | Reporter: | Nicole C. Engard <nengard> |
Component: | Staff interface | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | david, fridolin.somers, gmcharlt, lucas, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement adds id and class tags to each MARC note in the description tab for the staff interface bibliographic detail page.
It adds a unique id for each note (for unique styling of each repeated tag), and a general and unique class for each tag (for consistent styling across the same tag number). An example of the HTML output:
```
<p id="marcnote-500-2" class="marcnote marcnote-500">...</p>
```
Styles can be defined for notes and individual tags in the `IntranetUserCSS` system preference - see the test plan for an example.
|
Version(s) released in: |
23.11.00
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 35689 | ||
Attachments: |
Bug 14156: Add id tags to each MARC note in the display
Bug 14156: Add id tags to each MARC note in the display Bug 14156: Add id tags to each MARC note in the display |
Description
Nicole C. Engard
2015-05-06 13:47:28 UTC
I agree - the notes as they are are not very useful. They are not labelled and it's impossible to hide a specific one. Right now Biblio.pm doesn't pass the tag information to the template, so this can't be accomplished just on the front end. Seems like it should be a pretty trivial change but I'm not really sure what's going on in GetMarcNotes. This would still be very helpful - I could do the template changes, but need help on GetMarcNotes Created attachment 154422 [details] [review] Bug 14156: Add id tags to each MARC note in the display This patch adds tag number to the data which is returned by $biblio->get_marc_notes(). The bibliographic detail page in the staff client is modified to use the tag number in both a class (for consistent styling across the same tag number) and id (for unique styling for each repeated tag). To test, apply the patch and restart services. - As a quick test for custom CSS, go to Administration -> System preferences and locate the IntranetUserCSS preference. - Add this testing CSS: .marcnote { font-size:140%; font-family: serif; } .marcnote-500 { background-color: #66FFCC; } .marcnote-511 { background-color: #99FFFF; } .marcnote-520 { background-color: #CCFF00; } .marcnote-521 { background-color: #CCFFFF; } .marcnote-538 { background-color: #FFCCCC; } .marcnote-546 { background-color: #FFFFCC; } - Locate a record with multiple notes fields. In the sample data, record 46, "Viridiana" is a good example which works well with the above CSS. - On the bibliographic detail page for the record, click the "Descriptions" tab. - Each MARC note should be colored according to the tag it comes from. - Inspect the HTML to confirm that each paragraph also has its own unique ID. Nicole, please come back and test this patch :D Created attachment 155577 [details] [review] Bug 14156: Add id tags to each MARC note in the display This patch adds tag number to the data which is returned by $biblio->get_marc_notes(). The bibliographic detail page in the staff client is modified to use the tag number in both a class (for consistent styling across the same tag number) and id (for unique styling for each repeated tag). To test, apply the patch and restart services. - As a quick test for custom CSS, go to Administration -> System preferences and locate the IntranetUserCSS preference. - Add this testing CSS: .marcnote { font-size:140%; font-family: serif; } .marcnote-500 { background-color: #66FFCC; } .marcnote-511 { background-color: #99FFFF; } .marcnote-520 { background-color: #CCFF00; } .marcnote-521 { background-color: #CCFFFF; } .marcnote-538 { background-color: #FFCCCC; } .marcnote-546 { background-color: #FFFFCC; } - Locate a record with multiple notes fields. In the sample data, record 46, "Viridiana" is a good example which works well with the above CSS. - On the bibliographic detail page for the record, click the "Descriptions" tab. - Each MARC note should be colored according to the tag it comes from. - Inspect the HTML to confirm that each paragraph also has its own unique ID. Signed-off-by: David Nind <david@davidnind.com> Nice to see more ID's/classes for easy customization. The QA script is happy and the HTML generated looks good, no duplicate ID's or anything like that! Created attachment 155601 [details] [review] Bug 14156: Add id tags to each MARC note in the display This patch adds tag number to the data which is returned by $biblio->get_marc_notes(). The bibliographic detail page in the staff client is modified to use the tag number in both a class (for consistent styling across the same tag number) and id (for unique styling for each repeated tag). To test, apply the patch and restart services. - As a quick test for custom CSS, go to Administration -> System preferences and locate the IntranetUserCSS preference. - Add this testing CSS: .marcnote { font-size:140%; font-family: serif; } .marcnote-500 { background-color: #66FFCC; } .marcnote-511 { background-color: #99FFFF; } .marcnote-520 { background-color: #CCFF00; } .marcnote-521 { background-color: #CCFFFF; } .marcnote-538 { background-color: #FFCCCC; } .marcnote-546 { background-color: #FFFFCC; } - Locate a record with multiple notes fields. In the sample data, record 46, "Viridiana" is a good example which works well with the above CSS. - On the bibliographic detail page for the record, click the "Descriptions" tab. - Each MARC note should be colored according to the tag it comes from. - Inspect the HTML to confirm that each paragraph also has its own unique ID. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Pushed to master for 23.11. Nice work everyone, thanks! Enhancement not pushed to 23.05.x Why only staff interface? |