Bug 26889: Remove extra space from "Damaged :" in item search
authorOwen Leonard <oleonard@myacpl.org>
Mon, 2 Nov 2020 12:28:09 +0000 (12:28 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 3 Nov 2020 09:57:35 +0000 (10:57 +0100)
This patch adds the chomp shorthand [%- -%] to the BLOCK for showing
labels in the item search template. This collapses the whitespace around
the label, eliminating the unwanted space around the ":"

To test, apply the patch and go to the item search page in the staff
interface. There should be no space before the colon in the "Damaged"
label.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt

index 0290678..fe2639d 100644 (file)
@@ -3,34 +3,34 @@
 [% USE Asset %]
 [% USE AuthorisedValues %]
 
-[% BLOCK form_label %]
-  [% SWITCH label %]
-    [% CASE 'barcode' %]<span>Barcode</span>
-    [% CASE 'itemcallnumber' %]<span>Call number</span>
-    [% CASE 'stocknumber' %]<span>Inventory number</span>
-    [% CASE 'title' %]<span>Title</span>
-    [% CASE 'author' %]<span>Author</span>
-    [% CASE 'publishercode' %]<span>Publisher</span>
-    [% CASE 'publicationyear' %]<span>Publication date</span>
-    [% CASE 'collectiontitle' %]<span>Collection title</span>
-    [% CASE 'isbn' %]<span>ISBN</span>
-    [% CASE 'issn' %]<span>ISSN</span>
-    [% CASE 'homebranch' %]<span>Home library</span>
-    [% CASE 'holdingbranch' %]<span>Current library</span>
-    [% CASE 'All libraries' %]<span>All libraries</span>
-    [% CASE 'location' %]<span>Shelving location</span>
-    [% CASE 'All locations' %]<span>All locations</span>
-    [% CASE 'itype' %]<span>Item type</span>
-    [% CASE 'All item types' %]<span>All item types</span>
-    [% CASE 'ccode' %]<span>Collection</span>
-    [% CASE 'All collection codes' %]<span>All collections</span>
-    [% CASE 'notforloan' %]<span>Status</span>
-    [% CASE 'All statuses' %]<span>All statuses</span>
-    [% CASE 'damaged' %]<span>Damaged</span>
-    [% CASE 'itemlost' %]<span>Lost</span>
-    [% CASE 'withdrawn' %]<span>Withdrawn</span>
-  [% END %]
-[% END %]
+[%- BLOCK form_label -%]
+  [%- SWITCH label -%]
+    [%- CASE 'barcode' %]<span>Barcode</span>
+    [%- CASE 'itemcallnumber' %]<span>Call number</span>
+    [%- CASE 'stocknumber' %]<span>Inventory number</span>
+    [%- CASE 'title' %]<span>Title</span>
+    [%- CASE 'author' %]<span>Author</span>
+    [%- CASE 'publishercode' %]<span>Publisher</span>
+    [%- CASE 'publicationyear' %]<span>Publication date</span>
+    [%- CASE 'collectiontitle' %]<span>Collection title</span>
+    [%- CASE 'isbn' %]<span>ISBN</span>
+    [%- CASE 'issn' %]<span>ISSN</span>
+    [%- CASE 'homebranch' %]<span>Home library</span>
+    [%- CASE 'holdingbranch' %]<span>Current library</span>
+    [%- CASE 'All libraries' %]<span>All libraries</span>
+    [%- CASE 'location' %]<span>Shelving location</span>
+    [%- CASE 'All locations' %]<span>All locations</span>
+    [%- CASE 'itype' %]<span>Item type</span>
+    [%- CASE 'All item types' %]<span>All item types</span>
+    [%- CASE 'ccode' %]<span>Collection</span>
+    [%- CASE 'All collection codes' %]<span>All collections</span>
+    [%- CASE 'notforloan' %]<span>Status</span>
+    [%- CASE 'All statuses' %]<span>All statuses</span>
+    [%- CASE 'damaged' %]<span>Damaged</span>
+    [%- CASE 'itemlost' %]<span>Lost</span>
+    [%- CASE 'withdrawn' %]<span>Withdrawn</span>
+  [%- END -%]
+[%- END -%]
 
 [% BLOCK form_field_select %]
   <div class="form-field form-field-select">