From 9daa83caeb6e59dcfc4570b36782eb6f1eab9095 Mon Sep 17 00:00:00 2001 From: Jen Zajac Date: Tue, 1 Dec 2015 12:27:24 +1300 Subject: [PATCH] Bug 15269 [ENH]: Layout tweaks for the opac-detail page Make the following improvements to the layout of the OPAC detail page: * Image thumbnail has more white space * Summary is moved up the details block and font size is increased * Ratings controls are moved up the details * Small devices get a better layout To test: - Check that the ratings controls are moved up the page to be before the summary * If there is no summary, the controls should be under the series * If there is no summary or no series, the controls should be under the type * If there is no summary, no series, or no type, the controls should be under the authors (including contributing authors) - Check that the 520 field (Summary, Subject, Review, Scope and content, Abstract, Content advice) is rendered nearer to the top of the page, following material type, series, and the ratings. - Check that the font size for "Material type", "Series" and the 520 field (Summary, Subject, Review, Scope and content, Abstract, Content advice) are rendered at a 14px font size. - Check that authors and contributing authors are rendered at 16px font size. - Check that if any kind of cover image is present (or the no cover image placeholder image) it is rendered into a div with a class of 'span2' and appears on the left of the main item details. * Need to test every kind of cover image service * If no kind of cover image service is turned on, then the 'span2' div should not be present and the item details should be on the left of the content area. - Check that small devices (e.g. mobile phones) make the 'span2' image column take up the full width and appear above the rest of the item details. - Check that layout of the search results page is unaffected. - Check that changing 'OPACXSLTDetailsDisplay' to an empty string still yields the expected layout. Sponsored-by: ByWater --- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 994 ++++++++++---------- .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 181 ++-- koha-tmpl/opac-tmpl/bootstrap/less/opac.less | 38 +- koha-tmpl/opac-tmpl/bootstrap/less/responsive.less | 2 +- 4 files changed, 640 insertions(+), 575 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 951029a..362e028 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -46,499 +46,516 @@
-
-
- [% IF ( OPACLocalCoverImages ) %] -
- [% END %] - [% IF ( OPACAmazonCoverImages ) %] - [% IF ( OPACURLOpenInNewWindow ) %] - - [% ELSE %] - - [% END %] - [% IF ( using_https ) %] - Cover image - [% ELSE %] - Cover image - [% END %] - [% END %] - - [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] - [% IF ( content_identifier_exists ) %] - [% IF ( using_https ) %] - - [% ELSE %] - - [% END %] - - [% ELSE %] - No cover image available - [% END %] - [% END %] - - [% IF ( GoogleJackets ) %] -
- [% END %] - [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %] - [% coce_id = normalized_ean || normalized_isbn %] -
- [% END %] - [% IF OpenLibraryCovers %] -
- [% END %] - [% bt_id = ( normalized_upc || normalized_isbn ) %] - [% IF ( BakerTaylorEnabled && bt_id ) %] - [% IF BakerTaylorBookstoreURL %] - [% IF ( OPACURLOpenInNewWindow ) %] - See Baker & Taylor - [% ELSE %] - See Baker & Taylor - [% END %] - [% ELSE %] - See Baker & Taylor - [% END %] - [% END %] -
- - - [% IF ( ocoins ) # COinS / Openurl %] - - [% END %] - -
- Normal view - MARC view - [% IF ( ISBD ) %]ISBD view[% END %] -
- [% IF ( OPACXSLTDetailsDisplay ) %] - [% XSLTBloc %] - [% ELSE %] -

[% title |html %][% IF ( subtitle ) %] [% FOREACH subtitl IN subtitle %][% subtitl.subfield |html %] [% END %][% END %]

- [% IF ( author ) %]
by [% author |html %]
[% END %] - - [% UNLESS ( item_level_itypes ) %] - [ - [% IF ( description ) %] - [% description %] - [% ELSE %] - [% itemtype %] - [% END %] - ] [% END %] - [% IF ( unititle ) %], [% unititle %][% END %] - - - [% IF ( MARCAUTHORS ) %] -
- Additional authors: - [% IF OPACPopupAuthorsSearch %] - - - [% END # /OPACPopupAuthorsSearch %] - - [% FOREACH MARCAUTHOR IN MARCAUTHORS %] - [% authorsloop = loop %] - [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] - [% MARCAUTHOR_SUBFIELDS_LOO.separator %] - [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] - [% MARCAUTHOR_SUBFIELDS_LOO.value %] - [% ELSE %] - [% MARCAUTHOR_SUBFIELDS_LOO.value %] - [% END %] - [% END %] - [% IF (MARCAUTHOR.authoritylink) %] - - [% END %] - [% IF IDREF and MARCAUTHOR.unimarc3 %] - IdRef - [% END %] - [% UNLESS ( loop.last ) %]|[% END %] - [% END # /FOREACH MARCAUTHORS %] -
- [% END # IF MARCAUTHORS %] - - [% IF ( MARCSERIES ) %] - Series: - [% FOREACH MARCSERIE IN MARCSERIES %] - [% FOREACH MARCSERIES_SUBFIELDS_LOO IN MARCSERIE.MARCSERIES_SUBFIELDS_LOOP %] - [% IF ( MARCSERIES_SUBFIELDS_LOO.value ) %] - [% MARCSERIES_SUBFIELDS_LOO.value %] - [% END %] - [% IF ( MARCSERIES_SUBFIELDS_LOO.volumenum ) %] - . [% MARCSERIES_SUBFIELDS_LOO.volumenum %] - [% END %] - [% END %] - [% UNLESS ( loop.last ) %]|[% END %] - [% END # / FOREACH MARCSERIES %] - - [% END # /MARCSERIES %] - - [% IF ( editionstatement ) %] - Edition statement:[% editionstatement %][% IF ( editionresponsibility ) %]/[% editionresponsibility %][% END %] - [% END %] - [% IF ( publishercode ) %] - Published by : - - [% publishercode |html %] - [% IF ( place ) %]([% place %])[% END %] [% IF ( publicationyear ) %], [% publicationyear %][% END %] - - [% END %] - - [% IF ( pages ) %] - Physical details: [% pages %] [% illus %] [% size %] - [% END %] + + [% IF ( ocoins ) # COinS / Openurl %] + + [% END %] - [% IF ( MARCISBNS ) %] - ISBN:[% FOREACH MARCISBN IN MARCISBNS %][% MARCISBN %][% IF ( loop.last ) %].[% ELSE %]; [% END %][% END %] - [% ELSE %] - [% IF ( normalized_isbn ) %] - ISBN: [% normalized_isbn %] - [% END %] - [% END %] +
+ Normal view + MARC view + [% IF ( ISBD ) %]ISBD view[% END %] +
+ +
+ + [% IF ( OPACLocalCoverImages || OPACAmazonCoverImages || ( SyndeticsEnabled && SyndeticsCoverImages ) || GoogleJackets || ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) || OpenLibraryCovers || ( BakerTaylorEnabled && bt_id && BakerTaylorBookstoreURL ) ) %] + +
+ +
+ [% IF ( OPACLocalCoverImages ) %] +
+ [% END %] + [% IF ( OPACAmazonCoverImages ) %] + [% IF ( OPACURLOpenInNewWindow ) %] + + [% ELSE %] + + [% END %] + [% IF ( using_https ) %] + Cover image + [% ELSE %] + Cover image + [% END %] + [% END %] + + [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] + [% IF ( content_identifier_exists ) %] + [% IF ( using_https ) %] + + [% ELSE %] + + [% END %] - [% IF ( issn ) %] - ISSN:[% issn %] - [% END %] + [% ELSE %] + No cover image available + [% END %] + [% END %] + + [% IF ( GoogleJackets ) %] +
+ [% END %] + [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %] + [% coce_id = normalized_ean || normalized_isbn %] +
+ [% END %] + [% IF OpenLibraryCovers %] +
+ [% END %] + [% bt_id = ( normalized_upc || normalized_isbn ) %] + [% IF ( BakerTaylorEnabled && bt_id ) %] + [% IF BakerTaylorBookstoreURL %] + [% IF ( OPACURLOpenInNewWindow ) %] + See Baker & Taylor + [% ELSE %] + See Baker & Taylor + [% END %] + [% ELSE %] + See Baker & Taylor + [% END %] + [% END %] - [% IF ( collectiontitle ) %] - Collection: - [% collectiontitle %] - [% IF ( collectionissn ) %], ISSN [% collectionissn %] [% END %] - [% IF ( collectionvolume ) %]; [% collectionvolume %] [% END %] +
- - [% END %] +
- [% IF ( unititles ) %] - Uniform titles: - [% FOREACH unititle IN unititles %] - [% unititle.unititle %] ; - [% END %] - - [% END %] - [% IF ( MARCSUBJCTS ) %] -
- Subject(s): - - [% IF OPACPopupAuthorsSearch %] - - - [% END # /OPACPopupAuthorsSearch%] - - [% FOREACH MARCSUBJCT IN MARCSUBJCTS %] - [% subjectsloop = loop %] - [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] - [% SUBFIELD.separator %] - [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] - [% SUBFIELD.value %] - [% ELSE %] - [% SUBFIELD.value %] - [% END %] - [% END %] - [% IF (MARCSUBJCT.authoritylink) %] - - [% END %] - [% UNLESS ( loop.last ) %] | [% END %] - [% END # / FOREACH MARCSUBJCTS %] -
- [% ELSE # /IF MARCSUBJCTS %] - [% IF ( subjects ) %]Subject(s): [% FOREACH subject IN subjects %][% subject.subject %] | [% END %][% END %] - [% END %] +
+ [% ELSE %] +
+ [% END %] - [% IF ( copyrightdate ) %] - Year: [% copyrightdate %] - [% END %] + [% IF ( OPACXSLTDetailsDisplay ) %] + [% XSLTBloc %] + [% ELSE %] +

[% title |html %][% IF ( subtitle ) %] [% FOREACH subtitl IN subtitle %][% subtitl.subfield |html %] [% END %][% END %]

+ [% IF ( author ) %]
by [% author |html %]
[% END %] - [% UNLESS ( item_level_itypes ) %] - [% IF ( imgeurl ) %] - - [% END %] - Item type: - [% IF ( description ) %] - [% description %] - [% ELSE %] - [% itemtype %] - [% END %] - - [% END %] + [% UNLESS ( item_level_itypes ) %] + [ + [% IF ( description ) %] + [% description %] + [% ELSE %] + [% itemtype %] + [% END %] + ] [% END %] + [% IF ( unititle ) %], [% unititle %][% END %] + + + [% IF ( MARCAUTHORS ) %] +
+ Additional authors: + [% IF OPACPopupAuthorsSearch %] + + + [% END # /OPACPopupAuthorsSearch %] + + [% FOREACH MARCAUTHOR IN MARCAUTHORS %] + [% authorsloop = loop %] + [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] + [% MARCAUTHOR_SUBFIELDS_LOO.separator %] + [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] + [% MARCAUTHOR_SUBFIELDS_LOO.value %] + [% ELSE %] + [% MARCAUTHOR_SUBFIELDS_LOO.value %] + [% END %] + [% END %] + [% IF (MARCAUTHOR.authoritylink) %] + + [% END %] + [% IF IDREF and MARCAUTHOR.unimarc3 %] + IdRef + [% END %] + [% UNLESS ( loop.last ) %]|[% END %] + [% END # /FOREACH MARCAUTHORS %] +
+ [% END # IF MARCAUTHORS %] + + [% IF ( MARCSERIES ) %] + Series: + [% FOREACH MARCSERIE IN MARCSERIES %] + [% FOREACH MARCSERIES_SUBFIELDS_LOO IN MARCSERIE.MARCSERIES_SUBFIELDS_LOOP %] + [% IF ( MARCSERIES_SUBFIELDS_LOO.value ) %] + [% MARCSERIES_SUBFIELDS_LOO.value %] + [% END %] + [% IF ( MARCSERIES_SUBFIELDS_LOO.volumenum ) %] + . [% MARCSERIES_SUBFIELDS_LOO.volumenum %] + [% END %] + [% END %] + [% UNLESS ( loop.last ) %]|[% END %] + [% END # / FOREACH MARCSERIES %] + + [% END # /MARCSERIES %] + + [% IF ( editionstatement ) %] + Edition statement:[% editionstatement %][% IF ( editionresponsibility ) %]/[% editionresponsibility %][% END %] + [% END %] + [% IF ( publishercode ) %] + Published by : + + [% publishercode |html %] + [% IF ( place ) %]([% place %])[% END %] [% IF ( publicationyear ) %], [% publicationyear %][% END %] + + [% END %] + + [% IF ( pages ) %] + Physical details: [% pages %] [% illus %] [% size %] + [% END %] + + [% IF ( MARCISBNS ) %] + ISBN:[% FOREACH MARCISBN IN MARCISBNS %][% MARCISBN %][% IF ( loop.last ) %].[% ELSE %]; [% END %][% END %] + [% ELSE %] + [% IF ( normalized_isbn ) %] + ISBN: [% normalized_isbn %] + [% END %] + [% END %] - [% IF ( MARCURLS ) %] -
Online resources: - -
- [% END # / IF MARCURLS %] - [% END # / IF OPACXSLTDetailsDisplay %] + [% IF ( collectiontitle ) %] + Collection: + [% collectiontitle %] + [% IF ( collectionissn ) %], ISSN [% collectionissn %] [% END %] + [% IF ( collectionvolume ) %]; [% collectionvolume %] [% END %] - [% IF ( AuthorisedValueImages && authorised_value_images ) %] -
- [% FOREACH authorised_value_image IN authorised_value_images %] - [% authorised_value_image.label %] - [% END %] -
- [% END # / AuthorisedValueImages && authorised_value_images %] - - - [% IF ( LibraryThingForLibrariesID ) %] - [% UNLESS ( LibraryThingForLibrariesTabbedView ) %] -
-
-
- [% END %] - - Reviews from LibraryThing.com: - - - [% END # / LibraryThingForLibrariesID %] - - - [% IF shelves.count %] - List(s) this item appears in: - [% FOREACH s IN shelves %] - [% s.shelfname %] - [% IF ( loop.last ) %][% ELSE %]|[% END %] - [% END %] - - [% END %] +
+ [% END %] - [% IF ( TagsShowEnabled ) %] -
- [% IF ( TagLoop ) %] - Tags from this library: -
    - [% FOREACH TagLoo IN TagLoop %] -
  • [% TagLoo.term |html %] ([% TagLoo.weight_total %]) - [% IF ( loop.last ) %][% ELSE %], [% END %] -
  • - [% END %] -
- [% ELSE %] - Tags from this library: No tags from this library for this title. - [% END %] - [% IF ( TagsInputEnabled ) %] Add tag(s) [% END %] -
- [% END # /IF TagsShowEnabled %] - - [% IF ( TagsInputEnabled ) %] -
- [% IF ( loggedinusername ) %] - - - [% ELSE %] - Log in to add tags. - [% END %] -
- [% END # / IF TagsInputEnabled %] + [% IF ( unititles ) %] + Uniform titles: + [% FOREACH unititle IN unititles %] + [% unititle.unititle %] ; + [% END %] + + [% END %] + + [% IF ( MARCSUBJCTS ) %] +
+ Subject(s): + + [% IF OPACPopupAuthorsSearch %] + + + [% END # /OPACPopupAuthorsSearch%] + + [% FOREACH MARCSUBJCT IN MARCSUBJCTS %] + [% subjectsloop = loop %] + [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] + [% SUBFIELD.separator %] + [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] + [% SUBFIELD.value %] + [% ELSE %] + [% SUBFIELD.value %] + [% END %] + [% END %] + [% IF (MARCSUBJCT.authoritylink) %] + + [% END %] + [% UNLESS ( loop.last ) %] | [% END %] + [% END # / FOREACH MARCSUBJCTS %] +
+ [% ELSE # /IF MARCSUBJCTS %] + [% IF ( subjects ) %]Subject(s): [% FOREACH subject IN subjects %][% subject.subject %] | [% END %][% END %] + [% END %] + + [% IF ( copyrightdate ) %] + Year: [% copyrightdate %] + [% END %] + + [% UNLESS ( item_level_itypes ) %] + [% IF ( imgeurl ) %] + + [% END %] + Item type: + [% IF ( description ) %] + [% description %] + [% ELSE %] + [% itemtype %] + [% END %] + + [% END %] + + [% IF ( MARCURLS ) %] +
Online resources: + +
+ [% END # / IF MARCURLS %] + [% END # / IF OPACXSLTDetailsDisplay %] + + [% IF ( AuthorisedValueImages && authorised_value_images ) %] +
+ [% FOREACH authorised_value_image IN authorised_value_images %] + [% authorised_value_image.label %] + [% END %] +
+ [% END # / AuthorisedValueImages && authorised_value_images %] + + + [% IF ( LibraryThingForLibrariesID ) %] + [% UNLESS ( LibraryThingForLibrariesTabbedView ) %] +
+
+
+ [% END %] + + Reviews from LibraryThing.com: + + + [% END # / LibraryThingForLibrariesID %] + + + [% IF shelves.count %] + List(s) this item appears in: + [% FOREACH s IN shelves %] + [% s.shelfname %] + [% IF ( loop.last ) %][% ELSE %]|[% END %] + [% END %] + + [% END %] + + [% IF ( SyndeticsEnabled ) %] + [% IF ( SyndeticsSeries && SyndeticsSERIES1Exists ) %] + + Series information: + [% IF ( using_https ) %] + Click to open in new window + [% ELSE %] + Click to open in new window + [% END %] + + [% END # / IF SyndeticsSeries && SyndeticsSERIES1Exists%] + [% IF ( SyndeticsAVPROFILEExists ) %] + + Audiovisual profile: + [% IF ( using_https ) %] + Click to open in new window + [% ELSE %] + Click to open in new window + [% END %] + + [% END # / IF SyndeticsAVPROFILEExists %] + + [% IF ( SyndeticsFICTIONExists ) %] + + Fiction notes: + [% IF ( using_https ) %] + Click to open in new window + [% ELSE %] + Click to open in new window + [% END %] + + [% END # / IF SyndeticsFICTIONExists %] + + [% IF ( SyndeticsAwards && SyndeticsAWARDS1Exists ) %] + + Awards: + [% IF ( using_https ) %] + Click to open in new window + [% ELSE %] + Click to open in new window + [% END %] + + [% END # / IF SyndeticsAwards && SyndeticsAWARDS1Exists %] + [% END # / IF SyndeticsEnabled%] + + [% IF ( BakerTaylorContentURL ) %] + + Enhanced content: + [% IF ( OPACURLOpenInNewWindow ) %]Content Cafe[% ELSE %]Content Cafe[% END %] + + [% END # / IF BakerTaylorContentURL %] + + [% IF ( NovelistSelectProfile ) %] + [% IF ( NovelistSelectView == 'above') %] + + Novelist Select: +
+
+ [% END %] + [% END # / IF NovelistSelectProfile %] + + [% IF ( Babeltheque ) %] + +
+
+
+
+ [% END # / IF Babeltheque%] + + [% IF ( TagsShowEnabled ) %] +
+ [% IF ( TagLoop ) %] + Tags from this library: +
    + [% FOREACH TagLoo IN TagLoop %] +
  • [% TagLoo.term |html %] ([% TagLoo.weight_total %]) + [% IF ( loop.last ) %][% ELSE %], [% END %] +
  • + [% END %] +
+ [% ELSE %] + Tags from this library: No tags from this library for this title. + [% END %] + [% IF ( TagsInputEnabled ) %] Add tag(s) [% END %] +
+ [% END # /IF TagsShowEnabled %] + + [% IF ( TagsInputEnabled ) %] +
+ [% IF ( loggedinusername ) %] + + + + + (done) + + + [% ELSE %] + Log in to add tags. + [% END %] +
+ [% END # / IF TagsInputEnabled %] + + [% IF ( OpacStarRatings != 'disable' ) %] +
+
+ + [% FOREACH i IN [ 1 2 3 4 5 ] %] + [% IF rating_avg == i && borrowernumber %] + + [% ELSIF rating_avg == i %] + + [% ELSIF borrowernumber %] + + [% ELSE %] + + [% END %] + [% END %] - + - - - - + + + + - [% UNLESS ( rating_readonly ) %]  [% END %]  + [% UNLESS ( rating_readonly ) %]  [% END %]  - [% IF ( rating_value ) %] - your rating: [% rating_value %], - [% ELSE %] - - [% END %] + [% IF ( rating_value ) %] + your rating: [% rating_value %], + [% ELSE %] + + [% END %] - average rating: [% rating_avg_int %] ([% rating_total %] votes) -
-
- [% END # / IF OpacStarRatings != 'disable' %] - - [% IF ( BakerTaylorContentURL ) %] - - Enhanced content: - [% IF ( OPACURLOpenInNewWindow ) %]Content Cafe[% ELSE %]Content Cafe[% END %] - - [% END # / IF BakerTaylorContentURL %] - - [% IF ( NovelistSelectProfile ) %] - [% IF ( NovelistSelectView == 'above') %] - - Novelist Select: -
-
- [% END %] - [% END # / IF NovelistSelectProfile %] + average rating: [% rating_avg_int %] ([% rating_total %] votes) +
+ + [% END # / IF OpacStarRatings != 'disable' %] - [% IF ( Babeltheque ) %] - -
-
-
-
- [% END # / IF Babeltheque%] +
@@ -1343,8 +1360,35 @@ [% END %] -[% IF ( OpacStarRatings != 'disable' ) %][% END %] - +[% IF ( OpacStarRatings != 'disable' ) %] + + +[% END %] [% IF ( OpacHighlightedWords ) %][% END %]