Bug 6901

Summary: Add CSS classes/ids to OPAC and staff XSLT views
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: TemplatesAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: PATCH-Sent (DO NOT USE) CC: chris, koha.sekjal, wizzyrea
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: sample records with original script for testing
Bug 6901: Add classes to XSLT detail view in STAFF
Bug 6901: Add classes to XSLT detail view in OPAC
Bug 6901: Add classes to XSLT detail view in STAFF
[Signed Off] Bug 6901: Add classes to XSLT detail view in OPAC

Description Katrin Fischer 2011-09-21 18:34:35 UTC
At the moment it's hard to change the appearance of one specific field on the OPAC and staff detail pages.

Another problem is, that you can't hide fields easily. Some libraries might want to the 'Show analytics' links, but it's not possible right now.

I propose to add CSS classes and ids to both XSLT files so you can use CSS to hide and change things.

For OPAC and staff differently named elements should be used, so you can change them separately.
Comment 1 Katrin Fischer 2011-09-21 20:08:59 UTC
Created attachment 5519 [details]
sample records with original script for testing
Comment 2 Katrin Fischer 2011-09-21 20:10:59 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2011-09-21 20:43:14 UTC Comment hidden (obsolete)
Comment 4 Liz Rea 2011-09-21 20:47:43 UTC
Created attachment 5522 [details] [review]
Bug 6901: Add classes to XSLT detail view in STAFF

This patch adds css classes to the fields in XSLT intranet views.
Use OpacUserCss and IntranetUserCss system preferences for altering the styling of
and hiding fields.

The css classes are named like the labels with additional underscores
where necessary.

Example:
.publisher {
display:none;
}

.other_title {
font-weight: bold;
}

Note: This patch also fixes the display of additional authors in field 880 (original
scripts like Hebrew). This small additional problem was found as a side effect of testing, where the
existence of an author in 880 would break the XSLT.

Also moves some CSS from a style attribute into the CSS file for 880 fields.

Signed-off-by: Liz Rea <lrea@nekls.org>

-- minor commit message edits (requested by KF)
Comment 5 Liz Rea 2011-09-21 21:10:44 UTC
Created attachment 5523 [details] [review]
[Signed Off] Bug 6901: Add classes to XSLT detail view in OPAC

This patch adds css classes to the fields in XSLT OPAC view so
you can use OpacUserCss system preference for formatting
and hiding fields.

The css classes are named like the labels with additional underscores
where necessary.

Example:
.publisher {
display:none;
}

.other_title {
font-weight: bold;
}

Note: Patch also moves some hard-coded CSS from Utils into the CSS file (only
apples for 880 fields)

Signed-off-by: Liz Rea <lrea@nekls.org>
Comment 6 Ian Walls 2011-09-22 12:13:04 UTC
Cleanly and consistently applies CSS class matching label name.  XSLT and CSS only change, so marking as Passed QA
Comment 7 Chris Cormack 2011-09-24 07:50:41 UTC
Pushed, please test