[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, 20 Jul 2007 03:59:36 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Mason James <sushi> 07/07/20 03:59:36
Modified files:
C4 : Labels.pm
Log message:
adding 'subtitle' field, and new add_layout() sub.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Labels.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.3.4.37&r2=1.3.4.38
Patches:
Index: Labels.pm
===================================================================
RCS file: /sources/koha/koha/C4/Labels.pm,v
retrieving revision 1.3.4.37
retrieving revision 1.3.4.38
diff -u -b -r1.3.4.37 -r1.3.4.38
--- Labels.pm 20 Jul 2007 00:30:58 -0000 1.3.4.37
+++ Labels.pm 20 Jul 2007 03:59:36 -0000 1.3.4.38
@@ -26,7 +26,7 @@
use Text::Wrap;
use Algorithm::CheckDigits;
# use Data::Dumper;
-# use Smart::Comments;
+ use Smart::Comments;
$VERSION = 0.01;
@@ -57,7 +57,9 @@
&add_batch &SetFontSize &printText
&GetItemFields
&get_text_fields
- get_layout &save_layout
+ get_layout &add_layout
+
+&save_layout
&set_active_layout &by_order
&build_text_dropbox
&delete_layout &get_active_layout
@@ -191,7 +193,7 @@
my ($layout_id, $sorttype) = @_;
#FIXME: use pushes, this is lame :)
- my ( $a, $b, $c, $d, $e, $f, $g, $h, $i, $j );
+ my ( $a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $k );
my $sortorder = get_layout($layout_id);
@@ -228,13 +230,15 @@
};
$h =
{ code => 'author', desc => "Author", order => $sortorder->{'author'} };
+
$i = { code => 'title', desc => "Title", order => $sortorder->{'title'} };
- $i = { code => 'itemcallnumber', desc => "Itemcallnumber", order =>
$sortorder->{'itemcallnumber'} };
+ $j = { code => 'itemcallnumber', desc => "Item-Callnumber", order =>
$sortorder->{'itemcallnumber'} };
+ $k = { code => 'subtitle', desc => "Subtitle", order =>
$sortorder->{'subtitle'} };
- my @text_fields = ( $a, $b, $c, $d, $e, $f, $g, $h, $i, $j );
+ my @text_fields = ( $a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $k );
my @new_fields;
foreach my $field (@text_fields) {
@@ -501,10 +505,13 @@
return @resultsloop;
}
-sub SaveConf {
+#
+#
+#
+sub add_layout {
my (
- $barcodetype, $title, $isbn, $issn,
+ $barcodetype, $title, $subtitle, $isbn, $issn,
$itemtype, $bcn, $dcn, $classif,
$subclass, $itemcallnumber, $author, $tmpl_id,
$printingtype, $guidebox, $startlabel, $layoutname
@@ -515,13 +522,13 @@
my $sth2 = $dbh->prepare($query2);
$sth2->execute();
my $query2 = "INSERT INTO labels_conf
- ( barcodetype, title, isbn,issn, itemtype, barcode,
+ ( barcodetype, title, subtitle, isbn,issn, itemtype, barcode,
dewey, class, subclass, itemcallnumber, author, printingtype,
guidebox, startlabel, layoutname, active )
- values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?, 1 )";
+ values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?, 1 )";
my $sth2 = $dbh->prepare($query2);
$sth2->execute(
- $barcodetype, $title, $isbn, $issn,
+ $barcodetype, $title, $subtitle, $isbn, $issn,
$itemtype, $bcn, $dcn, $classif,
$subclass, $itemcallnumber, $author, $printingtype,
@@ -529,31 +536,36 @@
);
$sth2->finish;
- SetActiveTemplate($tmpl_id);
return;
}
+
+
+
+
sub save_layout {
my (
- $barcodetype, $title, $isbn, $issn,
+ $barcodetype, $title, $subtitle , $isbn, $issn,
$itemtype, $bcn, $dcn, $classif,
$subclass, $itemcallnumber, $author, $tmpl_id,
$printingtype, $guidebox, $startlabel, $layoutname,
$layout_id
) = @_;
+
+### @_;
### $layoutname
### $layout_id
my $dbh = C4::Context->dbh;
my $query2 = "update labels_conf set
- barcodetype=?, title=?, isbn=?,issn=?,
+ barcodetype=?, title=?, subtitle=?, isbn=?,issn=?,
itemtype=?, barcode=?, dewey=?, class=?,
subclass=?, itemcallnumber=?, author=?, printingtype=?,
guidebox=?, startlabel=?, layoutname=? where id = ?";
my $sth2 = $dbh->prepare($query2);
$sth2->execute(
- $barcodetype, $title, $isbn, $issn,
+ $barcodetype, $title, $subtitle , $isbn, $issn,
$itemtype, $bcn, $dcn, $classif,
$subclass, $itemcallnumber, $author, $printingtype,
$guidebox, $startlabel, $layoutname, $layout_id
@@ -600,7 +612,7 @@
# lets get some summary info from each item
my $query1 = "
- select * from biblio,biblioitems,items where itemnumber=? and
+ select * from biblio,bibliOSUBTitle,biblioitems,items where
itemnumber=? and
items.biblioitemnumber=biblioitems.biblioitemnumber and
biblioitems.biblionumber=biblio.biblionumber";
@@ -613,6 +625,7 @@
$data1->{'batch_id'} = $batch_id;
$data1->{'summary'} =
"$data1->{'barcode'}, $data1->{'title'}, $data1->{'isbn'}";
+### $data1
push( @resultsloop, $data1 );
$sth1->finish;
- [Koha-cvs] koha/C4 Labels.pm [dev_week], (continued)
- [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/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 <=
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/20
- [Koha-cvs] koha/C4 Labels.pm [dev_week], Mason James, 2007/07/20