[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Labels.pm [dev_week]
From: |
Mason James |
Subject: |
[Koha-cvs] koha/C4 Labels.pm [dev_week] |
Date: |
Fri, 06 Jul 2007 01:23:13 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Mason James <sushi> 07/07/06 01:23:13
Modified files:
C4 : Labels.pm
Log message:
added getitemfields(), now printing field name to label too
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Labels.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.3.4.12&r2=1.3.4.13
Patches:
Index: Labels.pm
===================================================================
RCS file: /sources/koha/koha/C4/Labels.pm,v
retrieving revision 1.3.4.12
retrieving revision 1.3.4.13
diff -u -b -r1.3.4.12 -r1.3.4.13
--- Labels.pm 5 Jul 2007 22:20:18 -0000 1.3.4.12
+++ Labels.pm 6 Jul 2007 01:23:13 -0000 1.3.4.13
@@ -54,6 +54,7 @@
&get_layouts &get_barcode_types
&get_batches &delete_batch
&add_batch &SetFontSize &printText
+&GetItemFields
);
@@ -406,6 +407,18 @@
}
+sub GetItemFields {
+ my @fields = qw (
+ barcode title
+ dewey isbn issn author classification
+ itemtype subclass itemcallnumber
+
+ );
+ return @fields;
+}
+
+
+
sub DrawSpineText {
my ( $y_pos, $label_height, $fontsize, $x_pos, $left_text_margin,
@@ -416,13 +429,14 @@
$Text::Wrap::separator = "\n";
my $str;
+ ## $item
my $top_text_margin = ( $fontsize + 3 );
my $line_spacer = ($fontsize); # number of pixels between text rows.
# add your printable fields manually in here
- my @fields =
- qw (dewey isbn classification itemtype subclass itemcallnumber);
+
+ my @fields = GetItemFields();
my $vPos = ( $y_pos + ( $label_height - $top_text_margin ) );
my $hPos = ( $x_pos + $left_text_margin );
@@ -430,6 +444,12 @@
#warn Dumper $item;
foreach my $field (@fields) {
+# testing hack
+
+ $$item->{"$field"} = $field.": ".$$item->{"$field"};
+
+warn $$item->{"$field"};
+
# if the display option for this field is selected in the DB,
# and the item record has some values for this field, display it.
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/03
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/05
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/05
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/05
- [Koha-cvs] koha/C4 Labels.pm [dev_week],
Mason James <=
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/06
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/06
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/08
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/08
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/09
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/09
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/09
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/09
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/09
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/10