Bug 6901 - Add CSS classes/ids to OPAC and staff XSLT views
Summary: Add CSS classes/ids to OPAC and staff XSLT views
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Katrin Fischer
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 18:34 UTC by Katrin Fischer
Modified: 2012-10-25 23:09 UTC (History)
3 users (show)

See Also:
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 (8.56 KB, application/octet-stream)
2011-09-21 20:08 UTC, Katrin Fischer
Details
Bug 6901: Add classes to XSLT detail view in STAFF (17.41 KB, patch)
2011-09-21 20:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 6901: Add classes to XSLT detail view in OPAC (15.92 KB, patch)
2011-09-21 20:43 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 6901: Add classes to XSLT detail view in STAFF (17.52 KB, patch)
2011-09-21 20:47 UTC, Liz Rea
Details | Diff | Splinter Review
[Signed Off] Bug 6901: Add classes to XSLT detail view in OPAC (15.97 KB, patch)
2011-09-21 21:10 UTC, Liz Rea
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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