From a2b4f38712694b55aa4c631e4b0d0a65e2adc002 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 24 Jul 2018 16:10:53 +0000 Subject: [PATCH] Bug 21112: Re-indent staff client cart template This patch reindents the template for the staff client cart, basket.tt - Trailing spaces removed - Indentation changed to a consistent 4 spaces - Markup indentation made more consistent To test, apply the patch and add multiple items to the cart in the staff client. View the cart and confirm that it looks as it should both in the "brief" and "more details" views. HTML validation before and after the patch should return the same results. Signed-off-by: DEVINIM Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens (cherry picked from commit 4ae91ba2633bac7ec607c8519433ba3cacbde1fd) Signed-off-by: Martin Renvoize --- .../prog/en/modules/basket/basket.tt | 526 ++++++++++-------- 1 file changed, 286 insertions(+), 240 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index c798725f1f..2c411cdac6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -7,11 +7,11 @@ Remove [% IF ( loggedinusername ) %] - | Add to a list + | Add to a list [% END %] [% IF ( CAN_user_reserveforothers ) %] - | Place hold + | Place hold [% END %] [% IF CAN_user_tools_records_batchmod %] @@ -30,255 +30,301 @@ -
-
-
- -
- -

Your cart

- -
- [% IF ( verbose ) %] - Brief display - [% ELSE %] - More details - [% END %] - - Send -
- Download - -
- Print - Empty and close - Hide window -
- - -[% IF ( verbose ) %] - [% PROCESS controls %] -
- [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %] -

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

- - - - [% IF ( BIBLIO_RESULT.isbn ) %] - - - - - [% END %] +
+
+
- [% IF ( BIBLIO_RESULT.HASAUTHORS ) %] -
- - - - [% END %] +
- [% IF ( BIBLIO_RESULT.publishercode ) %] -
- - - - [% END %] - [% IF ( BIBLIO_RESULT.pages ) %] - - - - - [% END %] - [% IF ( BIBLIO_RESULT.seriestitle ) %] - - - - - [% END %] +

Your cart

- [% IF ( BIBLIO_RESULT.MARCSUBJCTS ) %] - - - - - [% END %] +
+ [% IF ( verbose ) %] + Brief display + [% ELSE %] + More details + [% END %] - [% IF ( BIBLIO_RESULT.copyrightdate ) %] -
- - - [% END %] + Send +
+ Download + +
+ Print + Empty and close + Hide window + - [% IF ( BIBLIO_RESULT.MARCNOTES ) %] - - - - - [% END %] - [% IF ( BIBLIO_RESULT.unititle ) %] - - - - - [% END %] - [% IF ( BIBLIO_RESULT.serial ) %] - - - - - [% END %] - [% IF ( BIBLIO_RESULT.dewey ) %] - - - - - [% END %] - [% IF ( BIBLIO_RESULT.classification ) %] - - - - - [% END %] - [% IF ( BIBLIO_RESULT.lccn ) %] - - - - - [% END %] + [% IF ( verbose ) %] + [% PROCESS controls %] + + [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %] +

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

+ + +
ISBN[% BIBLIO_RESULT.isbn %]
Author(s) - [% IF ( BIBLIO_RESULT.author ) %] -

[% BIBLIO_RESULT.author %]

- [% END %] - [% IF ( BIBLIO_RESULT.MARCAUTHORS ) %] - [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %] -

[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] - [% MARCAUTHOR_SUBFIELDS_LOO.separator %] - [% MARCAUTHOR_SUBFIELDS_LOO.value %] - [% END %] -

- [% END %] - [% END %] -
Publisher[% BIBLIO_RESULT.place %] [% BIBLIO_RESULT.publishercode %] [% BIBLIO_RESULT.publicationyear %] -
Details[% BIBLIO_RESULT.pages %] [% BIBLIO_RESULT.illus %] [% BIBLIO_RESULT.item('size') %]
Collection [% BIBLIO_RESULT.seriestitle %]
Subject(s)[% FOREACH MARCSUBJCT IN BIBLIO_RESULT.MARCSUBJCTS %] -

[% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] - [% MARCSUBJECT_SUBFIELDS_LOO.separator %][% MARCSUBJECT_SUBFIELDS_LOO.value %][% END %] -

- [% END %]
Copyright [% BIBLIO_RESULT.copyrightdate %]
Notes - [% FOREACH MARCNOTE IN BIBLIO_RESULT.MARCNOTES %] -

- [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] - - [% MARCNOTE.marcnote %] - [% ELSE %] - - [% MARCNOTE.marcnote %] - [% END %] - [% END %] -

Unified title [% BIBLIO_RESULT.unititle %]
Serial[% BIBLIO_RESULT.serial %]
Dewey[% BIBLIO_RESULT.dewey %]
Classification [% BIBLIO_RESULT.classification %]
LCCN [% BIBLIO_RESULT.lccn %]
+ [% IF ( BIBLIO_RESULT.isbn ) %] + + + + + [% END %] - [% IF BIBLIO_RESULT.MARCURLS.size %] - - - + + + + [% END %] - [% MARCurl.linktext %] + [% IF ( BIBLIO_RESULT.publishercode ) %] + + + + + [% END %] - [% IF MARCurl.notes %][% FOREACH note IN MARCurl.notes %]

[% note.note %]

[% END %][% END %] - [% END %] - - - [% END %] + [% IF ( BIBLIO_RESULT.pages ) %] + + + + + [% END %] - - - - -
ISBN[% BIBLIO_RESULT.isbn %]
URL(s) - [% FOREACH MARCurl IN BIBLIO_RESULT.MARCURLS %] - [% IF MARCurl.part %]

[% MARCurl.part %]

[% END %] + [% IF ( BIBLIO_RESULT.HASAUTHORS ) %] +
Author(s) + [% IF ( BIBLIO_RESULT.author ) %] +

[% BIBLIO_RESULT.author %]

+ [% END %] + [% IF ( BIBLIO_RESULT.MARCAUTHORS ) %] + [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %] +

+ [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] + [% MARCAUTHOR_SUBFIELDS_LOO.separator %] + [% MARCAUTHOR_SUBFIELDS_LOO.value %] + [% END %] +

+ [% END %] + [% END %] +
Publisher[% BIBLIO_RESULT.place %] [% BIBLIO_RESULT.publishercode %] [% BIBLIO_RESULT.publicationyear %] +
Details[% BIBLIO_RESULT.pages %] [% BIBLIO_RESULT.illus %] [% BIBLIO_RESULT.item('size') %]
Location(s)[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %][% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] -

- [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location_description %] - [% IF ( ITEM_RESULT.itemcallnumber ) %] - ([% ITEM_RESULT.itemcallnumber %]) - [% END %] -

- [% END %][% ELSE %]This record has no items.[% END %]
- [% END %] -
- -[% ELSE %] - -
- [% PROCESS controls %] - - - - - - - - - - [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %] - - - - - - - [% END %] -
 TitleItem typeItems
- - - - [% BIBLIO_RESULT.title |html %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield | html %][% END %] - - [% BIBLIO_RESULT.author %] -

[% IF ( BIBLIO_RESULT.publishercode ) %]- [% BIBLIO_RESULT.publishercode %] - [% IF ( BIBLIO_RESULT.place ) %] [% BIBLIO_RESULT.place %][% END %][% END %] - [% IF ( BIBLIO_RESULT.pages ) %] - [% BIBLIO_RESULT.pages %][% IF ( BIBLIO_RESULT.item('size') ) %] [% BIBLIO_RESULT.item('size') %] - [% END %] - [% END %]

- [% IF ( BIBLIO_RESULT.notes ) %] -

[% BIBLIO_RESULT.notes %]

- [% END %] - - - -
[% BIBLIO_RESULT.description %] - [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %] - [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] -
[% ITEM_RESULT.itemcallnumber %] [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location_description %]
- [% END %] - [% ELSE %] - This record has no items. - [% END %] -
-[% END %] + [% IF ( BIBLIO_RESULT.seriestitle ) %] + + Collection + [% BIBLIO_RESULT.seriestitle %] + + [% END %] + + [% IF ( BIBLIO_RESULT.MARCSUBJCTS ) %] + + Subject(s) + + [% FOREACH MARCSUBJCT IN BIBLIO_RESULT.MARCSUBJCTS %] +

+ [% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] + [% MARCSUBJECT_SUBFIELDS_LOO.separator %][% MARCSUBJECT_SUBFIELDS_LOO.value %] + [% END %] +

+ [% END %] + + + [% END %] + + [% IF ( BIBLIO_RESULT.copyrightdate ) %] + Copyright + [% BIBLIO_RESULT.copyrightdate %] + + [% END %] + + [% IF ( BIBLIO_RESULT.MARCNOTES ) %] + + Notes + + [% FOREACH MARCNOTE IN BIBLIO_RESULT.MARCNOTES %] +

+ [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] + - [% MARCNOTE.marcnote %] + [% ELSE %] + - [% MARCNOTE.marcnote %] + [% END %] + [% END %] + + + [% END %] + + [% IF ( BIBLIO_RESULT.unititle ) %] + + Unified title + [% BIBLIO_RESULT.unititle %] + + [% END %] + + [% IF ( BIBLIO_RESULT.serial ) %] + + Serial + [% BIBLIO_RESULT.serial %] + + [% END %] + + [% IF ( BIBLIO_RESULT.dewey ) %] + + Dewey + [% BIBLIO_RESULT.dewey %] + + [% END %] + + [% IF ( BIBLIO_RESULT.classification ) %] + + Classification + [% BIBLIO_RESULT.classification %] + + [% END %] + + [% IF ( BIBLIO_RESULT.lccn ) %] + + LCCN + [% BIBLIO_RESULT.lccn %] + + [% END %] + + + [% IF BIBLIO_RESULT.MARCURLS.size %] + + URL(s) + + [% FOREACH MARCurl IN BIBLIO_RESULT.MARCURLS %] + [% IF MARCurl.part %]

[% MARCurl.part %]

[% END %] + [% MARCurl.linktext %] + [% IF MARCurl.notes %] + [% FOREACH note IN MARCurl.notes %] +

[% note.note %]

+ [% END %] + [% END %] + [% END %] + + + [% END %] + + + Location(s) + + [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %] + [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] +

+ [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location_description %] + [% IF ( ITEM_RESULT.itemcallnumber ) %] + ([% ITEM_RESULT.itemcallnumber %]) + [% END %] +

+ [% END %] + [% ELSE %] + This record has no items. + [% END %] + + + + [% END # /FOREACH BIBLIO_RESULT %] + [% # /bookbag_form %] + + [% ELSE # IF verbose %] + +
+ [% PROCESS controls %] + + + + + + + + + + + + [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %] + + + + + + + [% END # /FOREACH BIBLIO_RESULT %] +
 TitleItem type + Items +
+ + + + [% BIBLIO_RESULT.title |html %] + [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] + [% subtitl.subfield | html %] + [% END %] + + [% BIBLIO_RESULT.author %] +

+ [% IF ( BIBLIO_RESULT.publishercode ) %] + - [% BIBLIO_RESULT.publishercode %] + [% IF ( BIBLIO_RESULT.place ) %] + [% BIBLIO_RESULT.place %] + [% END %] + [% END %] + [% IF ( BIBLIO_RESULT.pages ) %] + - [% BIBLIO_RESULT.pages %] + [% IF ( BIBLIO_RESULT.item('size') ) %] + [% BIBLIO_RESULT.item('size') %] + [% END %] + [% END %] +

+ [% IF ( BIBLIO_RESULT.notes ) %] +

[% BIBLIO_RESULT.notes %]

+ [% END %] + + +
[% BIBLIO_RESULT.description %] + [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %] + [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] +
+ + + [% ITEM_RESULT.itemcallnumber %] + + [% ITEM_RESULT.branchname %] + [% ITEM_RESULT.location_description %] + +
+ [% END %] + [% ELSE %] + This record has no items. + [% END %] +
+
+ [% END # /IF verbose %] + +
+ +
+ +
[% # /.container %] +
[% # /.col-md-12 %] +
[% # /.row %] +
[% # /.main.container-fluid %] + + [% INCLUDE js_includes.inc %] + [% INCLUDE 'datatables.inc' %] + [% Asset.js("js/cart.js") %] + [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %] -
- -
- - - - - - [% INCLUDE js_includes.inc %] - [% INCLUDE 'datatables.inc' %] - [% Asset.js("js/cart.js") %] - [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %] -- 2.39.5