[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: |
Tue, 10 Jul 2007 13:18:06 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Mason James <sushi> 07/07/10 13:18:06
Modified files:
C4 : Labels.pm
Log message:
little fix to order text fields correctly in labels
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Labels.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.3.4.28&r2=1.3.4.29
Patches:
Index: Labels.pm
===================================================================
RCS file: /sources/koha/koha/C4/Labels.pm,v
retrieving revision 1.3.4.28
retrieving revision 1.3.4.29
diff -u -b -r1.3.4.28 -r1.3.4.29
--- Labels.pm 10 Jul 2007 06:36:05 -0000 1.3.4.28
+++ Labels.pm 10 Jul 2007 13:18:05 -0000 1.3.4.29
@@ -188,7 +188,8 @@
}
sub get_text_fields {
- my ($layout_id) = @_;
+ my ($layout_id, $sorttype) = @_;
+
my ( $a, $b, $c, $d, $e, $f, $g, $h, $i );
my $sortorder = get_layout($layout_id);
@@ -196,35 +197,37 @@
# $sortorder
$a = {
- code => 'ITYPE',
+ code => 'itemtype',
desc => "Item Type",
order => $sortorder->{'itemtype'}
};
$b = {
- code => 'DEWEY',
- desc => "Dewey/Callnumber",
+ code => 'dewey',
+ desc => "Dewey",
order => $sortorder->{'dewey'}
};
- $c = { code => 'ISSN', desc => "ISSN", order => $sortorder->{'issn'} };
- $d = { code => 'ISBN', desc => "ISBN", order => $sortorder->{'isbn'} };
+ $c = { code => 'issn', desc => "ISSN",
+ order => $sortorder->{'issn'} };
+ $d = { code => 'isbn', desc => "ISBN",
+ order => $sortorder->{'isbn'} };
$e = {
- code => 'CLASS',
+ code => 'classification',
desc => "Classification",
order => $sortorder->{'class'}
};
$f = {
- code => 'SUBCLASS',
+ code => 'subclass',
desc => "Sub-Class",
order => $sortorder->{'subclass'}
};
$g = {
- code => 'BARCODE',
+ code => 'barcode',
desc => "Barcode",
order => $sortorder->{'barcode'}
};
$h =
- { code => 'AUTHOR', desc => "Author", order => $sortorder->{'author'} };
- $i = { code => 'TITLE', desc => "Title", order => $sortorder->{'title'} };
+ { code => 'author', desc => "Author", order => $sortorder->{'author'} };
+ $i = { code => 'title', desc => "Title", order => $sortorder->{'title'} };
my @text_fields = ( $a, $b, $c, $d, $e, $f, $g, $h, $i );
@@ -237,7 +240,8 @@
my $active_fields;
foreach my $field (@sorted_fields) {
- $active_fields .= "$field->{'code'} ";
+ $sorttype eq 'codes' ? $active_fields .= "$field->{'code'} " :
+ $active_fields .= "$field->{'desc'} ";
}
return $active_fields;
@@ -645,7 +649,14 @@
# add your printable fields manually in here
- my @fields = GetItemFields();
+my $layout_id = $$conf_data->{'id'};
+
+# my @fields = GetItemFields();
+
+my $str_fields = get_text_fields($layout_id, 'codes' );
+my @fields = split(/ /, $str_fields);
+### @fields
+
my $vPos = ( $y_pos + ( $label_height - $top_text_margin ) );
my $hPos = ( $x_pos + $left_text_margin );
@@ -655,6 +666,7 @@
foreach my $field (@fields) {
# testing hack
+# $$item->{"$field"} = $field . ": " . $$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], (continued)
- [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
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/10
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/10
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/10
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/10
- [Koha-cvs] koha/C4 Labels.pm [dev_week],
Mason James <=
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/15
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/15
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/17
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/17
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/19
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/19
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/19
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/19
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/19
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/20