From 3a3f9bbb47f107c4d1fea26806daa3cacf1b46f3 Mon Sep 17 00:00:00 2001 From: tipaul Date: Thu, 22 Sep 2005 15:31:05 +0000 Subject: [PATCH] see mail on koha-devel : code cleaning on Search.pm + normalizing API + use of biblionumber everywhere (instead of bn, biblio, ...) --- C4/Circulation/Returns.pm | 6 ++--- koha-curses/circ.pl | 2 +- .../en/acqui.simple/addbiblio-nomarc.tmpl | 10 +++---- .../default/en/bull/statecollection.tmpl | 2 +- .../default/en/bull/subscription-add.tmpl | 26 ++++++++++--------- .../default/en/bull/subscription-detail.tmpl | 7 +++-- .../default/en/catalogue/detail.tmpl | 14 +++++----- .../default/en/members/moremember.tmpl | 3 ++- .../intranet-tmpl/default/en/request.tmpl | 17 ++++++++---- .../default/en/search.marc/search.tmpl | 7 ++++- .../en/value_builder/unimarc_field_210c.tmpl | 2 +- search.marc/search.pl | 23 +++++++--------- 12 files changed, 67 insertions(+), 52 deletions(-) diff --git a/C4/Circulation/Returns.pm b/C4/Circulation/Returns.pm index 1379abea12..ccb139d1a2 100755 --- a/C4/Circulation/Returns.pm +++ b/C4/Circulation/Returns.pm @@ -38,7 +38,7 @@ use C4::Circulation::Main; # use each other, so functions get redefined. use C4::Scan; use C4::Stats; -use C4::Search; +use C4::Members; use C4::Print; use vars qw($VERSION @ISA @EXPORT); @@ -90,7 +90,7 @@ sub Returns { if ($resp ne "") { #if ($resp eq "Returned") { if ($itemno ne "" ) { - my $item = itemnodata($env,$dbh,$itemno); + my $item = getbibliofromitemnumber($env,$dbh,$itemno); # FIXME - This relies on C4::Circulation::Main to have a # "use C4::Circulation::Issues;" line, which is bogus. my $fmtitem = C4::Circulation::Issues::formatitem($env,$item,"",$amt_owing); @@ -282,7 +282,7 @@ sub updatelastseen { # obsolete. So presumably this function is obsolete too. sub find_reserves { my ($env,$dbh,$itemno) = @_; - my $itemdata = itemnodata($env,$dbh,$itemno); + my $itemdata = getbibliofromitemnumber($env,$dbh,$itemno); my $sth = $dbh->prepare("select * from reserves where found is null and biblionumber = ? and cancellationdate is NULL order by priority,reservedate "); diff --git a/koha-curses/circ.pl b/koha-curses/circ.pl index 087c34cfaa..e668023298 100755 --- a/koha-curses/circ.pl +++ b/koha-curses/circ.pl @@ -23,7 +23,7 @@ use strict; use lib '/usr/local/koha/intranet/modules'; use Curses::UI; use C4::Circulation::Circ2; -use C4::Search; +use C4::Members; use C4::Print; use C4::Context; diff --git a/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio-nomarc.tmpl b/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio-nomarc.tmpl index acb96904f7..f0797fb1e7 100644 --- a/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio-nomarc.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio-nomarc.tmpl @@ -3,7 +3,7 @@

Adding a new Biblio

-
+

Section One: Copyright Information

@@ -23,11 +23,11 @@

Subject Headings: One Subject per line

- +

-

-

-

+

+

+

* Required diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl index 8e6d44d17e..25b0739d8e 100644 --- a/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl @@ -71,7 +71,7 @@ - " size=10 maxlength=15> + " size=20 maxlength=255> diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/subscription-add.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/subscription-add.tmpl index 9194edac5b..05e9093172 100644 --- a/koha-tmpl/intranet-tmpl/default/en/bull/subscription-add.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/bull/subscription-add.tmpl @@ -18,18 +18,20 @@

" size=4> (" disabled readonly>)...

" size=4> (" disabled readonly>)...

-

- -

+ +

+ +

+

warning

  • remember you must have created a biblio before creating a subscription
  • diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl index 5dd3fdaa78..941266c456 100644 --- a/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl @@ -3,7 +3,8 @@

    Planning

    diff --git a/koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl index 79b9efecdb..7622735f4c 100644 --- a/koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl @@ -4,10 +4,10 @@

    ()

    diff --git a/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl index bb1202ca8c..e5c4b21489 100644 --- a/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl @@ -268,7 +268,7 @@ None
    - +

    Alert subscriptions

    @@ -285,6 +285,7 @@
    +
    diff --git a/koha-tmpl/intranet-tmpl/default/en/request.tmpl b/koha-tmpl/intranet-tmpl/default/en/request.tmpl index 6bab85074c..99d9ea0a8b 100644 --- a/koha-tmpl/intranet-tmpl/default/en/request.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/request.tmpl @@ -1,11 +1,11 @@
    - "> + "> ">

    - Requesting: "> + Requesting: ">

    @@ -24,7 +24,14 @@

    (Quick Search)

    -

    +

    + +

    Next Available, or choose from list below

    @@ -89,7 +96,7 @@ "> - "> + "> - +

    diff --git a/koha-tmpl/intranet-tmpl/default/en/value_builder/unimarc_field_210c.tmpl b/koha-tmpl/intranet-tmpl/default/en/value_builder/unimarc_field_210c.tmpl index 793a9528ca..64197eeeb2 100644 --- a/koha-tmpl/intranet-tmpl/default/en/value_builder/unimarc_field_210c.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/value_builder/unimarc_field_210c.tmpl @@ -104,7 +104,7 @@ function report(index,summary) { - var regexp= /(\d* \/ *)(.*)/; + var regexp= /(\d* - *)(.*)/; var result=summary.match(regexp); opener.document.f.field_value[index].value=result[2]; self.close(); diff --git a/search.marc/search.pl b/search.marc/search.pl index 21d0e8c050..8ba60de44e 100755 --- a/search.marc/search.pl +++ b/search.marc/search.pl @@ -343,26 +343,23 @@ else { my @branches; my @select_branch; my %select_branches; - my ($count2,@branches)=branches(); - push @select_branch, ""; - $select_branches{''} = ""; - for (my $i=0;$i<$count2;$i++){ - push @select_branch, $branches[$i]->{'branchcode'};# - $select_branches{$branches[$i]->{'branchcode'}} = $branches[$i]->{'branchname'}; + my $branches=getbranches(); + my @branchloop; + foreach my $thisbranch (sort keys %$branches) { +# my $selected = 1 if $thisbranch eq $branch; + my %row =(value => $thisbranch, +# selected => $selected, + branchname => $branches->{$thisbranch}->{'branchname'}, + ); + push @branchloop, \%row; } - my $CGIbranch=CGI::scrolling_list( -name => 'value', - -id => 'branch', - -values => \@select_branch, - -labels => \%select_branches, - -size => 1, - -multiple => 0 ); $sth->finish; $template->param("statements" => \@statements, "nbstatements" => 3, CGIitemtype => $CGIitemtype, - CGIbranch => $CGIbranch, + branchloop => \@branchloop, ); } -- 2.39.5