From 687a9588888ac71f446d9ad1a26af804fe06cc67 Mon Sep 17 00:00:00 2001
From: Kyle M Hall
Date: Mon, 4 Mar 2013 08:22:43 -0500
Subject: [PATCH] Bug 9456 - Add callnumber column to the cart - Add monospacing and padding for callnumbers
---
.../intranet-tmpl/prog/en/css/staff-global.css | 5 +++++
.../intranet-tmpl/prog/en/modules/basket/basket.tt | 19 ++++++++++++++++++-
2 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
index 83b4238..5c945a7 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
@@ -2556,3 +2556,8 @@ button.closebtn{padding:0;cursor:pointer;background:transparent;border:0;-webkit
.nowrap {
white-space: nowrap;
}
+
+.monospace {
+ font-family : monaco, courier;
+ font : bold !important;
+}
\ No newline at end of file
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 b7ea133..10bd184 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
@@ -350,6 +350,23 @@ function placeHold () {
[% END %]
+[% SET max_callnumber_length = 0 %]
+[% SET max_branchname_length = 0 %]
+[% SET max_locdescription_length = 0 %]
+[% FOREACH b IN BIBLIO_RESULTS %]
+ [% FOREACH i IN b.ITEM_RESULTS %]
+ [% IF i.itemcallnumber.length() > max_callnumber_length %]
+ [% SET max_callnumber_length = i.itemcallnumber.length() %]
+ [% END %]
+ [% IF i.branchname.length() > max_branchname_length %]
+ [% SET max_branchname_length = i.branchname.length() %]
+ [% END %]
+ [% IF i.location_description.length() > max_locdescription_length %]
+ [% SET max_locdescription_length = i.location_description.length() %]
+ [% END %]
+ [% END %]
+[% END %]
+
@@ -385,7 +402,7 @@ function placeHold () {
[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
- [% ITEM_RESULT.itemcallnumber %] [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location_description %]
+ [% String.new( ITEM_RESULT.itemcallnumber ).left( max_callnumber_length ).replace(' ', ' ') %] [% String.new( ITEM_RESULT.branchname ).left( max_branchname_length ).replace(' ', ' ') %] [% String.new( ITEM_RESULT.location_description ).left( max_locdescription_length ).replace(' ', ' ') %]
[% END %]
[% ELSE %]
This record has no items.
--
1.7.2.5 |