koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/opac opac-ISBDdetail.pl,1.5,1.6 opac-MARCdetail.pl,


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/opac opac-ISBDdetail.pl,1.5,1.6 opac-MARCdetail.pl,1.4,1.5 opac-detail.pl,1.16,1.17 opac-reserve.pl,1.22,1.23 opac-serial-issues.pl,1.1,1.2 opac-shelves.pl,1.5,1.6
Date: Tue, 01 Mar 2005 05:41:36 -0800

Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20915/opac

Modified Files:
        opac-ISBDdetail.pl opac-MARCdetail.pl opac-detail.pl 
        opac-reserve.pl opac-serial-issues.pl opac-shelves.pl 
Log Message:
merging 2.2 branch with head. Sorry for not making it before, many many commits 
done here

Index: opac-ISBDdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-ISBDdetail.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** opac-ISBDdetail.pl  12 Nov 2004 16:27:33 -0000      1.5
--- opac-ISBDdetail.pl  1 Mar 2005 13:41:32 -0000       1.6
***************
*** 110,114 ****
                                        for my $i (0..$#subf) {
                                                my $subfieldcode = $subf[$i][0];
!                                               my $subfieldvalue = 
$subf[$i][1];
                                                my $tagsubf = 
$tag.$subfieldcode;
                                                $calculated =~ 
s/\{(.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue\{$1$tagsubf$2\}$2/g;
--- 110,114 ----
                                        for my $i (0..$#subf) {
                                                my $subfieldcode = $subf[$i][0];
!                                               my $subfieldvalue = 
get_authorised_value_desc($tag, $subf[$i][0], $subf[$i][1], '', $dbh);
                                                my $tagsubf = 
$tag.$subfieldcode;
                                                $calculated =~ 
s/\{(.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue\{$1$tagsubf$2\}$2/g;
***************
*** 141,142 ****
--- 141,167 ----
  output_html_with_http_headers $query, $cookie, $template->output;
  
+ sub get_authorised_value_desc ($$$$$) {
+    my($tag, $subfield, $value, $framework, $dbh) = @_;
+ 
+    #---- branch
+     if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
+        return getbranchname($value);
+     }
+ 
+    #---- itemtypes
+    if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
+        return ItemType($value);
+     }
+ 
+    #---- "true" authorized value
+    my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
+ 
+    if ($category ne "") {
+        my $sth = $dbh->prepare("select lib from authorised_values where 
category = ? and authorised_value = ?");
+        $sth->execute($category, $value);
+        my $data = $sth->fetchrow_hashref;
+        return $data->{'lib'};
+    } else {
+        return $value; # if nothing is found return the original value
+    }
+ }

Index: opac-MARCdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-MARCdetail.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** opac-MARCdetail.pl  15 Jul 2004 09:43:23 -0000      1.4
--- opac-MARCdetail.pl  1 Mar 2005 13:41:32 -0000       1.5
***************
*** 112,116 ****
                                        $subfield_data{marc_value}="<a 
href=\"$subf[$i][1]\">$subf[$i][1]</a>";
                                } else {
!                                       $subfield_data{marc_value}=$subf[$i][1];
                                }
                                $subfield_data{marc_subfield}=$subf[$i][0];
--- 112,116 ----
                                        $subfield_data{marc_value}="<a 
href=\"$subf[$i][1]\">$subf[$i][1]</a>";
                                } else {
!                                       
$subfield_data{marc_value}=get_authorised_value_desc($field->tag(), 
$subf[$i][0], $subf[$i][1], '', $dbh);
                                }
                                $subfield_data{marc_subfield}=$subf[$i][0];
***************
*** 181,182 ****
--- 181,207 ----
  output_html_with_http_headers $query, $cookie, $template->output;
  
+ sub get_authorised_value_desc ($$$$$) {
+    my($tag, $subfield, $value, $framework, $dbh) = @_;
+ 
+    #---- branch
+     if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
+        return getbranchname($value);
+     }
+ 
+    #---- itemtypes
+    if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
+        return ItemType($value);
+     }
+ 
+    #---- "true" authorized value
+    my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
+ 
+    if ($category ne "") {
+        my $sth = $dbh->prepare("select lib from authorised_values where 
category = ? and authorised_value = ?");
+        $sth->execute($category, $value);
+        my $data = $sth->fetchrow_hashref;
+        return $data->{'lib'};
+    } else {
+        return $value; # if nothing is found return the original value
+    }
+ }

Index: opac-detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-detail.pl,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** opac-detail.pl      25 Jan 2005 17:13:24 -0000      1.16
--- opac-detail.pl      1 Mar 2005 13:41:32 -0000       1.17
***************
*** 30,34 ****
  my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
  my ($websitecount, @websites)             = &getwebsites($biblionumber);
! my $subscriptionid = getsubscriptionfrombiblionumber($biblionumber);
  
  $dat->{'count'address@hidden;
--- 30,34 ----
  my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
  my ($websitecount, @websites)             = &getwebsites($biblionumber);
! my $subscriptionsnumber = getsubscriptionfrombiblionumber($biblionumber);
  
  $dat->{'count'address@hidden;
***************
*** 36,40 ****
  $dat->{'additional'}=$addauthor->[0]->{'author'};
  for (my $i = 1; $i < $authorcount; $i++) {
!         $dat->{'additional'} .= "|" . $addauthor->[$i]->{'author'};
  } # for
  
--- 36,40 ----
  $dat->{'additional'}=$addauthor->[0]->{'author'};
  for (my $i = 1; $i < $authorcount; $i++) {
!         $dat->{'additional'} .= " ; " . $addauthor->[$i]->{'author'};
  } # for
  
***************
*** 71,75 ****
                                WEB_RESULTS => $webarray,
                                SITE_RESULTS => $sitearray,
!                               subscriptionid => $subscriptionid,
  );
    ## Amazon.com stuff
--- 71,75 ----
                                WEB_RESULTS => $webarray,
                                SITE_RESULTS => $sitearray,
!                               subscriptionsnumber => $subscriptionsnumber,
  );
    ## Amazon.com stuff
***************
*** 104,105 ****
--- 104,106 ----
  =cut
  output_html_with_http_headers $query, $cookie, $template->output;
+ 

Index: opac-reserve.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-reserve.pl,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** opac-reserve.pl     8 Nov 2004 19:56:26 -0000       1.22
--- opac-reserve.pl     1 Mar 2005 13:41:32 -0000       1.23
***************
*** 202,206 ****
        if ($proceed && $branch) {
                $fee = sprintf "%.02f", $fee;
!               $template->param(fee => $fee);
                $template->param(item_types_selected => 1);
        } else {
--- 202,206 ----
        if ($proceed && $branch) {
                $fee = sprintf "%.02f", $fee;
!               $template->param(fee => $fee,istherefee => $fee>0?1:0);
                $template->param(item_types_selected => 1);
        } else {
***************
*** 225,233 ****
                CreateReserve(undef,$branch,$borrowernumber,$biblionumber,'a', 
undef, $rank,'',$title);
        }
!       print $query->redirect("/cgi-bin/koha/opac-search.pl");
  } else {
        # Here we check that the borrower can actually make reserves Stage 1.
        my $noreserves = 0;
        my $maxoutstanding = C4::Context->preference("maxoustanding");
        if ($borr->{'amountoutstanding'} > $maxoutstanding) {
                my $amount = sprintf "\$%.02f", $borr->{'amountoutstanding'};
--- 225,234 ----
                CreateReserve(undef,$branch,$borrowernumber,$biblionumber,'a', 
undef, $rank,'',$title);
        }
!       print $query->redirect("/cgi-bin/koha/opac-user.pl");
  } else {
        # Here we check that the borrower can actually make reserves Stage 1.
        my $noreserves = 0;
        my $maxoutstanding = C4::Context->preference("maxoustanding");
+       $template->param(noreserve => 1) unless $maxoutstanding;
        if ($borr->{'amountoutstanding'} > $maxoutstanding) {
                my $amount = sprintf "\$%.02f", $borr->{'amountoutstanding'};

Index: opac-serial-issues.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-serial-issues.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** opac-serial-issues.pl       12 Aug 2004 14:50:29 -0000      1.1
--- opac-serial-issues.pl       1 Mar 2005 13:41:32 -0000       1.2
***************
*** 18,25 ****
  # my $id;
  my ($template, $loggedinuser, $cookie);
! my ($subscriptionid);
! 
! $subscriptionid = $query->param('subscriptionid');
! my $subscription = &getsubscription($subscriptionid);
  
  ($template, $loggedinuser, $cookie)
--- 18,23 ----
  # my $id;
  my ($template, $loggedinuser, $cookie);
! my $biblionumber = $query->param('biblionumber');
! my $subscriptions = get_subscription_list_from_biblionumber($biblionumber);
  
  ($template, $loggedinuser, $cookie)
***************
*** 32,57 ****
  
  # replace CR by <br> in librarian note
! $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
  
  $template->param(
!       startdate => format_date($subscription->{startdate}),
!       periodicity => $subscription->{periodicity},
!       dow => $subscription->{dow},
!       numberlength => $subscription->{numberlength},
!       weeklength => $subscription->{weeklength},
!       monthlength => $subscription->{monthlength},
!       opacnote => $subscription->{opacnote},
!       numberingmethod => $subscription->{numberingmethod},
!       arrivalplanified => $subscription->{arrivalplanified},
!       status => $subscription->{status},
!       biblionumber => $subscription->{biblionumber},
!       bibliotitle => $subscription->{bibliotitle},
!       notes => $subscription->{notes},
!       subscriptionid => $subscription->{subscriptionid}
        );
! $template->param(
!                       "periodicity$subscription->{periodicity}" => 1,
!                       "arrival$subscription->{dow}" => 1,
!                       );
  
  output_html_with_http_headers $query, $cookie, $template->output;
--- 30,57 ----
  
  # replace CR by <br> in librarian note
! # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
  
  $template->param(
!       biblionumber => $query->param('biblionumber'),
!       subscription_LOOP => $subscriptions
! #     startdate => format_date($subscription->{startdate}),
! #     periodicity => $subscription->{periodicity},
! #     dow => $subscription->{dow},
! #     numberlength => $subscription->{numberlength},
! #     weeklength => $subscription->{weeklength},
! #     monthlength => $subscription->{monthlength},
! #     opacnote => $subscription->{opacnote},
! #     numberingmethod => $subscription->{numberingmethod},
! #     arrivalplanified => $subscription->{arrivalplanified},
! #     status => $subscription->{status},
! #     biblionumber => $subscription->{biblionumber},
! #     bibliotitle => $subscription->{bibliotitle},
! #     notes => $subscription->{notes},
! #     subscriptionid => $subscription->{subscriptionid}
        );
! # $template->param(
! #                     "periodicity$subscription->{periodicity}" => 1,
! #                     "arrival$subscription->{dow}" => 1,
! #                     );
  
  output_html_with_http_headers $query, $cookie, $template->output;

Index: opac-shelves.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-shelves.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** opac-shelves.pl     27 Jan 2005 17:27:11 -0000      1.5
--- opac-shelves.pl     1 Mar 2005 13:41:32 -0000       1.6
***************
*** 38,42 ****
                                                        query => $query,
                                                        type => "opac",
!                                                       authnotrequired => 0,
                                                });
  
--- 38,42 ----
                                                        query => $query,
                                                        type => "opac",
!                                                       authnotrequired => 1,
                                                });
  
***************
*** 58,63 ****
  
  $template->param({    loggedinuser => $loggedinuser,
!                                       headerbackgroundcolor => 
$headerbackgroundcolor,
!                                       circbackgroundcolor => 
$circbackgroundcolor });
  SWITCH: {
        if ($query->param('op') eq 'modifsave') {
--- 58,62 ----
  
  $template->param({    loggedinuser => $loggedinuser,
!                               });
  SWITCH: {
        if ($query->param('op') eq 'modifsave') {
***************
*** 185,188 ****
--- 184,190 ----
  #
  # $Log$
+ # Revision 1.6  2005/03/01 13:41:32  tipaul
+ # merging 2.2 branch with head. Sorry for not making it before, many many 
commits done here
+ #
  # Revision 1.5  2005/01/27 17:27:11  oleonard
  # Taking table cell background color information out of the script and moving 
it into the template (requires update to opac-shelves.tmpl)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]