Merge remote-tracking branch 'origin/new/bug_6842'
authorPaul Poulain <paul.poulain@biblibre.com>
Fri, 10 Feb 2012 14:19:20 +0000 (15:19 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 10 Feb 2012 14:19:20 +0000 (15:19 +0100)
95 files changed:
C4/Auth.pm [changed mode: 0755->0644]
C4/Biblio.pm
C4/Circulation.pm
C4/ImportExportFramework.pm [changed mode: 0755->0644]
C4/Items.pm
C4/Members.pm
C4/SIP/SIPconfig.xml [deleted file]
C4/SIP/sip_run.sh [deleted file]
C4/SIP/sip_shutdown.sh [deleted file]
C4/TTParser.pm [changed mode: 0755->0644]
C4/XSLT.pm [changed mode: 0755->0644]
acqui/pdfformat/layout2pages.pm [changed mode: 0755->0644]
acqui/pdfformat/layout3pages.pm [changed mode: 0755->0644]
acqui/z3950_search.pl
admin/aqbudgetperiods.pl
admin/authorised_values.pl
catalogue/detail.pl
cataloguing/addbiblio.pl
circ/circulation.pl
debian/docs/koha-create.xml
debian/docs/koha-remove.xml
debian/scripts/koha-create
debian/scripts/koha-remove
docs/history.txt
etc/SIPconfig.xml [new file with mode: 0644]
etc/zebradb/marc_defs/marc21/biblios/record.abs [changed mode: 0755->0644]
installer/data/mysql/atomicupdate/bug_6843_Renew_membership_from_expiry_or_current_date.pl [new file with mode: 0755]
installer/data/mysql/de-DE/optional/sample_patrons.sql
installer/data/mysql/en/optional/sample_patrons.sql
installer/data/mysql/es-ES/optional/sample_patrons.sql
installer/data/mysql/nb-NO/2-Valgfritt/sample_patrons.sql
installer/data/mysql/pl-PL/optional/sample_patrons.sql
installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql [changed mode: 0755->0644]
installer/data/mysql/sysprefs.sql [changed mode: 0755->0644]
installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql [changed mode: 0755->0644]
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/js/basket.js
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt
koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/lateorders.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/supplier.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/branches.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/members/boraccount.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt
koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt
koha-tmpl/opac-tmpl/prog/en/css/opac.css [changed mode: 0755->0644]
koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc [changed mode: 0755->0644]
koha-tmpl/opac-tmpl/prog/en/includes/page-numbers.inc
koha-tmpl/opac-tmpl/prog/en/js/basket.js
koha-tmpl/opac-tmpl/prog/en/js/localcovers.js
koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt [changed mode: 0755->0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt [changed mode: 0755->0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl [changed mode: 0755->0644]
koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl
kohaversion.pl
members/boraccount.pl
members/deletemem.pl
members/mancredit.pl
members/maninvoice.pl
members/member-flags.pl
members/member-password.pl
members/moremember.pl
members/notices.pl
members/pay.pl
members/paycollect.pl
members/readingrec.pl
misc/bin/sip_run.sh [new file with mode: 0755]
misc/bin/sip_shutdown.sh [new file with mode: 0755]
reports/reserves_stats.pl
reserve/request.pl
t/Koha_template_plugin_KohaDates.t [deleted file]
t/db_dependent/Koha_template_plugin_KohaDates.t [new file with mode: 0644]
tags/list.pl [new file with mode: 0755]
xt/find-misplaced-executables [new file with mode: 0755]

old mode 100755 (executable)
new mode 100644 (file)
index 631e891..98e4f5b 100644 (file)
@@ -1048,7 +1048,6 @@ sub GetMarcFromKohaField {
     if ( my $mf = $relations->{$frameworkcode}->{$kohafield} ) {
         return @$mf;
     }
-    warn qq{No marc tags for framework "$frameworkcode" field $kohafield};
     return (0, undef);
 }
 
index 411ce6f..5894154 100644 (file)
@@ -1025,6 +1025,12 @@ sub AddIssue {
           CartToShelf( $item->{'itemnumber'} );
         }
         $item->{'issues'}++;
+
+        ## If item was lost, it has now been found, reverse any list item charges if neccessary.
+        if ( $item->{'itemlost'} ) {
+            _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} );
+        }
+
         ModItem({ issues           => $item->{'issues'},
                   holdingbranch    => C4::Context->userenv->{'branch'},
                   itemlost         => 0,
@@ -1866,10 +1872,11 @@ sub _FixAccountForLostAndReturned {
     my $item_id        = @_ ? shift : $itemnumber;  # Send the barcode if you want that logged in the description
     my $dbh = C4::Context->dbh;
     # check for charge made for lost book
-    my $sth = $dbh->prepare("SELECT * FROM accountlines WHERE (itemnumber = ?) AND (accounttype='L' OR accounttype='Rep') ORDER BY date DESC");
+    my $sth = $dbh->prepare("SELECT * FROM accountlines WHERE itemnumber = ? AND accounttype IN ('L', 'Rep', 'W') ORDER BY date DESC, accountno DESC");
     $sth->execute($itemnumber);
     my $data = $sth->fetchrow_hashref;
     $data or return;    # bail if there is nothing to do
+    $data->{accounttype} eq 'W' and return;    # Written off
 
     # writeoff this amount
     my $offset;
old mode 100755 (executable)
new mode 100644 (file)
index eb1c51c..04cb417 100644 (file)
@@ -1629,7 +1629,7 @@ sub GetHiddenItemnumbers {
     my @resultitems;
 
     my $yaml = C4::Context->preference('OpacHiddenItems');
-    $yaml = "$yaml\n"; # YAML is anal on ending \n. Surplus does not hurt
+    $yaml = "$yaml\n\n"; # YAML is anal on ending \n. Surplus does not hurt
     my $hidingrules;
     eval {
         $hidingrules = YAML::Load($yaml);
index 1d7bc42..b81872c 100644 (file)
@@ -1687,7 +1687,9 @@ sub ExtendMemberSubscriptionTo {
     my $dbh = C4::Context->dbh;
     my $borrower = GetMember('borrowernumber'=>$borrowerid);
     unless ($date){
-      $date=POSIX::strftime("%Y-%m-%d",localtime());
+      $date = (C4::Context->preference('BorrowerRenewalPeriodBase') eq 'dateexpiry') ?
+                                        C4::Dates->new($borrower->{'dateexpiry'}, 'iso')->output("iso") :
+                                        C4::Dates->new()->output("iso");
       $date = GetExpiryDate( $borrower->{'categorycode'}, $date );
     }
     my $sth = $dbh->do(<<EOF);
diff --git a/C4/SIP/SIPconfig.xml b/C4/SIP/SIPconfig.xml
deleted file mode 100644 (file)
index f229b9a..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<acsconfig xmlns="http://openncip.org/acs-config/1.0/">
-<!-- above address gets nothing, it's just a namespace -->
-  <error-detect enabled="true" />
-
-<!--
-  Set Net::Server::PreFork runtime parameters 
-  syslog_ident will identify SIP2 Koha server entries in syslog
-  For OpenSolaris, add: syslog_logsock=stream
--->
-  <server-params
-    min_servers='1'
-    min_spare_servers='0' 
-    log_file='Sys::Syslog'
-    syslog_ident='koha_sip'
-    syslog_facility='local6'
-  />
-  
-  <listeners>
-<!-- vestigial HTTP, never implemented: just use the OPAC!
-       <service
-      port="0:8080/tcp"
-      transport="http"
-      protocol="NCIP/1.0" />
--->
-    <service
-      port="8023/tcp"
-      transport="telnet"
-      protocol="SIP/2.00"
-      timeout="60" />
-
-    <service
-      port="127.0.0.1:6001/tcp"
-      transport="RAW" 
-      protocol="SIP/2.00"
-      timeout="60" />
-  </listeners>
-
-  <accounts>
-      <login id="term1"  password="term1" delimiter="|" error-detect="enabled" institution="CPL" />
-      <login id="koha"   password="koha"  delimiter="|" error-detect="enabled" institution="kohalibrary" />
-      <login id="koha2"  password="koha" institution="kohalibrary2" />
-      <login id="lpl-sc" password="1234" institution="LPL" />
-      <login id="lpl-sc-beacock" password="xyzzy"
-             delimiter="|" error-detect="enabled" institution="LPL" />
-  </accounts>
-
-<!--
-Institution tags are for enabled branches.  There needs to be one
-institution stanza for each institution named in the accounts above.
-The implementation attribute is actually used to find the code to run,
-in our case "ILS".
--->
-
-<institutions>
-    <institution id="MAIN" implementation="ILS" parms="">
-          <policy checkin="true" renewal="true" checkout="true"
-                 status_update="false" offline="false"
-                 timeout="100"
-                 retries="5" />
-    </institution>
-    <institution id="CPL" implementation="ILS" parms="">
-          <policy checkin="true" renewal="true" checkout="true"
-                 status_update="false" offline="false"
-                 timeout="25"
-                 retries="5" />
-    </institution>
-    <institution id="kohalibrary" implementation="ILS" parms="">
-          <policy checkin="true" renewal="false" checkout="true"
-                 status_update="false" offline="false"
-                 timeout="100"
-                 retries="5" />
-    </institution>
-    <institution id="kohalibrary2" implementation="ILS" parms="">
-          <policy checkin="true" renewal="false" checkout="true"
-                 timeout="100"
-                 retries="3" />
-    </institution>
-    <institution id="LPL" implementation="ILS">
-          <policy checkin="true" renewal="false" checkout="true"
-                 timeout="100"
-                 retries="5" />
-    </institution>
-</institutions>
-</acsconfig>
diff --git a/C4/SIP/sip_run.sh b/C4/SIP/sip_run.sh
deleted file mode 100755 (executable)
index 587e323..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-# 
-# A sample script for starting SIP.  
-# You probably want to specify new log destinations.
-#
-# Takes 3 optional arguments:
-# ~ SIPconfig.xml file to use
-# ~ file for STDOUT, default ~/sip.out
-# ~ file for STDERR, default ~/sip.err
-#
-# The STDOUT and STDERR files are only for the SIPServer process itself.
-# Actual SIP communication and transaction logs are handled by Syslog.
-#
-# Examples:
-#   sip_run.sh /path/to/SIPconfig.xml
-#   sip_run.sh ~/my_sip/SIPconfig.xml sip_out.log sip_err.log
-
-
-for x in HOME PERL5LIB KOHA_CONF ; do
-       echo $x=${!x}
-       if [ -z ${!x} ] ; then 
-               echo ERROR: $x not defined;
-               exit 1;
-       fi;
-done;
-unset x;
-cd $PERL5LIB/C4/SIP;
-echo;
-echo Running from `pwd`;
-
-sipconfig=${1:-`pwd`/SIPconfig.xml};
-outfile=${2:-$HOME/sip.out};
-errfile=${3:-$HOME/sip.err};
-
-echo "Calling (backgrounded):";
-echo "perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile";
-perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile &
diff --git a/C4/SIP/sip_shutdown.sh b/C4/SIP/sip_shutdown.sh
deleted file mode 100755 (executable)
index 07abbce..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-. $HOME/.bash_profile
-
-# this is brittle: the primary server must have the lowest PPID
-# this is brittle: ps behavior is very platform-specific, only tested on Debian Etch
-
-target="SIPServer";
-PROCPID=$(ps x -o pid,ppid,args --sort ppid | grep "$target" | grep -v grep | head -1 | awk '{print $1}');
-
-if [ ! $PROCPID ] ; then
-    echo "No processes found for $target";
-    exit;
-fi
-
-echo "SIP Processes for this user ($USER):";
-ps x -o pid,ppid,args --sort ppid | grep "$target" | grep -v grep ;
-echo "Killing process #$PROCPID";
-kill $PROCPID;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 47dbe52..80503e0 100755 (executable)
@@ -134,8 +134,17 @@ if ( $op ne "do_search" ) {
 }
 else {
     my @id = $input->param('id');
+
+    if ( not defined @id ) {
+        # empty server list -> report and exit
+        $template->param( emptyserverlist => 1 );
+        output_html_with_http_headers $input, $cookie, $template->output;
+        exit;
+    }
+
     my @oConnection;
     my @oResult;
+    my @errconn;
     my $s = 0;
     my $query;
     my $nterms;
@@ -164,7 +173,7 @@ else {
         $query .= " \@attr 1=21 \"$subject\" ";
         $nterms++;
     }
-       if ($lccn) {    
+    if ($lccn) {
         $query .= " \@attr 1=9 $lccn ";
         $nterms++;
     }
@@ -186,7 +195,6 @@ warn "query ".$query  if $DEBUG;
         $sth->execute($servid);
         while ( $server = $sth->fetchrow_hashref ) {
             warn "serverinfo ".join(':',%$server) if $DEBUG;
-            my $noconnection = 0;
             my $option1      = new ZOOM::Options();
             $option1->option( 'async' => 1 );
             $option1->option( 'elementSetName', 'F' );
@@ -237,9 +245,10 @@ sub displayresults {
         my ( $error, $errmsg, $addinfo, $diagset ) =
           $oConnection[$k]->error_x();
         if ($error) {
-            warn "$k $serverhost[$k] error $query: $errmsg ($error) $addinfo\n"
-              if $DEBUG;
-
+            if ($error =~ m/^(10000|10007)$/ ) {
+                push(@errconn, {'server' => $serverhost[$k]});
+            }
+            $DEBUG and warn "$k $serverhost[$k] error $query: $errmsg ($error) $addinfo\n";
         }
         else {
             my $numresults = $oResult[$k]->size();
@@ -280,13 +289,6 @@ sub displayresults {
                           )
                           = ImportBreeding( $marcdata, 2, $serverhost[$k], $encoding[$k], $random, 'z3950' );
                         my %row_data;
-                        if ( $i % 2 ) {
-                            $toggle = 1;
-                        }
-                        else {
-                            $toggle = 0;
-                        }
-                        $row_data{toggle}       = $toggle;
                         $row_data{server}       = $servername[$k];
                         $row_data{isbn}         = $oldbiblio->{isbn};
                         $row_data{lccn}         = $oldbiblio->{lccn};
@@ -295,9 +297,9 @@ sub displayresults {
                         $row_data{breedingid}   = $breedingid;
                         $row_data{biblionumber} = $biblionumber;
                         push( @breeding_loop, \%row_data );
-                           
+
                     } else {
-                        push(@breeding_loop,{'toggle'=>($i % 2)?1:0,'server'=>$servername[$k],'title'=>join(': ',$oConnection[$k]->error_x()),'breedingid'=>-1,'biblionumber'=>-1});
+                        push(@breeding_loop,{'server'=>$servername[$k],'title'=>join(': ',$oConnection[$k]->error_x()),'breedingid'=>-1,'biblionumber'=>-1});
                     } # $rec
                 }    # upto 5 results
             }    #$numresults
@@ -308,10 +310,11 @@ sub displayresults {
         breeding_loop => \@breeding_loop,
         server        => $servername[$k],
         numberpending => $numberpending,
+        errconn       => \@errconn
     );
     output_html_with_http_headers $input, $cookie, $template->output if $numberpending == 0;
 
-    #          print  $template->output  if $firstresult !=1;
+    #   print  $template->output  if $firstresult !=1;
     $firstresult++;
 }
 displayresults();
index e74935e..64b333a 100755 (executable)
@@ -37,6 +37,10 @@ script to administer the budget periods table
        - we show the record having primkey=$primkey and ask for deletion validation form
  if $op=delete_confirmed
        - we delete the record having primkey=$primkey
+ if $op=duplicate_form
+  - displays the duplication of budget period form (allowing specification of dates)
+ if $op=duplicate_budget
+  - we perform the duplication of the budget period specified as budget_period_id
 
 =cut
 
@@ -54,6 +58,7 @@ use C4::Output;
 use C4::Acquisition;
 use C4::Budgets;
 use C4::Debug;
+use C4::SQLHelper;
 
 my $dbh = C4::Context->dbh;
 
@@ -169,6 +174,74 @@ elsif ( $op eq 'delete_confirmed' ) {
        $op='else';
 }
 
+# display the form for duplicating
+elsif ( $op eq 'duplicate_form'){
+    $template->param(
+        DHTMLcalendar_dateformat       => C4::Dates->DHTMLcalendar(),
+        'duplicate_form' => '1',
+        'budget_period_id' => $budget_period_id,
+    );
+}
+
+# handle the actual duplication
+elsif ( $op eq 'duplicate_budget' ){
+    die "please specify a budget period id\n" if( !defined $budget_period_id || $budget_period_id eq '' );
+    my $startdate = $input->param('budget_period_startdate');
+    my $enddate = $input->param('budget_period_enddate');
+
+    my $data = GetBudgetPeriod( $budget_period_id);
+
+    $data->{'budget_period_startdate'} = $startdate;
+    $data->{'budget_period_enddate'} = $enddate;
+    delete $data->{'budget_period_id'};
+    my $new_budget_period_id = C4::SQLHelper::InsertInTable('aqbudgetperiods', $data);
+
+    my $tree = GetBudgetHierarchy( $budget_period_id );
+
+    # hash mapping old ids to new
+    my %old_new;
+    # hash mapping old parent ids to list of new children ids
+    # only store a child here if the parents old id isnt in the old_new map
+    # when the parent is found, this map will be used, and then the entry removed and their id placed in old_new
+    my %parent_children;
+
+    for my $entry( @$tree ){
+        die "serious errors, parent period $budget_period_id doesnt match child ", $entry->{'budget_period_id'}, "\n" if( $entry->{'budget_period_id'} != $budget_period_id );
+        my $orphan = 0; # set to 1 if we need to make an entry in parent_children
+        my $old_id = delete $entry->{'budget_id'};
+        my $parent_id = delete $entry->{'budget_parent_id'};
+        $entry->{'budget_period_id'} = $new_budget_period_id;
+
+        if( !defined $parent_id ){
+        } elsif( defined $parent_id && $parent_id eq '' ){
+        } elsif( defined $old_new{$parent_id} ){
+            # set parent id now
+            $entry->{'budget_parent_id'} = $old_new{$parent_id};
+        } else {
+            # make an entry in parent_children
+            $parent_children{$parent_id} = [] unless defined $parent_children{$parent_id};
+            $orphan = 1;
+        }
+
+        # write it to db
+        my $new_id = C4::SQLHelper::InsertInTable('aqbudgets', $entry);
+        $old_new{$old_id} = $new_id;
+        push @{$parent_children{$parent_id}}, $new_id if $orphan;
+
+        # deal with any children
+        if( defined $parent_children{$old_id} ){
+            # tell my children my new id
+            for my $child ( @{$parent_children{$old_id}} ){
+                C4::SQLHelper::UpdateInTable('aqcudgets', [ 'budget_id' => $child, 'budget_parent_id' => $new_id ]);
+            }
+            delete $parent_children{$old_id};
+        }
+    }
+
+    # display the list of budgets
+    $op = 'else';
+}
+
 # DEFAULT - DISPLAY AQPERIODS TABLE
 # -------------------------------------------------------------------
 # display the list of budget periods
index d7872d6..5282022 100755 (executable)
@@ -104,15 +104,14 @@ if ($op eq 'add_form') {
     my $duplicate_entry = 0;
 
     if ( $id ) { # Update
-        my $sth = $dbh->prepare( "SELECT category, authorised_value FROM authorised_values WHERE id='$id' ");
-        $sth->execute();
+        my $sth = $dbh->prepare( "SELECT category, authorised_value FROM authorised_values WHERE id = ? ");
+        $sth->execute($id);
         my ($category, $authorised_value) = $sth->fetchrow_array();
         if ( $authorised_value ne $new_authorised_value ) {
             my $sth = $dbh->prepare_cached( "SELECT COUNT(*) FROM authorised_values " .
-                "WHERE category = '$new_category' AND authorised_value = '$new_authorised_value' and id<>$id");
-            $sth->execute();
+                "WHERE category = ? AND authorised_value = ? and id <> ? ");
+            $sth->execute($new_category, $new_authorised_value, $id);
             ($duplicate_entry) = $sth->fetchrow_array();
-            warn "**** duplicate_entry = $duplicate_entry";
         }
         unless ( $duplicate_entry ) {
             my $sth=$dbh->prepare( 'UPDATE authorised_values
@@ -133,8 +132,8 @@ if ($op eq 'add_form') {
     }
     else { # Insert
         my $sth = $dbh->prepare_cached( "SELECT COUNT(*) FROM authorised_values " .
-            "WHERE category = '$new_category' AND authorised_value = '$new_authorised_value' ");
-        $sth->execute();
+            "WHERE category = ? AND authorised_value = ? ");
+        $sth->execute($new_category, $new_authorised_value);
         ($duplicate_entry) = $sth->fetchrow_array();
         unless ( $duplicate_entry ) {
             my $sth=$dbh->prepare( 'INSERT INTO authorised_values
index fcf1f2b..db38551 100755 (executable)
@@ -35,6 +35,7 @@ use C4::Serials;
 use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
 use C4::External::Amazon;
 use C4::Search;                # enabled_staff_search_views
+use C4::Tags qw(get_tags);
 use C4::VirtualShelves;
 use C4::XSLT;
 use C4::Images;
@@ -395,4 +396,16 @@ if (C4::Context->preference('OPACBaseURL')){
      $template->param( OpacUrl => C4::Context->preference('OPACBaseURL') );
 }
 
+# Displaying tags
+
+my $tag_quantity;
+if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnDetail')) {
+    $template->param(
+        TagsEnabled => 1,
+        TagsShowOnDetail => $tag_quantity
+    );
+    $template->param(TagLoop => get_tags({biblionumber=>$biblionumber, approved=>1,
+                                'sort'=>'-weight', limit=>$tag_quantity}));
+}
+
 output_html_with_http_headers $query, $cookie, $template->output;
index 568007e..f29e410 100755 (executable)
@@ -467,21 +467,8 @@ sub create_input {
                     value=\"$value\" \/>
             ";
     }
-    elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) {
-        $subfield_data{marc_value} =
-            "<input type=\"text\"
-                    id=\"".$subfield_data{id}."\"
-                    name=\"".$subfield_data{id}."\"
-                    class=\"input_marceditor\"
-                    tabindex=\"1\"
-                    size=\"67\"
-                    maxlength=\"$max_length\"
-                    value=\"$value\"
-            \/>";
-
-        # it's a standard field
-    }
     else {
+        # it's a standard field
         if (
             length($value) > 100
             or
index 1b6c619..e8d22cb 100755 (executable)
@@ -705,6 +705,7 @@ $template->param(
     soundon           => C4::Context->preference("SoundOn"),
     fast_cataloging   => $fast_cataloging,
     CircAutoPrintQuickSlip   => C4::Context->preference("CircAutoPrintQuickSlip"),
+       activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
 );
 
 # save stickyduedate to session
index a3e1520..ec1e426 100644 (file)
   <refsynopsisdiv>
     <cmdsynopsis>
       <command>koha-create</command>
-      <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option></arg>
+      <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option>|<option>--use-db</option></arg>
       <arg><option>--marcflavor</option> marc21|normarc|unimarc</arg>
       <arg><option>--zebralang</option> en|nb|fr</arg>
       <arg><option>--defaultsql</option> /path/to/some.sql</arg>
       <arg><option>--configfile</option> /path/to/config</arg>
+      <arg><option>--passwdfile</option> /path/to/passwd</arg>
+      <arg><option>--database</option> database</arg>
       <arg><option>--adminuser</option> n</arg>
       <arg choice="req" rep="norepeat"><replaceable>instancename</replaceable></arg>
     </cmdsynopsis>
@@ -40,7 +42,7 @@
     <varlistentry>
       <term><option>--create-db</option></term>
       <listitem>
-        <para>Create a new datbase on localhost. If the database you want to use does not reside on localhost, you  can  use <option>--request-db</option> and <option>--populate-db</option>, see below.</para>
+        <para>Create a new database on localhost. If the database you want to use does not reside on localhost, you can use <option>--request-db</option> and <option>--populate-db</option>, see below. If the database already exists, you can use <option>--use-db</option>, see below.</para>
       </listitem>
     </varlistentry>
     
     <varlistentry>
       <term><option>--populate-db</option></term>
       <listitem>
-        <para>When you have run koha-create with the <option>--request-db</option> option, and a database has been set up, you can finnish your installation by running <command>koha-create</command> with this option.</para>
+        <para>When you have run koha-create with the <option>--request-db</option> option, and a database has been set up, you can finish your installation by running <command>koha-create</command> with this option.</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><option>--use-db</option></term>
+      <listitem>
+        <para>When the database you want to use has already been populated, you can run <command>koha-create</command> with this option to take care of all the other set-up configuration.</para>
       </listitem>
     </varlistentry>
 
       </listitem>
     </varlistentry>
 
+    <varlistentry>
+      <term><option>--database</option></term>
+      <listitem>
+        <para>MySQL database to use.</para>
+      </listitem>
+    </varlistentry>
+
     <varlistentry>
       <term><option>--defaultsql</option></term>
       <listitem>
       </listitem>
     </varlistentry>
 
+    <varlistentry>
+      <term><option>--passwdfile</option></term>
+      <listitem>
+        <para>Path to an alternative passwd file. This file is in the same format as the default (Koha) passwd file, see below for details.</para>
+      </listitem>
+    </varlistentry>
+
     <varlistentry>
       <term><option>--zebralang</option></term>
       <listitem>
         </listitem>
       </varlistentry>
     
+      <varlistentry>
+        <term><option>OPACPORT</option></term>
+        <listitem>
+          <para>The port for the OPAC.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>OPACPREFIX</option></term>
+        <listitem>
+          <para>This is inserted before the instance name  when  forming  Apache ServerName.  For subdomains, make sure it ends with a period.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>OPACSUFFIX</option></term>
+        <listitem>
+          <para>This  is inserted after the instance name, but before the domain name, when forming Apache ServerName.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>INTRAPORT</option></term>
         <listitem>
         <para>Configuration variables are read from this file, if it exists.</para>
       </listitem>
     </varlistentry>
+
+    <varlistentry>
+      <term><option><filename>/etc/koha/passwd</filename></option></term>
+      <listitem>
+        <para>Pre-selected database credentials are read from this file, if it exists. The format for this file is instancename:username:passwd:database. Database is optional, but the other three are required if you want to use pre-determined database user credentials.</para>
+      </listitem>
+    </varlistentry>
   </variablelist>
   </refsect1>
 
index ee2b266..4e272f8 100644 (file)
 
   <refsynopsisdiv>
     <cmdsynopsis>
-      <command>koha-remove</command> <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg>
+      <command>koha-remove</command>
+      <arg><option>--keep-mysql</option></arg>
+      <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg>
     </cmdsynopsis>
   </refsynopsisdiv>
 
+  <refsect1><title>Options</title>
+  <variablelist>
+    <varlistentry>
+      <term><option>--keep-mysql</option></term>
+      <listitem>
+        <para>Leave the MySQL database and user when removing the Koha instance.</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+  </refsect1>
+
   <refsect1><title>Description</title>
   <para>Remove a Koha instance.</para>
   </refsect1>
-  
+
   <refsect1><title>See also</title>
   <simplelist type="inline">
     <member><command>koha-disable(8)</command></member>
@@ -39,7 +52,7 @@
     <member><command>koha-restore(8)</command></member>
   </simplelist>
   </refsect1>
-  
+
 </refentry>
 
 </article>
index ddfa0b0..bb2b642 100755 (executable)
 
 set -e
 
-usage="Usage: $0 [--create-db|--request-db|--populate-db] \
+usage="Usage: $0 [--create-db|--request-db|--populate-db|--use-db] \
     [--marcflavor marc21|normarc|unimarc] \
     [--zebralang en|nb|fr] \
     [--defaultsql /path/to/some.sql] \
-    [--configfile /path/to/config] [--adminuser n] instancename"
+    [--configfile /path/to/config] [--passwdfile /path/to/passwd] \
+    [--database database] [--adminuser n] instancename"
 
 die() {
     echo "$@" 1>&2
     exit 1
 }
 
+# UPPER CASE VARIABLES - from configfile or default value
+# lower case variables - generated within this script
 generate_config_file() {
     touch "$2"
     chown "root:$username" "$2"
     chmod 0640 "$2"
     sed -e "s/__KOHASITE__/$name/g" \
-        -e "s/__OPACPORT__/80/g" \
+        -e "s/__OPACPORT__/$OPACPORT/g" \
         -e "s/__INTRAPORT__/$INTRAPORT/g" \
-        -e "s/__OPACSERVER__/$domain/g" \
+        -e "s/__OPACSERVER__/$opacdomain/g" \
         -e "s/__INTRASERVER__/$intradomain/g" \
         -e "s/__ZEBRA_PASS__/$zebrapwd/g" \
         -e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \
@@ -73,6 +76,9 @@ getinstancemysqldatabase() {
 
 # Set defaults and read config file, if it exists.
 DOMAIN=""
+OPACPORT="80"
+OPACPREFIX=""
+OPACSUFFIX=""
 INTRAPORT="8080"
 INTRAPREFIX=""
 INTRASUFFIX=""
@@ -80,14 +86,15 @@ DEFAULTSQL=""
 ZEBRA_MARC_FORMAT="marc21"
 ZEBRA_LANGUAGE="en"
 ADMINUSER="1"
+PASSWDFILE="/etc/koha/passwd"
 if [ -e /etc/koha/koha-sites.conf ]
 then
     . /etc/koha/koha-sites.conf
 fi
 
-[ $# -ge 2 ] && [ $# -le 12 ] || die $usage
+[ $# -ge 2 ] && [ $# -le 16 ] || die $usage
 
-TEMP=`getopt -o crpm:l:d:f:a: -l create-db,request-db,populate-db,marcflavor:,zebralang:,defaultsql:,configfile:,adminuser: \
+TEMP=`getopt -o crpm:l:d:f:a: -l create-db,request-db,populate-db,use-db,marcflavor:,zebralang:,defaultsql:,configfile:,passwdfile:,adminuser: \
      -n "$0" -- "$@"`
 
 # Note the quotes around `$TEMP': they are essential!
@@ -104,10 +111,13 @@ while true ; do
                -c|--create-db) op=create ; shift ;;
                -r|--request-db) op=request ; shift ;;
                -p|--populate-db) op=populate ; shift ;;
+        -u|--use-db) op=use ; shift ;;
                -m|--marcflavor) CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;;
                -l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
                -d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;;
                -f|--configfile) configfile="$2" ; shift 2 ;;
+        -s|--passwdfile) CLO_PASSWDFILE="$2" ; shift 2 ;;
+        -b|--database) CLO_DATABASE="$2" ; shift 2 ;;
                -a|--adminuser) CLO_ADMINUSER="$2" ; shift 2 ;;
                --) shift ; break ;;
                *) die "Internal error processing command line arguments" ;;
@@ -142,31 +152,54 @@ if [ "$CLO_ADMINUSER" != "" ]
 then
     ADMINUSER="$CLO_ADMINUSER"
 fi
+if [ "$CLO_PASSWDFILE" != "" ]
+then
+    PASSWDFILE="$CLO_PASSWDFILE"
+fi
 
 name="$1"
 
-domain="$name$DOMAIN"
-if [ "$INTRAPORT" = 80 ] || [ "$INTRAPORT" = "" ]
+opacdomain="$OPACPREFIX$name$OPACSUFFIX$DOMAIN"
+intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN"
+
+
+if [ `cat $PASSWDFILE | grep "^$name:"` ]
 then
-    intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN"
-else
-    intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN:$INTRAPORT"
+    passwdline=`cat $PASSWDFILE | grep "^$name:"`
+    mysqluser=`echo $passwdline | cut -d ":" -f 2`
+    mysqlpwd=`echo $passwdline | cut -d ":" -f 3`
+    mysqldb=`echo $passwdline | cut -d ":" -f 4`
 fi
 
+# The order of precedence for MySQL database name is:
+# default < passwd file < command line
+if [ "$mysqldb" = "" ]
+then
+    mysqldb="koha_$name"
+fi
+if [ "$CLO_DATABASE" != "" ]
+then
+    mysqldb="$CLO_DATABASE"
+fi
 
-mysqldb="koha_$name"
+if [ "$mysqluser" = "" ]
+then
+    mysqluser="koha_$name"
+fi
 mysqlhost="$(getmysqlhost)"
-mysqluser="koha_$name"
 
-if [ "$op" = create ] || [ "$op" = request ]
+if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
 then
-    mysqlpwd="$(pwgen -1)"
+    if [ "$mysqlpwd" = "" ]
+    then
+        mysqlpwd="$(pwgen -1)"
+    fi
 else
     mysqlpwd="$(getinstancemysqlpassword $name)"
 fi
 
 
-if [ "$op" = create ] || [ "$op" = request ]
+if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
 then
     # Create new user and group.
     username="$name-koha"
@@ -199,6 +232,15 @@ FLUSH PRIVILEGES;
 eof
     fi #`
 
+    if [ "$op" = use ]
+    then
+        mysql --defaults-extra-file=/etc/mysql/koha-common.cnf --force <<eof
+CREATE USER \`$mysqluser\`@'%' IDENTIFIED BY '$mysqlpwd';
+GRANT ALL PRIVILEGES ON \`$mysqldb\`.* TO \`$mysqluser\`;
+FLUSH PRIVILEGES;
+eof
+    fi #`
+
     # Generate and install Apache site-available file and log dir.
     generate_config_file apache-site.conf.in \
         "/etc/apache2/sites-available/$name"
@@ -285,7 +327,7 @@ eof
 fi
 
 
-if [ "$op" = create ] || [ "$op" = populate ]
+if [ "$op" = create ] || [ "$op" = populate ] || [ "$op" = use ]
 then
     # Reconfigure Apache.
     a2ensite "$name"
index b9e5c2a..09720ea 100755 (executable)
 
 set -e
 
+args=$(getopt -l keep-mysql -o k -n $0 -- "$@")
+set -- $args
+while [ ! -z "$1" ]
+do
+    case "$1" in
+         -k|--keep-mysql) keepmysql=1; exit;;
+          *) break;;
+    esac
+    shift
+done
+
 
 for name in "$@"
 do
     echo "Removing Koha instance $name"
 
-    mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof
+    if [ "$keepmysql" != "1" ]
+    then
+        mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof
 DROP USER \`koha_$name\`;
 DROP DATABASE \`koha_$name\`;
 FLUSH PRIVILEGES;
 eof
+    fi #`
     
     koha-stop-zebra $name
     [ -f "/etc/apache2/sites-available/$name" ]  && \
index 3823a8e..3da3df7 100644 (file)
@@ -599,6 +599,8 @@ January 18 2012     Olivier Crouzet becomes the 171st developer to have a patch push
 January 31 2012        Bart Jorgensen becomes the 172st developer to have a patch pushed
 January 31 2012        Kate Henderson becomes the 173st developer to have a patch pushed
 January 31 2012        Jono Mingard becomes the 174st developer to have a patch pushed
-February 1 2012        Aleksa Vujicic becomes the 175th developer to have a patch pushed
+January 31 2012        Jorgia Kelsey becomes the 175st developer to have a patch pushed
+February 1 2012        Aleksa Vujicic becomes the 176th developer to have a patch pushed
+February 1 2012        Peter Lorimer becomes the 177th developer to have a patch pushed
 
 
diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml
new file mode 100644 (file)
index 0000000..f229b9a
--- /dev/null
@@ -0,0 +1,84 @@
+<acsconfig xmlns="http://openncip.org/acs-config/1.0/">
+<!-- above address gets nothing, it's just a namespace -->
+  <error-detect enabled="true" />
+
+<!--
+  Set Net::Server::PreFork runtime parameters 
+  syslog_ident will identify SIP2 Koha server entries in syslog
+  For OpenSolaris, add: syslog_logsock=stream
+-->
+  <server-params
+    min_servers='1'
+    min_spare_servers='0' 
+    log_file='Sys::Syslog'
+    syslog_ident='koha_sip'
+    syslog_facility='local6'
+  />
+  
+  <listeners>
+<!-- vestigial HTTP, never implemented: just use the OPAC!
+       <service
+      port="0:8080/tcp"
+      transport="http"
+      protocol="NCIP/1.0" />
+-->
+    <service
+      port="8023/tcp"
+      transport="telnet"
+      protocol="SIP/2.00"
+      timeout="60" />
+
+    <service
+      port="127.0.0.1:6001/tcp"
+      transport="RAW" 
+      protocol="SIP/2.00"
+      timeout="60" />
+  </listeners>
+
+  <accounts>
+      <login id="term1"  password="term1" delimiter="|" error-detect="enabled" institution="CPL" />
+      <login id="koha"   password="koha"  delimiter="|" error-detect="enabled" institution="kohalibrary" />
+      <login id="koha2"  password="koha" institution="kohalibrary2" />
+      <login id="lpl-sc" password="1234" institution="LPL" />
+      <login id="lpl-sc-beacock" password="xyzzy"
+             delimiter="|" error-detect="enabled" institution="LPL" />
+  </accounts>
+
+<!--
+Institution tags are for enabled branches.  There needs to be one
+institution stanza for each institution named in the accounts above.
+The implementation attribute is actually used to find the code to run,
+in our case "ILS".
+-->
+
+<institutions>
+    <institution id="MAIN" implementation="ILS" parms="">
+          <policy checkin="true" renewal="true" checkout="true"
+                 status_update="false" offline="false"
+                 timeout="100"
+                 retries="5" />
+    </institution>
+    <institution id="CPL" implementation="ILS" parms="">
+          <policy checkin="true" renewal="true" checkout="true"
+                 status_update="false" offline="false"
+                 timeout="25"
+                 retries="5" />
+    </institution>
+    <institution id="kohalibrary" implementation="ILS" parms="">
+          <policy checkin="true" renewal="false" checkout="true"
+                 status_update="false" offline="false"
+                 timeout="100"
+                 retries="5" />
+    </institution>
+    <institution id="kohalibrary2" implementation="ILS" parms="">
+          <policy checkin="true" renewal="false" checkout="true"
+                 timeout="100"
+                 retries="3" />
+    </institution>
+    <institution id="LPL" implementation="ILS">
+          <policy checkin="true" renewal="false" checkout="true"
+                 timeout="100"
+                 retries="5" />
+    </institution>
+</institutions>
+</acsconfig>
old mode 100755 (executable)
new mode 100644 (file)
index 6983230..b61903f
@@ -170,7 +170,7 @@ melm 611$a      Name-and-title,Subject,Subject:p
 melm 611$t      Name-and-title,Title,Subject,Subject:p
 melm 611$9      Koha-Auth-Number
 melm 611        Conference-name,Name,Subject,Subject:p
-melm 630$n      Thematic-number,Subject:Subject:p
+melm 630$n      Thematic-number,Subject,Subject:p
 melm 630$r      Music-key,Subject,Subject:p
 melm 630$9      Koha-Auth-Number
 melm 630        Subject,Subject:p
diff --git a/installer/data/mysql/atomicupdate/bug_6843_Renew_membership_from_expiry_or_current_date.pl b/installer/data/mysql/atomicupdate/bug_6843_Renew_membership_from_expiry_or_current_date.pl
new file mode 100755 (executable)
index 0000000..bffd857
--- /dev/null
@@ -0,0 +1,9 @@
+#! /usr/bin/perl
+use strict;
+use warnings;
+use C4::Context;
+my $dbh=C4::Context->dbh;
+$dbh->do(<<ENDOFRENEWAL);
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
+ENDOFRENEWAL
+print "Upgrade done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
index c520458..809dea5 100644 (file)
@@ -1,6 +1,6 @@
 INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `ethnicity`, `ethnotes`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES 
 
-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,109,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
 (2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'),
 (3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'),
 (4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'),
index c520458..809dea5 100644 (file)
@@ -1,6 +1,6 @@
 INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `ethnicity`, `ethnotes`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES 
 
-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,109,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
 (2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'),
 (3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'),
 (4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'),
index c520458..809dea5 100644 (file)
@@ -1,6 +1,6 @@
 INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `ethnicity`, `ethnotes`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES 
 
-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,109,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
 (2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'),
 (3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'),
 (4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'),
index c520458..809dea5 100644 (file)
@@ -1,6 +1,6 @@
 INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `ethnicity`, `ethnotes`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES 
 
-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,109,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
 (2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'),
 (3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'),
 (4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'),
index e271129..cfa3440 100644 (file)
@@ -1,6 +1,6 @@
 INSERT INTO `borrowers` (`borrowernumber`, `cardnumber`, `surname`, `firstname`, `title`, `othernames`, `initials`, `streetnumber`, `streettype`, `address`, `address2`, `city`, `zipcode`, `email`, `phone`, `mobile`, `fax`, `emailpro`, `phonepro`, `B_streetnumber`, `B_streettype`, `B_address`, `B_city`, `B_zipcode`, `B_email`, `B_phone`, `dateofbirth`, `branchcode`, `categorycode`, `dateenrolled`, `dateexpiry`, `gonenoaddress`, `lost`, `debarred`, `contactname`, `contactfirstname`, `contacttitle`, `guarantorid`, `borrowernotes`, `relationship`, `ethnicity`, `ethnotes`, `sex`, `userid`, `opacnote`, `contactnote`, `password`, `flags`, `sort1`, `sort2`) VALUES
 
-(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,109,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(1,'1','Admin','Koha',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'MPL','S',NULL,'2099-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
 (2,'23529000152273','Welch','Marcus',NULL,NULL,'',NULL,NULL,'5601 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'FRL','ST','1985-10-24','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'M','23529000152273',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.43609457503641','0.38613959717205'),
 (3,'23529000445172','Daniels','Tanya',NULL,NULL,'',NULL,NULL,'2035 Library Rd.',NULL,'Portland, ME','44236',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1966-10-14','MPL','PT','1990-08-22','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000445172',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.62241429148467','0.95365269664084'),
 (4,'23529000105040','Dillon','Eva',NULL,NULL,'',NULL,NULL,'8916 Library Rd.',NULL,'Springfield, MA','44224',NULL,'(212) 555-1212',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1952-04-03','MPL','PT','1987-07-01','2020-12-31',NULL,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F','23529000105040',NULL,NULL,'42b29d0771f3b7ef',NULL,'0.90102063948384','0.64414513823031'),
old mode 100755 (executable)
new mode 100644 (file)
index 2a59b47..5e3d79d
@@ -333,3 +333,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES (
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACLocalCoverImages','0','Display local cover images on OPAC search and details pages.','1','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('LocalCoverImages','0','Display local cover images on intranet details pages.','1','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowMultipleCovers','0','Allow multiple cover images to be attached to each bibliographic record.','1','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
index 0982282..099dfb9 100755 (executable)
@@ -4651,7 +4651,16 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     $dbh->do(
         q|INSERT INTO permissions (module_bit, code, description) VALUES (13, 'upload_local_cover_images', 'Upload local cover images')|
     );
-    print "Upgrade done (Added support for local cover images)\n";
+    print "Upgrade to $DBversion done (Added support for local cover images)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.07.00.011";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do(<<ENDOFRENEWAL);
+    INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
+ENDOFRENEWAL
+    print "Upgrade to $DBversion done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
     SetVersion($DBversion);
 }
 =head1 FUNCTIONS
index da64ca4..ee24d76 100644 (file)
@@ -33,7 +33,7 @@
         [% IF ( budget_period_id ) %]
                 var periods_menu = [
                         { text: _("Edit budget") + " '[% budget_period_description %]'", url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=[% budget_period_id %]" },
-                        <!-- { text: _("Duplicate budget") + " '[% budget_period_description %]'" } -->
+                        { text: _("Duplicate budget") + " '[% budget_period_description %]'", url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=duplicate_form&budget_period_id=[% budget_period_id %]" },
                 ]
         [% END %]
 
index 913076f..a4acfdf 100644 (file)
@@ -118,7 +118,7 @@ function update_child() {
         [% END %]
        [% END %]
        [% IF ( CAN_user_borrowers ) %]
-        [% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
+        [% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
         [% IF ( CAN_user_staffaccess ) %] <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li>[% END %]
     [% END %]
     <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>
index b43330c..b2f532b 100644 (file)
@@ -72,6 +72,6 @@
         [% ELSE %]
             You are not logged in |
         [% END %]
-        <a href="/cgi-bin/koha/help.pl" id="helper" onclick="window.open('/cgi-bin/koha/help.pl?url='+escape(document.url),'Koha_Help','width=600,height=600,toolbar=false,scrollbars=yes'); return false;">[ ? ]</a>
+        <a href="/cgi-bin/koha/help.pl" id="helper" onclick="var link=window.open('','Koha_Help','width=600,height=600,toolbar=false,scrollbars=yes'); link.location='/cgi-bin/koha/help.pl'; return false;">[ ? ]</a>
     </div>
 </div> 
index bc3e920..bad8502 100644 (file)
@@ -114,7 +114,7 @@ function update_child() {
                 <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;category_type=A">Edit</a></li>
             [% END %]
         [% END %]
-       [% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
+       [% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
        [% IF CAN_user_staffaccess %]<li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li> [% END %]
        <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>
     <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=page">Print Page</a></li>
index 3a09f64..5b96c12 100644 (file)
@@ -422,7 +422,11 @@ function vShelfAdd() {
 
 function showCart(){
                var position = $("#cartmenulink").offset();
+        var scrolld = $(window).scrollTop();
                var top = position.top + $("#cartmenulink").outerHeight();
+        if( scrolld > top ){
+            top = scrolld + 15;
+        }
                var left = position.left
                $("#cartDetails").css("position","absolute").css("top",top);
                $("#cartDetails").css("position","absolute").css("left",left);
index 66dbc6e..1f2ad60 100644 (file)
@@ -120,7 +120,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
 
         </p>
     [% END %]
-    <fieldset class="action"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel close" href="#">Cancel</a></fieldset>
+    <fieldset class="action"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Cancel</a></fieldset>
     </div>
     </form>
 
@@ -155,6 +155,13 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
     [% END %]</tbody>
 </table>
     [% ELSE %]
+        [% IF ( emptyserverlist ) %]
+            You didn't select any Z39.50 target.
+        [% ELSE %]
+            [% FOREACH errcon IN errconn %]
+                Connection failed to [% errcon.server %]
+            [% END %]
+        [% END %]
         <p>Nothing found. <a href="javascript: history.back()">Try another search</a>.</p>
     [% END %]
 
index dbbcdd5..29dcf7f 100644 (file)
@@ -8,6 +8,29 @@
 // #################################################################################
 // Javascript
 // #################################################################################
+    function CheckDuplicateForm(f){
+            var ok=1;
+            var _alertString="";
+            var alertString="";
+            if(!(isNotNull(f.budget_period_startdate,1))){
+              _alertString += "\n- " + _("Start date missing");
+            }
+            if (!(isNotNull(f.budget_period_enddate,1))){
+              _alertString += "\n- " + _("End date missing");
+            }
+            if( f.budget_period_startdate > f.budget_period_enddate ) {
+              _alertString += "\n- " + _("Start date must be before end date");
+            }
+
+            if(_alertString.length==0){
+              f.submit();
+            } else {
+              alertString += _("Form not submitted because of the following problem(s)");
+              alertString += "\n-----------------------------------------\n";
+              alertString += _alertString;
+              alert(alertString);
+            }
+    }
     function Check(f) {
             var ok=1;
             var _alertString="";
 
 [% INCLUDE 'budgets-admin-toolbar.inc' %]
 
+[% IF ( duplicate_form ) %]
+<form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
+    <fieldset class="rows">
+    <input type="hidden" name="op" value="duplicate_budget" />
+    <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
+
+    <ol>
+
+    <li>
+    <label class="required" for="budget_period_startdate">Start date</label>
+    <input type="text" size="10" id="budget_period_startdate" name="budget_period_startdate"   value="[% budget_period_startdate %]"  />
+    <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" alt="Show start date calendar" />
+    <script type="text/javascript">
+        Calendar.setup({
+        inputField     :    "budget_period_startdate",
+        ifFormat         :    "[% DHTMLcalendar_dateformat %]",
+        button         :    "openCalendarFrom",
+        align          :    "Tl",
+        singleClick    :    false
+        });
+    </script>
+                               <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
+    </li>
+    <li>
+
+    <label class="required" for="budget_period_enddate">End date</label>
+    <input type="text" size="10" id="budget_period_enddate" name="budget_period_enddate" value="[% budget_period_enddate %]" />
+    <img src="/intranet-tmpl/prog/en/lib/calendar/cal.gif" border="0" id="openCalendarTo" style="cursor: pointer;" alt="Show end date calendar" />
+
+    <script type="text/javascript">
+        Calendar.setup({
+        inputField     :    "budget_period_enddate",
+        ifFormat         :    "[% DHTMLcalendar_dateformat %]",
+        button         :    "openCalendarTo",
+        align          :    "Tl"
+        });
+    </script>
+                               <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
+    </li>
+
+    </ol>
+    </fieldset>
+
+    <fieldset class="action">
+        <input type="button" value="Save Changes"  onclick="CheckDuplicateForm(this.form)"    />
+    </fieldset>
+
+</form>
+
+[% END %]
+
 [% IF ( add_form ) %]
     <!--  add or modify a budget period   -->
 
     <div class="pages">[% pagination_bar %]</div>
 [% END %]
 
+
 </div>
 </div>
 <div class="yui-b">
index 0e2f73b..3d88883 100644 (file)
@@ -42,7 +42,7 @@ Patrons:
          - "Guarantors can be the following of those they guarantee:"
          - pref: borrowerRelationship
            class: multi
-         - (input multiple choices separated by |)
+         - (input multiple choices separated by |). Leave empty to deactivate
      -
          - "Borrowers can have the following titles:"
          - pref: BorrowersTitles
@@ -114,3 +114,9 @@ Patrons:
                yes: Do
                no: "Don't"
          - store and display surnames in upper case.
+     -
+         - When renewing borrowers, base the new expiry date on
+         - pref: BorrowerRenewalPeriodBase
+           choices:
+               now: current date.
+               dateexpiry: current membership expiry date.
index 18c0552..d4a7bf3 100644 (file)
@@ -78,7 +78,7 @@
 [% INCLUDE 'sysprefs-admin-search.inc' %]
 
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; [% IF ( modify ) %]Modify system preference '[% searchfield %]'[% ELSE %]Add a system preference[% END %][% END %][% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; Data Added[% END %]
-[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&searchfield=[% searchfield %]">[% searchfield %]</a> &rsaquo; Confirm Deletion of Parameter '[% searchfield %]'[% END %][% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; Parameter Deleted[% END %][% IF ( else ) %]System Preferences[% END %]</div>
+[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&amp;searchfield=[% searchfield %]">[% searchfield %]</a> &rsaquo; Confirm Deletion of Parameter '[% searchfield %]'[% END %][% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; Parameter Deleted[% END %][% IF ( else ) %]System Preferences[% END %]</div>
 
 <div id="doc3" class="yui-t2">
    
index ba22e9c..7a118c9 100644 (file)
@@ -99,7 +99,7 @@ function jumpfull(page)
                     [% END %]
                 [% END %]
                 [% IF ( displaynext ) %]
-                    <a href="auth_finder.pl?startfrom=[% startfromnext %]&amp;authtypecode=[% authtypecode %][% FOREACH searchdat IN searchdata %]&[% searchdat.term %]=[% searchdat.val %][% END %]&amp;op=do_search&amp;type=intranet&amp;index=[% index %]&amp;tagid=[% tagid %]&amp;orderby=[% orderby %]">
+                    <a href="auth_finder.pl?startfrom=[% startfromnext %]&amp;authtypecode=[% authtypecode %][% FOREACH searchdat IN searchdata %]&amp;[% searchdat.term %]=[% searchdat.val %][% END %]&amp;op=do_search&amp;type=intranet&amp;index=[% index %]&amp;tagid=[% tagid %]&amp;orderby=[% orderby %]">
                         &gt;&gt;</a>
                 [% END %]
         </div>[% END %]
index 0896075..4239b4f 100644 (file)
@@ -108,7 +108,7 @@ function placeHold () {
        </li>
        <li>
            <span id="hide" class="yui-button yui-link-button"><span class="first-child">
-               <a class="hide" href="basket.pl" onclick="quit(); return false;">Hide Window</a>
+               <a class="hide close" href="basket.pl">Hide Window</a>
            </span></span>
        </li>
 </ul>
index 38a26c9..162b12a 100644 (file)
@@ -102,6 +102,18 @@ function verify_images() {
             [% END %]
             </span>
         [% END %]
+        [% IF ( TagsEnabled &&  TagsShowOnDetail &&  TagLoop ) %]
+                <span class="results_summary"><span class="label">Tags:</span>
+                    [% FOREACH TagLoo IN TagLoop %]
+                        [% IF ( CAN_user_tools_moderate_tags ) %]
+                        <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a>
+                        [% ELSE %]
+                        [% TagLoo.term |html %]
+                        [% END %]
+                        <span class="weight">([% TagLoo.weight_total %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
+                    [% END %]
+                    </span>
+        [% END %]
         [% IF ( holdcount ) %]<span class="results_summary"><span class="label">Holds:</span> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></span>[% ELSE %][% END %]
 
         [% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]</div><div class="yui-u" id="bookcoverimg">
@@ -219,10 +231,25 @@ function verify_images() {
                [% END %]
                </ul>
                </li>
+        [% END %]
+        [% IF ( TagsEnabled &&  TagsShowOnDetail &&  TagLoop ) %]
+                <li><strong>Tags:</strong>
+                    <ul id="tagslist">
+                    [% FOREACH TagLoo IN TagLoop %]
+                        <li>
+                        [% IF ( CAN_user_tools_moderate_tags ) %]
+                        <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a>
+                        [% ELSE %]
+                        [% TagLoo.term |html %]
+                        [% END %]
+                        <span class="weight">([% TagLoo.weight_total %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]</li>
+                    [% END %]
+                    </ul></li>
         [% END %]
             [% IF ( holdcount ) %]<li><strong>Holds:</strong> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></li>[% ELSE %][% END %]
         </ul>
                [% END %]
+
 </div>
 </div>
 <div id="bibliodetails" class="toptabs">
@@ -390,11 +417,11 @@ function verify_images() {
                 [% END %]
                 [% IF ( analyze ) %]<td>
                        [% IF ( itemloo.countanalytics ) %]
-                               <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=[% itemloo.itemnumber %]">[% itemloo.countanalytics %] analytics</a>
+                               <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=[% itemloo.itemnumber %]">[% itemloo.countanalytics %] analytics</a>
                        [% END %]</td>
                [% END %]
                 [% IF ( analyze ) %]
-                        <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% itemloo.biblionumber %]&hostitemnumber=[% itemloo.itemnumber %]">Create Analytics</a></td>
+                        <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% itemloo.biblionumber %]&amp;hostitemnumber=[% itemloo.itemnumber %]">Create Analytics</a></td>
                 [% END %]
 
                 </tr>
@@ -402,7 +429,7 @@ function verify_images() {
         </table>
         [% END %]
                 [% IF ( hiddencount ) %]
-                   <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&showallitems=1">Show all items ([% hiddencount %] hidden)</a>
+                   <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&amp;showallitems=1">Show all items ([% hiddencount %] hidden)</a>
                 [% END %]              
                [% IF ( debug_display ) %]
                <br /><br />
index 673b08b..91c2d48 100644 (file)
@@ -190,7 +190,7 @@ function set_to_today(id, force) {
 [% IF ( book_on_loan ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: item is checked out.</div>[% END %]
 [% IF ( book_reserved ) %]<div class="dialogalert"><strong>Cannot Delete</strong>: item has a waiting hold.</div>[% END %]
 [% IF ( not_same_branch ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: The items do not belong to your branch.</div>[% END %]
-[% IF ( linked_analytics ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: item has linked <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&analyze=1">analytics.</a>.</div>[% END %]
+[% IF ( linked_analytics ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: item has linked <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&amp;analyze=1">analytics.</a>.</div>[% END %]
 
 <div id="cataloguing_additem_itemlist">
     [% IF ( item_loop ) %]
@@ -209,7 +209,7 @@ function set_to_today(id, force) {
                     [% IF ( item_loo.nomod ) %] <td colspan="2">&nbsp;</td>[% ELSE %][% IF ( item_loo.hostitemflag ) %]<td><a href="additem.pl?op=edititem&amp;biblionumber=[% item_loo.hostbiblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit in Host</a></td>
 <td><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&amp;biblionumber=[% biblionumber %]&amp;hostitemnumber=[% item_loo.itemnumber %]">Delink</a></td>
 [% ELSE %]<td><a href="additem.pl?op=edititem&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a></td>
-                    <td>[% IF ( item_loo.countanalytics ) %]<a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=% item_loo.itemnumber %]">view analytics</a>[% ELSE %]<a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]" onclick="confirm_deletion([% biblionumber %],[% item_loo.itemnumber %]); return false;">Delete</a>[% END %]</td>[% END %][% END %]
+                    <td>[% IF ( item_loo.countanalytics ) %]<a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=% item_loo.itemnumber %]">view analytics</a>[% ELSE %]<a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]" onclick="confirm_deletion([% biblionumber %],[% item_loo.itemnumber %]); return false;">Delete</a>[% END %]</td>[% END %][% END %]
                 [% FOREACH item_valu IN item_loo.item_value %]
                     <td>[% item_valu.field |html %]</td>
                 [% END %]
index 553d130..78b8579 100644 (file)
@@ -5,46 +5,72 @@
 <body>
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/cataloging/addbooks.pl">Cataloging</a>  &rsaquo; Attach an item to <i>[% bibliotitle |html %]</i></div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/cataloging/addbooks.pl">Cataloging</a>  &rsaquo; Attach an item to <i>[% bibliotitle |html %][% IF ( itemsloo.subtitle ) %][% itemsloo.subtitle %][% END %]</i></div>
 <div id="doc" class="yui-t7">
 
+[% BLOCK actions %]
+                        [% IF ( BiblioDefaultViewmarc ) %]
+                             <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="post">
+                        [% ELSIF ( BiblioDefaultViewlabeled_marc ) %]
+                             <form action="/cgi-bin/koha/catalogue/labeledMARCdetail.pl" method="post">
+                        [% ELSIF ( BiblioDefaultViewisbd ) %]
+                             <form action="/cgi-bin/koha/catalogue/ISBDdetail.pl" method="post">
+                        [% ELSE %]
+                             <form action="/cgi-bin/koha/catalogue/detail.pl" method="post">
+                        [% END %]
+[% END %]
+
+[% BLOCK fail %]
+                                <input type="submit" class="approve" value="OK" />
+                                <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
+                        </form>
+                                <form method="get" action="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]">
+                                <input type="submit" class="new" value="Try again with a different barcode"/>
+                                <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
+                        </form>
+[% END %]
+
 [% IF ( error ) %]
     <div class="dialog alert">
-       [% IF ( errornonewitem ) %]ERROR: Unable to create the new item.[% END %]
-       [% IF ( errornoitem ) %]ERROR: Unable to get the item.[% END %]
-       [% IF ( errornoitemnumber ) %]ERROR: Unable to get the item number from this barcode.[% END %]
+
+               [% IF ( errornonewitem ) %]ERROR: Unable to create the new item.<p>
+                       [% INCLUDE actions %]
+                       [% INCLUDE fail %]
+               [% END %]
+
+               [% IF ( errornoitem ) %]ERROR: Unable to get the item.<p>
+                       [% INCLUDE actions %]
+                       [% INCLUDE fail %]
+               [% END %]
+
+               [% IF ( errornoitemnumber ) %]ERROR: Unable to get the item number from this barcode.<p>
+                       [% INCLUDE actions %]
+                       [% INCLUDE fail %]
+               [% END %]
+               </p>
     </div>
-    <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="post">
-       <input type="submit" value="OK" />
-       <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
-    </form>
-[% ELSE %]
-    [% IF ( success ) %]
-       <div class="dialog message">The item has successfully been attached to [% INCLUDE 'biblio-default-view.inc' %]<i>[% bibliotitle |html %]</i></a>.[% IF ( BiblioDefaultViewmarc ) %]
-       <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="post">
-[% ELSIF ( BiblioDefaultViewlabeled_marc ) %]
-       <form action="/cgi-bin/koha/catalogue/labeledMARCdetail.pl" method="post">
-[% ELSIF ( BiblioDefaultViewisbd ) %]
-       <form action="/cgi-bin/koha/catalogue/ISBDdetail.pl" method="post">
-[% ELSE %]
-       <form method="link" action="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]"/>
-[% END %]
-           <input type="submit" class="attachanother" value="Attach Another Item"/>
-           <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
-       </form>
-       <form action="/cgi-bin/koha/catalogue/detail.pl" method="post">
-           <input type="submit"  class="approve" value="OK" />
-           <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
-       </form>
-</div>
 
+       [% ELSE %]
+           [% IF ( success ) %]
+                       <div class="dialog message">The item has successfully been attached to [% INCLUDE 'biblio-default-view.inc' %]<i>[% bibliotitle |html %]</i></a>.
+                       <p>
+                       [% INCLUDE actions %]
+                               <input type="submit" class="approve" value="OK" />
+                                <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
+                        </form>
+                                <form method="get" action="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]"/>
+                                <input type="submit" class="new" value="Attach another item"/>
+                                <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
+                        </form>
+                       </p>
+                       </div>
     [% ELSE %]
        [% IF ( missingparameter ) %]
        <form method="post" action="/cgi-bin/koha/cataloguing/moveitem.pl">
            [% IF ( missingbiblionumber ) %]
            <fieldset id="biblionumber_fieldset">
                <label for="biblionumber">Select the biblionumber to attach the item to</label>
-                   <div class="hint">Enter biblionumber:</div>
+                       <div class="hint">Enter biblionumber:</div>
                    <input type="text" name="biblionumber" id="biblionumber" class="focus" size="14" />
                    <fieldset class="action"><input type="submit" value="Submit" /></fieldset>
            </fieldset>
index fa94187..35fbfec 100644 (file)
@@ -1,6 +1,6 @@
 [% INCLUDE 'help-top.inc' %]
 
-<h1>Claims & Late Orders</h1>
+<h1>Claims &amp; Late Orders</h1>
 
 <p>If you have entered in an email address for the vendors in your system you can send them claim emails when an order is late. Before you can send claims you will need to set up an acquisitions claim notice.</p>
 
index 550d783..ef3eb1c 100644 (file)
@@ -26,7 +26,7 @@
        <li>To be able to order from a vendor you must make them 'Active'</li>
        <li>For List Prices and Invoice Prices choose the currency
 <ul>
-       <li>Currencies are assigned in the Currencies & Exchange Rates admin area</li>
+       <li>Currencies are assigned in the Currencies &amp; Exchange Rates admin area</li>
 </ul>
 </li>
        <li>If the vendor offers a consistent blank discount, enter that in the 'Discount' field
index 973e2af..69e1dd4 100644 (file)
@@ -1,6 +1,6 @@
 [% INCLUDE 'help-top.inc' %]
 
-<h1>Libraries & Groups</h1>
+<h1>Libraries &amp; Groups</h1>
 
 <p>When setting up your Koha system you will want to add information for every library that will be sharing your system. This data is used in several areas of Koha.</p>
 
@@ -47,6 +47,6 @@
 
 <p>Properties are then applied to libraries via the add or edit library form.</p>
 
-<p><strong>See the full documentation for Libraries & Groups in the <a href="http://manual.koha-community.org/3.6/en/basicparams.html#libsgroups">manual</a> (online).</strong></p>
+<p><strong>See the full documentation for Libraries &amp; Groups in the <a href="http://manual.koha-community.org/3.6/en/basicparams.html#libsgroups">manual</a> (online).</strong></p>
 
 [% INCLUDE 'help-bottom.inc' %]
\ No newline at end of file
index fd8cc7f..8d26aea 100644 (file)
@@ -9,8 +9,8 @@
 <p>Most fees and fines will be charged automatically if the fines cron job is running:</p>
 
 <ul>
-       <li>Fines will be charged based on your Circulation & Fines Rules</li>
-       <li>Hold fees will be charged based on the rules you set in the Patron Types & Categories administration area</li>
+       <li>Fines will be charged based on your Circulation &amp; Fines Rules</li>
+       <li>Hold fees will be charged based on the rules you set in the Patron Types &amp; Categories administration area</li>
        <li>Rental fees will be charged based on the settings in your Item Types administration area</li>
        <li>Marking an item 'Lost' via the cataloging module will automatically charge the patron the replacement cost for that item</li>
 </ul>
index 6dfd8f9..8b0a545 100644 (file)
@@ -6,6 +6,14 @@
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'patron-search.inc' %]
 
+<script type=text/javascript>
+
+function confirmWriteoffAll() {
+    return confirm(_("Are you sure you want to writeoff all fines?"));
+}
+
+</script>
+
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Pay Fines for [% borrower.firstname %] [% borrower.surname %]</div>
 
 <div id="doc3" class="yui-t2">
@@ -13,7 +21,7 @@
    <div id="bd">
        <div id="yui-main">
        <div class="yui-b">
-[% INCLUDE 'members-toolbar.inc' %]
+[% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
 
 <!-- The manual invoice and credit buttons -->
 <div class="toptabs">
@@ -88,8 +96,8 @@
 </table>
 <fieldset class="action">
 <input type="submit" name="paycollect"  value="Pay Amount" class="submit" />
-<input type="submit" name="woall"  value="Writeoff All" class="submit" />
-<input type="submit" name="payselected"  value="Pay Selected" class="submit" />
+<input type="submit" name="woall"  value="Writeoff All" class="submit" onclick="return confirmWriteoffAll()" />
+<input type="submit" name="payselected"  value="Pay Selected" class="submit"/>
 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
 </fieldset>
 </form>
index 08ee909..ba18215 100644 (file)
@@ -64,7 +64,7 @@ function moneyFormat(textObj) {
 <div id="bd">
 <div id="yui-main">
 <div class="yui-b">
-[% INCLUDE 'members-toolbar.inc' %]
+[% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
 
 
 <!-- The manual invoice and credit buttons -->
@@ -94,6 +94,7 @@ function moneyFormat(textObj) {
     <form name="payindivfine" onsubmit="return validatePayment(this);" method="post" action="/cgi-bin/koha/members/paycollect.pl">
     <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
     <input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual %]" />
+    <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" />
     <input type="hidden" name="description" id="description" value="[% description %]" />
     <input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
     <input type="hidden" name="notify_id" id="notify_id" value="[% notify_id %]" />
@@ -148,6 +149,7 @@ function moneyFormat(textObj) {
     <form name="woindivfine" action="/cgi-bin/koha/members/pay.pl" method="post" >
     <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
     <input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual %]" />
+    <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" />
     <input type="hidden" name="description" id="description" value="[% description %]" />
     <input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
     <input type="hidden" name="notify_id" id="notify_id" value="[% notify_id %]" />
index 6f5865b..f5d03f5 100644 (file)
                 <td><input type="radio" name="Line" value="reservestatus" /></td>
                 <td><input type="radio" name="Column" value="reservestatus" checked="checked" /></td>
                 <td>
-                               <input type="checkbox" name="filter_reservestatus_or_1" value="1"> Asked</input>
-                               <input type="checkbox" name="filter_reservestatus_or_2" value="2"> Processing</input>
-                               <input type="checkbox" name="filter_reservestatus_or_3" value="3"> Waiting</input>
-                               <input type="checkbox" name="filter_reservestatus_or_4" value="4"> Satisfied</input>
-                               <input type="checkbox" name="filter_reservestatus_or_5" value="5"> Cancelled</input>
+                               <input type="checkbox" name="filter_reservestatus_or_1" value="1" /> Asked
+                               <input type="checkbox" name="filter_reservestatus_or_2" value="2" /> Processing
+                               <input type="checkbox" name="filter_reservestatus_or_3" value="3" /> Waiting
+                               <input type="checkbox" name="filter_reservestatus_or_4" value="4" /> Satisfied
+                               <input type="checkbox" name="filter_reservestatus_or_5" value="5" /> Cancelled
                                </td>
              </tr>
              <tr class="highlight">
                 <td>Hold Date</td>
                 <td><input type="radio" name="Line" value="reservedate" /></td>
                 <td><input type="radio" name="Column" value="reservedate" /></td>
-                <td><label for="reservedate_begin">From</label> <input type="text"  size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" />
+                <td><label for="filter_reservedate_begin">From</label> <input type="text"  size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" />
                     <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openreservedateFrom" style="cursor: pointer;" />
                    <script type="text/javascript">
                                   //<![CDATA[ 
             <td><input type="radio" name="Column" value="items.itype" /></td>
            <td><select name="filter_items.itype" id="itype">
                <option value=""> </option>
-               [% FOREACH itypeloo IN itypeloop %]
+               [% FOREACH itypeloo IN itemtypeloop %]
                  [% IF ( itypeloo.selected ) %]<option value="[% itypeloo.code %]" selected="selected">[% itypeloo.description %]</option>[% ELSE %]<option value="[% itypeloo.code %]">[% itypeloo.description %]</option>[% END %]
                [% END %]
                </select>
         </tr>
         <tr class="highlight">
             <td>Holding Library</td>
-            <td><input type="radio" name="Line" value="holdingbranch" /></td>
-            <td><input type="radio" name="Column" value="holdingbranch" /></td>
-            <td><select name="filter_holdingbranch" id="holdingbranch">
+            <td><input type="radio" name="Line" value="items.holdingbranch" /></td>
+            <td><input type="radio" name="Column" value="items.holdingbranch" /></td>
+            <td><select name="filter_items.holdingbranch" id="holdingbranch">
                <option value=""> </option>
                [% FOREACH branchloo IN branchloop %]
 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
         </tr>
         <tr>
             <td>Home Library</td>
-            <td><input type="radio" name="Line" value="homebranch" /></td>
-            <td><input type="radio" name="Column" value="homebranch" /></td>
-            <td><select name="filter_homebranch" id="homebranch">
+            <td><input type="radio" name="Line" value="items.homebranch" /></td>
+            <td><input type="radio" name="Column" value="items.homebranch" /></td>
+            <td><select name="filter_items.homebranch" id="homebranch">
                <option value=""> </option>
                [% FOREACH branchloo IN branchloop %]
 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
             <td>Item Call Number</td>
             <td></td>
             <td></td>
-            <td>From <input type="text" name="filter_itemcallnumber" size="10" /> (inclusive) to <input type="text" name="fiter_itemcallnumber" size="10" /> (exclusive) </td>
+            <td>From <input type="text" name="filter_items.itemcallnumber_begin" size="10" /> (inclusive) to <input type="text" name="filter_items.itemcallnumber_endex" size="10" /> (exclusive) </td>
         </tr>
         [% IF ( hassort1 ) %]
         <tr><td>Patron sort1</td>
index 7a50b4f..6c63cfb 100644 (file)
@@ -56,8 +56,8 @@
                 <td>[% collectionsLoo.colTitle %]</td>
                 <td>[% collectionsLoo.colDesc %]</td>
                 <td>[% collectionsLoo.colBranchcode %]</td>
-                <td><a href="editCollections.pl?action=edit&colId=[% collectionsLoo.colId %]">Edit</a></td>
-                <td><a href="editCollections.pl?action=delete&colId=[% collectionsLoo.colId %]">Delete</a></td>
+                <td><a href="editCollections.pl?action=edit&amp;colId=[% collectionsLoo.colId %]">Edit</a></td>
+                <td><a href="editCollections.pl?action=delete&amp;colId=[% collectionsLoo.colId %]">Delete</a></td>
               </tr>
             [% END %]
           </table>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt
new file mode 100644 (file)
index 0000000..05fd452
--- /dev/null
@@ -0,0 +1,103 @@
+[% INCLUDE 'doc-head-open.inc' %]
+<title>Koha &rsaquo; Tools &rsaquo; Tags &rsaquo; [% IF ( do_it ) %]Review &rsaquo; [% ELSE %]Review Tags[% END %]</title>
+[% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">
+//<![CDATA[
+    $.tablesorter.addParser({
+        id: 'articles',
+        is: function(s) {return false;  },
+        format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
+        type: 'text'
+    });
+    $(document).ready(function() {
+        $(".delete").click(function (event) {
+            $(this).parent().parent().parent().addClass("selected");
+            var answer = confirm(_("Are you sure you want to remove the tag from this title?"));
+                if (!answer){
+                    $("tr").removeClass("selected");
+                    event.preventDefault();
+                }
+        });
+        $("#itemst").tablesorter({
+            sortList: [[0,0]],
+            headers: { 0: { sorter: 'articles' },1: { sorter: false },2:{sorter:false}}
+        });
+    });
+//]]>
+</script>
+<style type="text/css">
+tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }</style>
+</head>
+<body>
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'cat-search.inc' %]
+
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/tags/review.pl">Tags</a> &rsaquo; Results for tag <i>[% tag %]</i></div>
+
+<div id="doc3" class="yui-t2">
+ <div id="bd">
+  <div id="yui-main">
+  <div class="yui-b">
+[% IF ( titles ) %]
+<h3>Titles tagged with the term <i>[% tag %]</i></h3>
+<table id="itemst">
+       <thead><tr>
+           <th>Title</th>
+           <th>Location</th>
+           <th>&nbsp;</th>
+        </tr></thead>
+
+        [% FOREACH title IN titles %]
+            [% IF ( title.even ) %]
+                <tr class="highlight">
+            [% ELSE %]
+                <tr>
+            [% END %]
+            <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = title.biblionumber %][% title.title |html %][% FOREACH subtitl IN title.subtitle %] [% subtitl.subfield %][% END %]</a>
+            [% title.author %]
+            <p>[% IF ( title.publishercode ) %]- [% title.publishercode|html %]
+            [% IF ( title.place ) %] [% title.place %][% END %][% END %]
+            [% IF ( title.pages ) %] - [% title.pages %][% IF ( title.size ) %] [% title.size %]
+            [% END %]
+            [% END %]</p>
+            [% IF ( title.notes ) %]
+            <p>[% title.notes |html%]</p>[% END %]
+            [% IF ( title.TagLoop ) %]<p style="font-size:90%"><strong>Tagged with:</strong> [% FOREACH TagLoo IN title.TagLoop %]
+            <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term %]">[% TagLoo.term |html %]</a> <span class="weight">([% TagLoo.weight_total %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
+            [% END %]</p>
+            [% END %]
+            </td>
+            <td>[% IF ( title.items ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %]
+                <li>
+                    [% item.branchname %] [% item.location_description %]
+                    [% IF ( item.itemcallnumber ) %]
+                        ([% item.itemcallnumber %])
+                    [% END %]
+                </li>
+                [% END %]</ul>[% ELSE %]This record has no items.[% END %]
+             </td>
+             <td><form method="post" action="/cgi-bin/koha/tags/list.pl"><input type="hidden" name="op" value="del" /><input type="hidden" name="tag" value="[% tag %]" /><input type="hidden" name="tag_id" value="[% title.tag_id %]" /><input type="submit" class="delete" value="Remove tag" /></form></td>
+            </tr>
+        [% END %]
+    </table>
+[% ELSE %]
+       <div class="dialog message">There are no titles tagged with the term <i>[% tag %]</i></div>
+[% END %]
+</form>
+ </div>
+ </div>
+ <div class="yui-b">
+  <ul>
+    <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved tags</a>
+    </li>
+    <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected tags</a>
+    </li>
+    <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending tags</a>
+    </li>
+    <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">All tags</a>
+    </li>
+  </ul>
+ </div>
+</div>
+[% INCLUDE 'intranet-bottom.inc' %]
\ No newline at end of file
index 5d025af..843f7ca 100644 (file)
@@ -217,7 +217,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
                [% ELSE %]<td class="pending">
                [% END %]
            </td>
-           <td>[% tagloo.term %]
+           <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term %]">[% tagloo.term %]</a>
            </td>
                <td>[% tagloo.weight_total %]
            </td>
old mode 100755 (executable)
new mode 100644 (file)
index 1bf9143..738c0c9 100644 (file)
@@ -1,7 +1,7 @@
 [% IF ( PAGE_NUMBERS ) %]<div class="pages">
     <!-- Row of numbers corresponding to search result pages -->
-        [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">&lt;&lt; Previous</a>[% END %]
-    [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %]        <a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %]&amp;offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
+        [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">&lt;&lt; Previous</a>[% END %]
+    [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %]        <a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
     [% END %]
-        [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %]&amp;offset=[% next_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">Next &gt;&gt;</a>[% END %]
+        [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% next_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">Next &gt;&gt;</a>[% END %]
 </div>[% END %]
index c83e001..76d668b 100644 (file)
@@ -428,7 +428,11 @@ function vShelfAdd() {
 
 function showCart(){
                var position = $("#cartmenulink").offset();
+        var scrolld = $(window).scrollTop();
                var top = position.top + $("#cartmenulink").outerHeight();
+        if( scrolld > top ){
+            top = scrolld + 15;
+        }
                var menuWidth = 200;
                var buttonWidth = $("#cartmenulink").innerWidth();
                var buttonOffset = menuWidth - buttonWidth;
index 298a20e..f2808ef 100644 (file)
@@ -18,7 +18,7 @@ KOHA.LocalCover = {
      * olCallBack().
      */
     GetCoverFromBibnumber: function(uselink) {
-        $("div [id^=local-thumbnail]").each(function(i) {
+        $("div[id^=local-thumbnail],span[id^=local-thumbnail]").each(function(i) {
             var mydiv = this;
             var message = document.createElement("span");
             $(message).attr("class","no-image");
index 8ee8b7b..219dc41 100644 (file)
@@ -37,8 +37,8 @@
                     <dd>requests a particular format or set of formats in reporting availability</dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=GetAvailability&id=1+2+99999&id_type=item">
-                    ilsdi.pl?service=GetAvailability&id=1+2+99999&id_type=item
+                <a href="ilsdi.pl?service=GetAvailability&amp;id=1+2+99999&amp;id_type=item">
+                    ilsdi.pl?service=GetAvailability&amp;id=1+2+99999&amp;id_type=item
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                     </dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=GetRecords&id=1+2+99999">
-                    ilsdi.pl?service=GetRecords&id=1+2+99999
+                <a href="ilsdi.pl?service=GetRecords&amp;id=1+2+99999">
+                    ilsdi.pl?service=GetRecords&amp;id=1+2+99999
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                     </dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=GetAuthorityRecords&id=1+2+99999">
-                    ilsdi.pl?service=GetAuthorityRecords&id=1+2+99999
+                <a href="ilsdi.pl?service=GetAuthorityRecords&amp;id=1+2+99999">
+                    ilsdi.pl?service=GetAuthorityRecords&amp;id=1+2+99999
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;xml version="1.0" encoding="UTF-8"&gt;;
                     </dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=LookupPatron&id=815&id_type=cardnumber">
-                    ilsdi.pl?service=LookupPatron&id=815&id_type=cardnumber
+                <a href="ilsdi.pl?service=LookupPatron&amp;id=815&amp;id_type=cardnumber">
+                    ilsdi.pl?service=LookupPatron&amp;id=815&amp;id_type=cardnumber
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                     <dd>user's password</dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=AuthenticatePatron&username=john9&password=soul">
-                    ilsdi.pl?service=AuthenticatePatron&username=john9&password=soul
+                <a href="ilsdi.pl?service=AuthenticatePatron&amp;username=john9&amp;password=soul">
+                    ilsdi.pl?service=AuthenticatePatron&amp;username=john9&amp;password=soul
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                     <dd>whether or not to return loan information in the response</dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=GetPatronInfo&patron_id=1&show_contact=0&show_loans=1">
-                    ilsdi.pl?service=GetPatronInfo&patron_id=1&show_contact=0&show_loans=1
+                <a href="ilsdi.pl?service=GetPatronInfo&amp;patron_id=1&amp;show_contact=0&amp;show_loans=1">
+                    ilsdi.pl?service=GetPatronInfo&amp;patron_id=1&amp;show_contact=0&amp;show_loans=1
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                     <dd>the unique patron identifier in the ILS; the same identifier returned by LookupPatron or AuthenticatePatron</dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=GetPatronStatus&patron_id=1">
-                    ilsdi.pl?service=GetPatronStatus&patron_id=1
+                <a href="ilsdi.pl?service=GetPatronStatus&amp;patron_id=1">
+                    ilsdi.pl?service=GetPatronStatus&amp;patron_id=1
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                     <dd>system item identifier</dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=GetServices&patron_id=1&item_id=1">
-                    ilsdi.pl?service=GetServices&patron_id=1&item_id=1
+                <a href="ilsdi.pl?service=GetServices&amp;patron_id=1&amp;item_id=1">
+                    ilsdi.pl?service=GetServices&amp;patron_id=1&amp;item_id=1
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                     <dd>the date the patron would like the item returned by</dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=RenewLoan&patron_id=1&item_id=1">
-                    ilsdi.pl?service=RenewLoan&patron_id=1&item_id=1
+                <a href="ilsdi.pl?service=RenewLoan&amp;patron_id=1&amp;item_id=1">
+                    ilsdi.pl?service=RenewLoan&amp;patron_id=1&amp;item_id=1
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                     <dd>date after which item returned to shelf if item is not picked up</dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=HoldTitle&patron_id=1&bib_id=1&request_location=127.0.0.1">
-                    ilsdi.pl?service=HoldTitle&patron_id=1&bib_id=1&request_location=127.0.0.1
+                <a href="ilsdi.pl?service=HoldTitle&amp;patron_id=1&amp;bib_id=1&amp;request_location=127.0.0.1">
+                    ilsdi.pl?service=HoldTitle&amp;patron_id=1&amp;bib_id=1&amp;request_location=127.0.0.1
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                     <dd>date after which item returned to shelf if item is not picked up</dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=HoldItem&patron_id=1&bib_id=1&item_id=1">
-                    ilsdi.pl?service=HoldItem&patron_id=1&bib_id=1&item_id=1
+                <a href="ilsdi.pl?service=HoldItem&amp;patron_id=1&amp;bib_id=1&amp;item_id=1">
+                    ilsdi.pl?service=HoldItem&amp;patron_id=1&amp;bib_id=1&amp;item_id=1
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                     <dd>system item identifier</dd>
                 </dl>
                 <h4>Example Call</h4>
-                <a href="ilsdi.pl?service=CancelHold&patron_id=1&item_id=1">
-                    ilsdi.pl?service=CancelHold&patron_id=1&item_id=1
+                <a href="ilsdi.pl?service=CancelHold&amp;patron_id=1&amp;item_id=1">
+                    ilsdi.pl?service=CancelHold&amp;patron_id=1&amp;item_id=1
                 </a>
                 <h4>Example Response</h4>
 <pre>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
                 <ul>
                     <li>HarvestBibliographicRecords <em>(Use OAI-PMH instead)</em></li>
                     <li>HarvestExpandedRecords <em>(Use OAI-PMH instead)</em></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=GetAvailability">GetAvailability</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=GetAvailability">GetAvailability</a></li>
                     <li>GoToBibliographicRequestPage <em>(Use OPAC instead)</em></li>
                 </ul>
                 <h2>Level 2: Elementary OPAC supplement</h2>
                 <ul>
                     <li>HarvestAuthorityRecords <em>(Use OAI-PMH instead)</em></li>
                     <li>HarvestHoldingsRecords <em>(Use OAI-PMH instead)</em></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=GetRecords">GetRecords</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=GetRecords">GetRecords</a></li>
                     <li>Search <em>(Use SRU instead)</em></li>
                     <li>Scan <em>(Use SRU instead)</em></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=GetAuthorityRecords">GetAuthorityRecords</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=GetAuthorityRecords">GetAuthorityRecords</a></li>
                     <li>OutputRewritablePage <em>(Not supported yet)</em></li>
                     <li>OutputIntermediateFormat <em>(Not supported yet)</em></li>
                 </ul>
                 <h2>Level 3: Elementary OPAC alternative</h2>
                 <ul>
-                    <li><a href="ilsdi.pl?service=Describe&verb=LookupPatron">LookupPatron</a></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=AuthenticatePatron">AuthenticatePatron</a></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=GetPatronInfo">GetPatronInfo</a></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=GetPatronStatus">GetPatronStatus</a></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=GetServices">GetServices</a></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=RenewLoan">RenewLoan</a></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=HoldTitle">HoldTitle</a></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=HoldItem">HoldItem</a></li>
-                    <li><a href="ilsdi.pl?service=Describe&verb=CancelHold">CancelHold</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=LookupPatron">LookupPatron</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=AuthenticatePatron">AuthenticatePatron</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=GetPatronInfo">GetPatronInfo</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=GetPatronStatus">GetPatronStatus</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=GetServices">GetServices</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=RenewLoan">RenewLoan</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=HoldTitle">HoldTitle</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=HoldItem">HoldItem</a></li>
+                    <li><a href="ilsdi.pl?service=Describe&amp;verb=CancelHold">CancelHold</a></li>
                     <li>RecallItem <em>(Not supported by Koha)</em></li>
                     <li>CancelRecall <em>(Not supported by Koha)</em></li>
                 </ul>
index 62be158..a229521 100644 (file)
@@ -128,7 +128,7 @@ function tagAdded() {
        <li><a class="download" href="opac-basket.pl" onclick="downloadBasket(); return false;">Download</a></li>
        <li><a class="print" href="opac-basket.pl" onclick="printBasket(); return false;">Print</a></li>
        <li><a class="empty" href="opac-basket.pl" onclick="delBasket(); return false;">Empty and Close</a></li>
-       <li><a class="hide" href="opac-basket.pl" onclick="quit(); return false;">Hide Window</a></li>
+       <li><a class="hide close" href="opac-basket.pl">Hide Window</a></li>
 </ul>
 </div>
         [% END %]
index ca49152..7e2683a 100644 (file)
                                 <td>[% itemLoo.enumchron %]</td>
                               [% END %]
                               <td>
-                                [% IF ( itemLoo.date_due ) %]
-                                  <span class="checkedout">Due [% itemLoo.date_due %]</span>
+                                [% IF ( itemLoo.dateDue ) %]
+                                  <span class="checkedout">Due [% itemLoo.dateDue %]</span>
                                 [% ELSIF ( itemLoo.transfertwhen ) %]
                                   <span class="intransit">In transit from [% itemLoo.transfertfrom %],
                                     to [% itemLoo.transfertto %], since [% itemLoo.transfertwhen %]</span>
old mode 100755 (executable)
new mode 100644 (file)
index 1a3d6f8..2f3c7d5
@@ -107,7 +107,7 @@ $(document).ready(function(){
        param1 += "<option id=\"s[% addbarshelvesloo.shelfnumber %]\" value=\"addtolist\">[% addbarshelvesloo.shelfname |html %]<\/option>";[% END %]
     [% IF ( bartotal ) %]param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>";[% END %]
        param1 += "<\/optgroup>";[% END %]
-       [% IF ( addpubshelves ) %]param1 += "<optgroup label=\""+_("Public Lists:")+"\">"[% FOREACH addpubshelvesloo IN addpubshelvesloop %]+"<option id=\"s[% addpubshelvesloo.shelfnumber %]\" value=\"addtolist\">[% addpubshelvesloo.shelfname |html %]<\/option>";[% END %][% END %]
+       [% IF ( addpubshelves ) %]param1 += "<optgroup label=\""+_("Public Lists:")+"\">"[% FOREACH addpubshelvesloo IN addpubshelvesloop %]+"<option id=\"s[% addpubshelvesloo.shelfnumber %]\" value=\"addtolist\">[% addpubshelvesloo.shelfname |html %]<\/option>"[% END %];[% END %]
        param1 += "<\/optgroup>";
     param1 += "<option value=\"newlist\">[ "+_("New List")+" ]<\/option>";
        [% END %]
@@ -417,15 +417,15 @@ $(document).ready(function(){
                                 [% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber |url %]" title="View details for this title">
                                 [% END %]
                                 [% END %]
-                                                               [% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield %][% END %]</a>
+                                                               [% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield|html %][% END %]</a>
                                 [% IF ( SEARCH_RESULT.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% SEARCH_RESULT.author |url %]" title="Search for works by this author" class="author">[% SEARCH_RESULT.author %]</a>
                                 [% ELSE %]&nbsp;
                                 [% END %]
                                <span class="results_summary"><span class="label">Publication:</span>
-                        [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %][% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode %][% END %][% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %]
+                        [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %][% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode|html %][% END %][% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %]
                     [% ELSE %][% IF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %][% END %]
                         [% IF ( SEARCH_RESULT.pages ) %]. [% SEARCH_RESULT.pages %][% END %]
-                        [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes %][% END %]
+                        [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes|html %][% END %]
                         [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size %][% END %]
                         [% IF ( SEARCH_RESULT.timestamp ) %] <i>(modified on [% SEARCH_RESULT.timestamp %])</i>[% END %]
                 </span>
@@ -480,20 +480,17 @@ $(document).ready(function(){
                                [% IF ( LibraryThingForLibrariesID ) %]<div class="ltfl_reviews"></div>[% END %]
                                [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %]
                                 [% IF ( TagsShowOnList ) %]
-                                   <div class="results_summary">       
                                 [% IF ( SEARCH_RESULT.TagLoop.size ) %]
-                                        <span class="label">Tags:</span>
+                                        <div class="results_summary"><span class="label">Tags:</span>
                                         <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&amp;q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li>
                                             [% END %]
                                         </ul>
                                    [% END %]
                                 [% IF ( TagsInputOnList ) %]
                                     [% IF ( loggedinusername ) %]
-                                    <form name="tagform[% SEARCH_RESULT.biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl">
                                        <span class="label">New tag:</span>
                                         <input name="newtag[% SEARCH_RESULT.biblionumber %]" id="newtag[% SEARCH_RESULT.biblionumber %]" maxlength="100" />
                                         <input name="tagbutton" class="tagbutton" title="[% SEARCH_RESULT.biblionumber %]" type="submit" value="Add" />
-                                    </form>
                                     <span id="newtag[% SEARCH_RESULT.biblionumber %]_status" class="tagstatus" style="display:none;">
                                         Tag status here.
                                     </span>
@@ -528,7 +525,7 @@ $(document).ready(function(){
                                </span>
                                </td><td>
                                        <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">
-            [% IF ( OPACLocalCoverImages ) %]<div style="block" title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></div>[% END %]
+            [% IF ( OPACLocalCoverImages ) %]<span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>[% END %]
                     [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<img src="http://images.amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %][% END %]
 
                                        [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %]
index 391037f..908eb94 100644 (file)
@@ -257,15 +257,15 @@ $(function() {
                                 [% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
                                 [% END %]
                                 [% END %]
-                [% IF ( itemsloo.title ) %][% itemsloo.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN itemsloo.subtitle %][% subtitl.subfield %][% END %]</a>
+                [% IF ( itemsloo.title ) %][% itemsloo.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN itemsloo.subtitle %][% subtitl.subfield|html %][% END %]</a>
                                 [% IF ( itemsloo.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% itemsloo.author |url %]" title="Search for works by this author" class="author">[% itemsloo.author %]</a>
                                 [% ELSE %]&nbsp;
                                 [% END %]
         <span class="results_summary"><span class="label">Publication:</span>
-                        [% IF ( itemsloo.place ) %][% itemsloo.place %] [% END %][% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode %][% END %][% IF ( itemsloo.publicationyear ) %] [% itemsloo.publicationyear %]
+                        [% IF ( itemsloo.place ) %][% itemsloo.place %] [% END %][% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode|html %][% END %][% IF ( itemsloo.publicationyear ) %] [% itemsloo.publicationyear %]
                     [% ELSE %][% IF ( itemsloo.copyrightdate ) %] [% itemsloo.copyrightdate %][% END %][% END %]
                         [% IF ( itemsloo.pages ) %]. [% itemsloo.pages %][% END %]
-                        [% IF ( itemsloo.notes ) %], [% itemsloo.notes %][% END %]
+                        [% IF ( itemsloo.notes ) %], [% itemsloo.notes|html %][% END %]
                         [% IF ( itemsloo.size ) %] [% itemsloo.size %][% END %]
                 </span>
                 <span class="results_summary"><span class="label">Holdings:</span>[% IF ( itemsloo.ITEM_RESULTS ) %][% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
@@ -288,20 +288,19 @@ $(function() {
           [% END %]
                 [% IF ( TagsInputOnList ) %]
           [% IF ( loggedinusername ) %]
-                    <form name="tagform[% itemsloo.biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl">
                         <label for="newtag[% itemsloo.biblionumber %]">New tag:</label>
                         <input name="newtag[% itemsloo.biblionumber %]" id="newtag[% itemsloo.biblionumber %]" maxlength="100" />
                         <input name="tagbutton" class="tagbutton" title="[% itemsloo.biblionumber %]" type="submit" value="Add" />
-                    </form>
                     <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">
                         Tag status here.
                     </span>
                     [% ELSIF ( loop.first ) %]<span class="tagstatus" id="login4tags">Log in to add tags.</span>
                   [% END %]
-                [% END %]
+                [% ELSE %]
             [% IF ( loggedinusername ) %]
-              <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">Tag status here.</span>
+              <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus results_summary" style="display:none;">Tag status here.</span>
             [% END %]
+                [% END %]
         [% END %]
 
 <span class="results_summary actions"><span class="label">Actions:</span>
@@ -325,12 +324,7 @@ $(function() {
             [% IF ( opacbookbag ) %]<a class="addtocart" href="#" onclick="addRecord('[% itemsloo.biblionumber %]'); return false;">Add to Cart</a>[% ELSE %]nocart[% END %]
         </span>
 
-
-
-                    <!-- COinS / Openurl -->
                           <!-- COinS / Openurl --><span class="Z3988" title="[% itemsloo.coins %]"></span>
-                          [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<br/>
-                          <div id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</div>[% END %][% END %][% END %]
                         </td>
           <td>
           <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber %]">
index 61054ea..97e9aca 100644 (file)
 </xsl:template>
 
 <xsl:template match="marc:record">
-  <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
   <xsl:variable name="leader" select="marc:leader"/>
   <xsl:variable name="leader6" select="substring($leader,7,1)"/>
   <xsl:variable name="leader7" select="substring($leader,8,1)"/>
   <xsl:variable name="biblionumber" select="marc:datafield[@tag=090]/marc:subfield[@code='a']"/>
-
+  <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"    />
+  <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindo    w']"/>
+  <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
+  <xsl:variable name="ShowISBD" select="marc:sysprefs/marc:syspref[@name='viewISBD']"/>
 
   <xsl:if test="marc:datafield[@tag=200]">
     <xsl:for-each select="marc:datafield[@tag=200]">
       <h1>
         <xsl:call-template name="addClassRtl" />
-        <xsl:variable name="title" select="marc:subfield[@code='a']"/>
-        <xsl:variable name="ntitle"
-         select="translate($title, '&#x0098;&#x009C;','')"/>
-        <xsl:value-of select="$ntitle" />
-        <xsl:if test="marc:subfield[@code='e']">
-          <xsl:text> : </xsl:text>
-          <xsl:for-each select="marc:subfield[@code='e']">
-            <xsl:value-of select="."/>
-          </xsl:for-each>
-        </xsl:if>
-        <xsl:if test="marc:subfield[@code='b']">
-          <xsl:text> [</xsl:text>
-          <xsl:value-of select="marc:subfield[@code='b']"/>
-          <xsl:text>]</xsl:text>
-        </xsl:if>
-        <xsl:if test="marc:subfield[@code='f']">
-          <xsl:text> / </xsl:text>
-          <xsl:value-of select="marc:subfield[@code='f']"/>
-        </xsl:if>
-        <xsl:if test="marc:subfield[@code='g']">
-          <xsl:text> ; </xsl:text>
-          <xsl:value-of select="marc:subfield[@code='g']"/>
-        </xsl:if>
+        <xsl:for-each select="marc:subfield">
+          <xsl:choose>
+            <xsl:when test="@code='a'">
+              <xsl:variable name="title" select="."/>
+              <xsl:variable name="ntitle"
+               select="translate($title, '&#x0088;&#x0089;&#x0098;&#x009C;','')"/>
+              <xsl:value-of select="$ntitle" />
+            </xsl:when>
+            <xsl:when test="@code='b'">
+              <xsl:text> [</xsl:text>
+              <xsl:value-of select="."/>
+              <xsl:text>]</xsl:text>
+            </xsl:when>
+            <xsl:when test="@code='d'">
+              <xsl:text> = </xsl:text>
+              <xsl:value-of select="."/>
+            </xsl:when>
+            <xsl:when test="@code='e'">
+              <xsl:text> : </xsl:text>
+              <xsl:value-of select="."/>
+            </xsl:when>
+            <xsl:when test="@code='f'">
+              <xsl:text> / </xsl:text>
+              <xsl:value-of select="."/>
+            </xsl:when>
+            <xsl:when test="@code='g'">
+              <xsl:text> ; </xsl:text>
+              <xsl:value-of select="."/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>, </xsl:text>
+              <xsl:value-of select="."/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:for-each>
       </h1>
     </xsl:for-each>
   </xsl:if>
 
-  <xsl:call-template name="tag_4xx" />
+  <div id="views">
+    <span class="view">
+      <span id="Normalview">Normal View</span>
+    </span>
+    <span class="view">
+      <a id="MARCviewPop" href="/cgi-bin/koha/opac-showmarc.pl?id={marc:datafield[@tag=090]/marc:subfield[@code='a']}" title="MARC" rel="gb_page_center[600,500]">MARC View</a>
+    </span>
+    <span class="view">
+      <a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber={marc:datafield[@tag=090]/marc:subfield[@code='a']}" title="MARC">Expanded MARC View</a>
+    </span>
+    <xsl:if test="$ShowISBD!='0'">
+        <span class="view">
+          <a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber={marc:datafield[@tag=090]/marc:subfield[@code='a']}">Card View (ISBD)</a>
+        </span>
+    </xsl:if>
+  </div>
+
+  <xsl:call-template name="tag_title">
+    <xsl:with-param name="tag">454</xsl:with-param>
+    <xsl:with-param name="label">Translation of</xsl:with-param>
+  </xsl:call-template>
+
+  <xsl:call-template name="tag_title">
+    <xsl:with-param name="tag">461</xsl:with-param>
+    <xsl:with-param name="label">Set Level</xsl:with-param>
+  </xsl:call-template>
+
+  <xsl:call-template name="tag_title">
+    <xsl:with-param name="tag">464</xsl:with-param>
+    <xsl:with-param name="label">Piece-Analytic Level</xsl:with-param>
+  </xsl:call-template>
 
   <xsl:call-template name="tag_7xx">
     <xsl:with-param name="tag">700</xsl:with-param>
     <xsl:with-param name="label">Corporate Author (Secondary)</xsl:with-param>
   </xsl:call-template>
 
+  <xsl:call-template name="tag_title">
+    <xsl:with-param name="tag">500</xsl:with-param>
+    <xsl:with-param name="label">Uniform Title</xsl:with-param>
+  </xsl:call-template>
+
+  <xsl:call-template name="tag_title">
+    <xsl:with-param name="tag">503</xsl:with-param>
+    <xsl:with-param name="label">Uniform Conventional Heading</xsl:with-param>
+  </xsl:call-template>
+
   <xsl:if test="marc:datafield[@tag=101]">
-         <span class="results_summary">
-      <span class="label">Language: </span>
+    <span class="results_summary">
+      <span class="label">Language:</span>
       <xsl:for-each select="marc:datafield[@tag=101]">
         <xsl:for-each select="marc:subfield">
           <xsl:choose>
     </span>
   </xsl:if>
 
+  <xsl:call-template name="tag_comma">
+    <xsl:with-param name="tag">205</xsl:with-param>
+    <xsl:with-param name="label">Edition Statement</xsl:with-param>
+  </xsl:call-template>
+
   <xsl:call-template name="tag_210" />
 
   <xsl:call-template name="tag_215" />
 
   <xsl:if test="marc:datafield[@tag=856]">
     <span class="results_summary">
-      <span class="label">Online Resources: </span>
+      <span class="label">Online Resources:</span>
       <xsl:for-each select="marc:datafield[@tag=856]">
-        <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
         <a>
           <xsl:attribute name="href">
             <xsl:value-of select="marc:subfield[@code='u']"/>
           </xsl:attribute>
+          <xsl:if test="$OPACURLOpenInNewWindow='1'">
+            <xsl:attribute name="target">_blank</xsl:attribute>
+          </xsl:if>
           <xsl:choose>
-            <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
-              <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
-            </xsl:when>
             <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
               <xsl:call-template name="subfieldSelect">
                 <xsl:with-param name="codes">y3z</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
             <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
-              Click here to access online
+              <xsl:choose>
+                <xsl:when test="$URLLinkText!=''">
+                  <xsl:value-of select="$URLLinkText"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>Click here to access online</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
             </xsl:when>
           </xsl:choose>
         </a>
index 831724c..e7ff9da 100644 (file)
@@ -18,7 +18,6 @@
 </xsl:template>
 
 <xsl:template match="marc:record">
-  <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
   <xsl:variable name="leader" select="marc:leader"/>
   <xsl:variable name="leader6" select="substring($leader,7,1)"/>
   <xsl:variable name="leader7" select="substring($leader,8,1)"/>
 
   <xsl:if test="marc:datafield[@tag=200]">
     <xsl:for-each select="marc:datafield[@tag=200]">
-      <xsl:variable name="title" select="marc:subfield[@code='a']"/>
-      <xsl:variable name="ntitle"
-       select="translate($title, '&#x0098;&#x009C;','')"/>
-      <div>
         <xsl:call-template name="addClassRtl" />
-        <span class="results_summary">
-          <span class="label"/>
-          <a>
-            <xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
-            <xsl:value-of select="$ntitle" />
-          </a>
-          <xsl:if test="marc:subfield[@code='e']">
-            <xsl:text> : </xsl:text>
-            <xsl:for-each select="marc:subfield[@code='e']">
+        <xsl:for-each select="marc:subfield">
+          <xsl:choose>
+            <xsl:when test="@code='a'">
+              <xsl:variable name="title" select="."/>
+              <xsl:variable name="ntitle"
+                select="translate($title, '&#x0088;&#x0089;&#x0098;&#x009C;','')"/>
+              <a>
+                <xsl:attribute name="href">
+                  <xsl:text>/cgi-bin/koha/opac-detail.pl?biblionumber=</xsl:text>
+                  <xsl:value-of select="$biblionumber"/>
+                </xsl:attribute>
+                <xsl:value-of select="$ntitle" />
+              </a>
+            </xsl:when>
+            <xsl:when test="@code='b'">
+              <xsl:text> [</xsl:text>
               <xsl:value-of select="."/>
-            </xsl:for-each>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='b']">
-            <xsl:text> [</xsl:text>
-            <xsl:value-of select="marc:subfield[@code='b']"/>
-            <xsl:text>]</xsl:text>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='f']">
-            <xsl:text> / </xsl:text>
-            <xsl:value-of select="marc:subfield[@code='f']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='g']">
-            <xsl:text> ; </xsl:text>
-            <xsl:value-of select="marc:subfield[@code='g']"/>
-          </xsl:if>
-        </span>
-      </div>
+              <xsl:text>]</xsl:text>
+            </xsl:when>
+            <xsl:when test="@code='d'">
+              <xsl:text> = </xsl:text>
+              <xsl:value-of select="."/>
+            </xsl:when>
+            <xsl:when test="@code='e'">
+              <xsl:text> : </xsl:text>
+              <xsl:value-of select="."/>
+            </xsl:when>
+            <xsl:when test="@code='f'">
+              <xsl:text> / </xsl:text>
+              <xsl:value-of select="."/>
+            </xsl:when>
+            <xsl:when test="@code='g'">
+              <xsl:text> ; </xsl:text>
+              <xsl:value-of select="."/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>, </xsl:text>
+              <xsl:value-of select="."/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:for-each>
     </xsl:for-each>
   </xsl:if>
 
-  <xsl:call-template name="tag_4xx" />
+  <xsl:call-template name="tag_title">
+    <xsl:with-param name="tag">454</xsl:with-param>
+    <xsl:with-param name="label">Translation of</xsl:with-param>
+  </xsl:call-template>
+
+  <xsl:call-template name="tag_title">
+    <xsl:with-param name="tag">461</xsl:with-param>
+    <xsl:with-param name="label">Set Level</xsl:with-param>
+  </xsl:call-template>
+
+  <xsl:call-template name="tag_title">
+    <xsl:with-param name="tag">464</xsl:with-param>
+    <xsl:with-param name="label">Piece-Analytic Level</xsl:with-param>
+  </xsl:call-template>
 
   <xsl:call-template name="tag_210" />
 
@@ -77,7 +99,6 @@
     <xsl:choose>
       <xsl:when test="marc:datafield[@tag=856]">
         <xsl:for-each select="marc:datafield[@tag=856]">
-        <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
           <xsl:choose>
             <xsl:when test="@ind2=0">
               <a>
                   <xsl:value-of select="marc:subfield[@code='u']"/>
                 </xsl:attribute>
                 <xsl:choose>
-                  <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
-                     <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
-                  </xsl:when>
                   <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
                     <xsl:call-template name="subfieldSelect">                        
                       <xsl:with-param name="codes">y3z</xsl:with-param>                    
index 8eec0fd..146b88c 100644 (file)
@@ -2,7 +2,10 @@
 
 <!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 
-<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="1.0"
+  xmlns:marc="http://www.loc.gov/MARC21/slim"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  exclude-result-prefixes="marc items">
 
   <xsl:template name="datafield">
     <xsl:param name="tag"/>
     </xsl:element>
   </xsl:template>
 
+  <xsl:template name="subfieldSelect">
+    <xsl:param name="codes"/>
+    <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
+    <xsl:param name="subdivCodes"/>
+    <xsl:param name="subdivDelimiter"/>
+    <xsl:variable name="str">
+      <xsl:for-each select="marc:subfield">
+        <xsl:if test="contains($codes, @code)">
+          <xsl:if test="contains($subdivCodes, @code)">
+            <xsl:value-of select="$subdivDelimiter"/>
+          </xsl:if>
+          <xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
+  </xsl:template>
+
+  <xsl:template name="buildSpaces">
+    <xsl:param name="spaces"/>
+    <xsl:param name="char"><xsl:text> </xsl:text></xsl:param>
+    <xsl:if test="$spaces>0">
+      <xsl:value-of select="$char"/>
+      <xsl:call-template name="buildSpaces">
+        <xsl:with-param name="spaces" select="$spaces - 1"/>
+        <xsl:with-param name="char" select="$char"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template name="chopPunctuation">
+    <xsl:param name="chopString"/>
+    <xsl:variable name="length" select="string-length($chopString)"/>
+    <xsl:choose>
+      <xsl:when test="$length=0"/>
+      <xsl:when test="contains('.:,;/ ', substring($chopString,$length,1))">
+        <xsl:call-template name="chopPunctuation">
+          <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="not($chopString)"/>
+      <xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
+    </xsl:choose>
+    <xsl:text> </xsl:text>
+  </xsl:template>
+
+  <xsl:template name="addClassRtl">
+    <xsl:variable name="lang" select="marc:subfield[@code='7']" />
+    <xsl:if test="$lang = 'ha' or $lang = 'Hebrew' or $lang = 'fa' or $lang = 'Arabe'">
+      <xsl:attribute name="class">rtl</xsl:attribute>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template name="tag_title">
+    <xsl:param name="tag" />
+    <xsl:param name="label" />
+    <xsl:if test="marc:datafield[@tag=$tag]">
+      <span class="results_summary">
+        <span class="label">
+        <xsl:value-of select="$label"/>: </span>
+        <xsl:for-each select="marc:datafield[@tag=$tag]">
+          <xsl:call-template name="addClassRtl" />
+          <xsl:for-each select="marc:subfield">
+            <xsl:choose>
+              <xsl:when test="@code='a'">
+                <xsl:variable name="title" select="."/>
+                <xsl:variable name="ntitle"
+                 select="translate($title, '&#x0088;&#x0089;&#x0098;&#x009C;','')"/>
+                <xsl:value-of select="$ntitle" />
+              </xsl:when>
+              <xsl:when test="@code='b'">
+                <xsl:text>[</xsl:text>
+                <xsl:value-of select="."/>
+                <xsl:text>]</xsl:text>
+              </xsl:when>
+              <xsl:when test="@code='d'">
+                <xsl:text> = </xsl:text>
+                <xsl:value-of select="."/>
+              </xsl:when>
+              <xsl:when test="@code='e'">
+                <xsl:text> : </xsl:text>
+                <xsl:value-of select="."/>
+              </xsl:when>
+              <xsl:when test="@code='f'">
+                <xsl:text> / </xsl:text>
+                <xsl:value-of select="."/>
+              </xsl:when>
+              <xsl:when test="@code='g'">
+                <xsl:text> ; </xsl:text>
+                <xsl:value-of select="."/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:if test="position()>1">
+                  <xsl:text>, </xsl:text>
+                </xsl:if>
+                <xsl:value-of select="."/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:for-each>
+          <xsl:if test="not (position() = last())">
+            <xsl:text> â€¢ </xsl:text>
+          </xsl:if>
+        </xsl:for-each>
+      </span>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template name="tag_comma">
+    <xsl:param name="tag" />
+    <xsl:param name="label" />
+    <xsl:if test="marc:datafield[@tag=$tag]">
+      <span class="results_summary">
+        <span class="label">
+        <xsl:value-of select="$label"/>: </span>
+        <xsl:for-each select="marc:datafield[@tag=$tag]">
+          <xsl:call-template name="addClassRtl" />
+          <xsl:for-each select="marc:subfield">
+            <xsl:if test="position()>1">
+              <xsl:text>, </xsl:text>
+            </xsl:if>
+            <xsl:value-of select="."/>
+          </xsl:for-each>
+          <xsl:if test="not (position() = last())">
+            <xsl:text> â€¢ </xsl:text>
+          </xsl:if>
+        </xsl:for-each>
+      </span>
+    </xsl:if>
+  </xsl:template>
+
   <xsl:template name="tag_210">
     <span class="results_summary">
-      <span class="label">Publication: </span>
+      <span class="label">Publication:</span>
       <xsl:for-each select="marc:datafield[@tag=210]">
         <span>
           <xsl:call-template name="addClassRtl" />
-          <xsl:value-of select="marc:subfield[@code='a']"/>
-          <xsl:if test="marc:subfield[@code='b']">
-            <xsl:if test="marc:subfield[@code='a']">, </xsl:if>
-            <xsl:value-of select="marc:subfield[@code='b']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='a' or @code='b']">
-            <xsl:if test="marc:subfield[@code='a']"> : </xsl:if>
-            <xsl:value-of select="marc:subfield[@code='c']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='d']">
-            <xsl:if test="marc:subfield[@code='a' or @code='c']">, </xsl:if>
-            <xsl:value-of select="marc:subfield[@code='d']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='e']">
-            <xsl:if test="marc:subfield[@code='a' or @code='c' or @code='d']"> â€” </xsl:if>
-            <xsl:value-of select="marc:subfield[@code='e']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='g']">
-            <xsl:if test="marc:subfield[@code='e']"> : </xsl:if>
-            <xsl:value-of select="marc:subfield[@code='g']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='h']">
-            <xsl:if test="marc:subfield[@code='e' or @code='g']">, </xsl:if>
-            <xsl:value-of select="marc:subfield[@code='h']"/>
-          </xsl:if>
+          <xsl:for-each select="marc:subfield">
+            <xsl:choose>
+              <xsl:when test="@code='c' or @code='g'">
+                <xsl:if test="position()>1">
+                  <xsl:text> : </xsl:text>
+                </xsl:if>
+                <xsl:value-of select="."/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:if test="position()>1">
+                  <xsl:text>, </xsl:text>
+                </xsl:if>
+                <xsl:value-of select="."/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:for-each>
           <xsl:if test="not (position() = last())">
             <xsl:text> â€¢ </xsl:text>
           </xsl:if>
     </span>
   </xsl:template>
 
-       <xsl:template name="tag_215">
+  <xsl:template name="tag_215">
     <xsl:for-each select="marc:datafield[@tag=215]">
          <span class="results_summary">
         <span class="label">Description: </span>
     </xsl:for-each>
   </xsl:template>
 
-       <xsl:template name="tag_4xx">
-    <xsl:for-each select="marc:datafield[@tag=464 or @tag=461]">
-         <span class="results_summary">
-        <span class="label">Linked with: </span>
-        <span>
-          <xsl:call-template name="addClassRtl" />
-          <xsl:if test="marc:subfield[@code='t']">
-            <xsl:value-of select="marc:subfield[@code='t']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='e']"> :
-            <xsl:value-of select="marc:subfield[@code='e']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='f']"> /
-            <xsl:value-of select="marc:subfield[@code='f']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='v']">,
-            <xsl:value-of select="marc:subfield[@code='v']"/>
-          </xsl:if>
-        </span>
-      </span>
-    </xsl:for-each>
-  </xsl:template>
-
-       <xsl:template name="subfieldSelect">
-               <xsl:param name="codes"/>
-               <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
-               <xsl:param name="subdivCodes"/>
-               <xsl:param name="subdivDelimiter"/>
-               <xsl:variable name="str">
-                       <xsl:for-each select="marc:subfield">
-                               <xsl:if test="contains($codes, @code)">
-                    <xsl:if test="contains($subdivCodes, @code)">
-                        <xsl:value-of select="$subdivDelimiter"/>
-                    </xsl:if>
-                                       <xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
-                               </xsl:if>
-                       </xsl:for-each>
-               </xsl:variable>
-               <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
-       </xsl:template>
-
-       <xsl:template name="buildSpaces">
-               <xsl:param name="spaces"/>
-               <xsl:param name="char"><xsl:text> </xsl:text></xsl:param>
-               <xsl:if test="$spaces>0">
-                       <xsl:value-of select="$char"/>
-                       <xsl:call-template name="buildSpaces">
-                               <xsl:with-param name="spaces" select="$spaces - 1"/>
-                               <xsl:with-param name="char" select="$char"/>
-                       </xsl:call-template>
-               </xsl:if>
-       </xsl:template>
-
-       <xsl:template name="chopPunctuation">
-               <xsl:param name="chopString"/>
-               <xsl:variable name="length" select="string-length($chopString)"/>
-               <xsl:choose>
-                       <xsl:when test="$length=0"/>
-                       <xsl:when test="contains('.:,;/ ', substring($chopString,$length,1))">
-                               <xsl:call-template name="chopPunctuation">
-                                       <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
-                               </xsl:call-template>
-                       </xsl:when>
-                       <xsl:when test="not($chopString)"/>
-                       <xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
-               </xsl:choose>
-    <xsl:text> </xsl:text>
-       </xsl:template>
-
-       <xsl:template name="addClassRtl">
-    <xsl:variable name="lang" select="marc:subfield[@code='7']" />
-    <xsl:if test="$lang = 'ha' or $lang = 'Hebrew' or $lang = 'fa' or $lang = 'Arabe'">
-      <xsl:attribute name="class">rtl</xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-  <xsl:template name="tag_title">
-    <xsl:param name="tag" />
-    <xsl:param name="label" />
-    <xsl:if test="marc:datafield[@tag=$tag]">
-      <span class="results_summary">
-        <span class="label"><xsl:value-of select="$label"/>: </span>
-        <xsl:for-each select="marc:datafield[@tag=$tag]">
-          <xsl:value-of select="marc:subfield[@code='a']" />
-          <xsl:if test="marc:subfield[@code='d']">
-            <xsl:text> : </xsl:text>
-            <xsl:value-of select="marc:subfield[@code='e']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='e']">
-            <xsl:for-each select="marc:subfield[@code='e']">
-              <xsl:text> </xsl:text>
-              <xsl:value-of select="."/>
-            </xsl:for-each>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='f']">
-            <xsl:text> / </xsl:text>
-            <xsl:value-of select="marc:subfield[@code='f']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='h']">
-            <xsl:text>, </xsl:text>
-            <xsl:value-of select="marc:subfield[@code='h']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='i']">
-            <xsl:text>, </xsl:text>
-            <xsl:value-of select="marc:subfield[@code='i']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='v']">
-            <xsl:text>, </xsl:text>
-            <xsl:value-of select="marc:subfield[@code='v']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='x']">
-            <xsl:text>, </xsl:text>
-            <xsl:value-of select="marc:subfield[@code='x']"/>
-          </xsl:if>
-          <xsl:if test="marc:subfield[@code='z']">
-            <xsl:text>, </xsl:text>
-            <xsl:value-of select="marc:subfield[@code='z']"/>
+  <xsl:template name="tag_onesubject">
+    <xsl:choose>
+      <xsl:when test="marc:subfield[@code=9]">
+        <xsl:for-each select="marc:subfield">
+          <xsl:if test="@code='9'">
+            <xsl:variable name="start" select="position()"/>
+            <xsl:variable name="ends">
+              <xsl:for-each select="../marc:subfield[position() &gt; $start]">
+                <xsl:if test="@code=3 or @code=9 or @code=2">
+                  <xsl:variable name="end" select="position() + $start"/>
+                  <xsl:value-of select="$end"/>
+                  <xsl:text>,</xsl:text>
+                </xsl:if>
+              </xsl:for-each>
+            </xsl:variable>
+            <xsl:variable name="end">
+              <xsl:choose>
+                <xsl:when test="string-length($ends) > 0">
+                  <xsl:value-of select="substring-before($ends,',')"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:text>1000</xsl:text>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:variable>
+            <xsl:variable name="display">
+              <xsl:for-each select="../marc:subfield[position() &gt; $start and position() &lt; $end]">
+                <xsl:value-of select="."/>
+                <xsl:if test="not(position()=last())">
+                  <xsl:text>, </xsl:text>
+                </xsl:if>
+              </xsl:for-each>
+            </xsl:variable>
+            <a>
+              <xsl:attribute name="href">
+                <xsl:text>/cgi-bin/koha/opac-search.pl?q=an:</xsl:text>
+                <xsl:value-of select="."/>
+              </xsl:attribute>
+              <xsl:value-of select="$display"/>
+            </a>
+            <xsl:variable name="ncommas"
+                 select="string-length($ends) - string-length(translate($ends, ',', ''))" />
+            <xsl:if test="$ncommas &gt; 1">
+              <xsl:text> -- </xsl:text>
+            </xsl:if>
           </xsl:if>
         </xsl:for-each>
-      </span>
+      </xsl:when>
+      <xsl:otherwise>
+        <a>
+          <xsl:attribute name="href">
+            <xsl:text>/cgi-bin/koha/opac-search.pl?q=su:</xsl:text>
+            <xsl:value-of select="marc:subfield[@code='a']"/>
+          </xsl:attribute>
+          <xsl:call-template name="chopPunctuation">
+            <xsl:with-param name="chopString">
+              <xsl:call-template name="subfieldSelect">
+                <xsl:with-param name="codes">abcdfijkmnpvxyz</xsl:with-param>
+                <xsl:with-param name="subdivCodes">ijknpxyz</xsl:with-param>
+                <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
+              </xsl:call-template>
+            </xsl:with-param>
+          </xsl:call-template>
+        </a>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:if test="not(position()=last())">
+      <xsl:text> | </xsl:text>
     </xsl:if>
   </xsl:template>
 
-
   <xsl:template name="tag_subject">
     <xsl:param name="tag" />
     <xsl:param name="label" />
     <xsl:if test="marc:datafield[@tag=$tag]">
       <span class="results_summary">
-        <span class="label"><xsl:value-of select="$label"/>: </span>
-        <xsl:for-each select="marc:datafield[@tag=$tag]">
-          <a>
-            <xsl:choose>
-              <xsl:when test="marc:subfield[@code=9]">
-                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
-              </xsl:otherwise>
-            </xsl:choose>
-            <xsl:call-template name="chopPunctuation">
-              <xsl:with-param name="chopString">
-                <xsl:call-template name="subfieldSelect">
-                    <xsl:with-param name="codes">abcdjpvxyz</xsl:with-param>
-                    <xsl:with-param name="subdivCodes">jpxyz</xsl:with-param>
-                    <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
-                </xsl:call-template>
-              </xsl:with-param>
+        <span class="label">
+          <xsl:value-of select="$label"/>
+          <xsl:text>: </xsl:text>
+        </span>
+        <span class="value">
+          <xsl:for-each select="marc:datafield[@tag=$tag]">
+            <xsl:call-template name="tag_onesubject">
             </xsl:call-template>
-          </a>
-          <xsl:if test="not (position()=last())">
-            <xsl:text> | </xsl:text>
-          </xsl:if>
-        </xsl:for-each>
+          </xsl:for-each>
+        </span>
       </span>
     </xsl:if>
   </xsl:template>
 
-
   <xsl:template name="tag_7xx">
     <xsl:param name="tag" />
     <xsl:param name="label" />
     <xsl:if test="marc:datafield[@tag=$tag]">
       <span class="results_summary">
-        <span class="label"><xsl:value-of select="$label" />: </span>
-        <xsl:for-each select="marc:datafield[@tag=$tag]">
-          <span>
-            <xsl:call-template name="addClassRtl" />
+        <span class="label">
+          <xsl:value-of select="$label" />
+          <xsl:text>: </xsl:text>
+        </span>
+        <span class="value">
+          <xsl:for-each select="marc:datafield[@tag=$tag]">
             <a>
               <xsl:choose>
                 <xsl:when test="marc:subfield[@code=9]">
-                  <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+                  <xsl:attribute name="href">
+                    <xsl:text>/cgi-bin/koha/opac-search.pl?q=an:</xsl:text>
+                    <xsl:value-of select="marc:subfield[@code=9]"/>
+                  </xsl:attribute>
                 </xsl:when>
                 <xsl:otherwise>
-                  <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='b']"/></xsl:attribute>
+                  <xsl:attribute name="href">
+                    <xsl:text>/cgi-bin/koha/opac-search.pl?q=au:</xsl:text>
+                    <xsl:value-of select="marc:subfield[@code='a']"/>
+                    <xsl:text> </xsl:text>
+                    <xsl:value-of select="marc:subfield[@code='b']"/>
+                  </xsl:attribute>
                 </xsl:otherwise>
               </xsl:choose>
-              <xsl:if test="marc:subfield[@code='a']">
-                <xsl:value-of select="marc:subfield[@code='a']"/>
-              </xsl:if>
-              <xsl:if test="marc:subfield[@code='b']">
-                <xsl:text>, </xsl:text>
-                <xsl:value-of select="marc:subfield[@code='b']"/>
-              </xsl:if>
-              <xsl:if test="marc:subfield[@code='c']">
-                <xsl:text>, </xsl:text>
-                <xsl:value-of select="marc:subfield[@code='c']"/>
-              </xsl:if>
-              <xsl:if test="marc:subfield[@code='d']">
-                <xsl:text> </xsl:text>
-                <xsl:value-of select="marc:subfield[@code='d']"/>
-              </xsl:if>
-              <xsl:if test="marc:subfield[@code='f']">
-                <span dir="ltr">
-                <xsl:text> (</xsl:text>
-                <xsl:value-of select="marc:subfield[@code='f']"/>
-                <xsl:text>)</xsl:text>
-                </span>
-              </xsl:if>
-              <xsl:if test="marc:subfield[@code='g']">
-                <xsl:text> </xsl:text>
-                <xsl:value-of select="marc:subfield[@code='g']"/>
-              </xsl:if>
-              <xsl:if test="marc:subfield[@code='p']">
-                <xsl:text> </xsl:text>
-                <xsl:value-of select="marc:subfield[@code='p']"/>
-              </xsl:if>
+              <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='4' or @code='c' or @code='d' or @code='f' or @code='g' or @code='p']">
+                <xsl:choose>
+                  <xsl:when test="@code='9'">
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:value-of select="."/>
+                  </xsl:otherwise>
+                </xsl:choose>
+                <xsl:if test="not(position() = last())">
+                  <xsl:text>, </xsl:text>
+                </xsl:if>
+              </xsl:for-each>
             </a>
-          </span>
-          <xsl:if test="not (position() = last())">
-            <xsl:text> ; </xsl:text>
-          </xsl:if>
-        </xsl:for-each>
+            <xsl:if test="not(position() = last())">
+              <span style="padding: 3px;">
+                <xsl:text>;</xsl:text>
+              </span>
+            </xsl:if>
+          </xsl:for-each>
+        </span>
       </span>
     </xsl:if>
   </xsl:template>
index a73324e..c6379f0 100644 (file)
@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
 use strict;
 
 sub kohaversion {
-    our $VERSION = '3.07.00.010';
+    our $VERSION = '3.07.00.011';
     # version needs to be set this way
     # so that it can be picked up by Makefile.PL
     # during install
index 2805f27..44db953 100755 (executable)
@@ -128,6 +128,7 @@ $template->param(
     is_child            => ($data->{'category_type'} eq 'C'),
     reverse_col         => $reverse_col,
     accounts            => $accts,
+       activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
 );
 
 output_html_with_http_headers $input, $cookie, $template->output;
index b1ba709..924245a 100755 (executable)
@@ -102,6 +102,7 @@ if ($countissues > 0 or $flags->{'CHARGES'}  or $data->{'borrowernumber'}){
         email => $bor->{'email'},
         branchcode => $bor->{'branchcode'},
         branchname => GetBranchName($bor->{'branchcode'}),
+               activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
     );
     if ($countissues >0) {
         $template->param(ItemsOnIssues => $countissues);
index 3c664c2..88200d0 100755 (executable)
@@ -106,6 +106,7 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
                    branchcode => $data->{'branchcode'},
                    branchname => GetBranchName($data->{'branchcode'}),
                    is_child        => ($data->{'category_type'} eq 'C'),
+                       activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
         );
     output_html_with_http_headers $input, $cookie, $template->output;
 }
index 1f42093..f1c572c 100755 (executable)
@@ -133,6 +133,7 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
                branchcode => $data->{'branchcode'},
                branchname => GetBranchName($data->{'branchcode'}),
                is_child        => ($data->{'category_type'} eq 'C'),
+               activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
     );
     output_html_with_http_headers $input, $cookie, $template->output;
 }
index 76f300e..ca8c9d0 100755 (executable)
@@ -191,6 +191,7 @@ $template->param(
                branchname => GetBranchName($bor->{'branchcode'}),
                loop => \@loop,
                is_child        => ($bor->{'category_type'} eq 'C'),
+               activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
                );
 
     output_html_with_http_headers $input, $cookie, $template->output;
index 25e9551..8128a3d 100755 (executable)
@@ -121,6 +121,7 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
            destination => $destination,
                is_child        => ($bor->{'category_type'} eq 'C'),
            defaultnewpassword => $defaultnewpassword,
+               activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
        );
 
 
index 6e5407c..c477100 100755 (executable)
@@ -481,6 +481,7 @@ $template->param(
     "dateformat_" . (C4::Context->preference("dateformat") || '') => 1,
     samebranch     => $samebranch,
     quickslip            => $quickslip,
+       activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
 );
 
 #Get the slip news items
index 41f2a90..51a843c 100755 (executable)
@@ -68,6 +68,7 @@ $template->param(
                        sentnotices             => 1,
                         branchname              => GetBranchName($borrower->{'branchcode'}),
                         categoryname            => $borrower->{'description'},
+                       activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
 );
 output_html_with_http_headers $input, $cookie, $template->output;
 
index 6bc18fc..72a109f 100755 (executable)
@@ -103,6 +103,8 @@ for (@names) {
     }
 }
 
+$template->param( activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne '') );
+
 add_accounts_to_template();
 
 output_html_with_http_headers $input, $cookie, $template->output;
index cbddc05..7dfb622 100755 (executable)
@@ -67,6 +67,7 @@ if ( $individual || $writeoff ) {
     my $amount            = $input->param('amount');
     my $amountoutstanding = $input->param('amountoutstanding');
     $accountno = $input->param('accountno');
+    my $itemnumber  = $input->param('itemnumber');
     my $description  = $input->param('description');
     my $title        = $input->param('title');
     my $notify_id    = $input->param('notify_id');
@@ -78,6 +79,7 @@ if ( $individual || $writeoff ) {
         amount            => $amount,
         amountoutstanding => $amountoutstanding,
         title             => $title,
+        itemnumber        => $itemnumber,
         description       => $description,
         notify_id         => $notify_id,
         notify_level      => $notify_level,
@@ -133,11 +135,10 @@ if ( $total_paid and $total_paid ne '0.00' ) {
 borrower_add_additional_fields($borrower);
 
 $template->param(
-
- #borrowenumber  => $borrower->{borrowernumber}, # some templates require global
-    borrowenumber => $borrowernumber,    # some templates require global
+    borrowernumber => $borrowernumber,    # some templates require global
     borrower      => $borrower,
-    total         => $total_due
+    total         => $total_due,
+    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
 );
 
 output_html_with_http_headers $input, $cookie, $template->output;
index b4fb8a7..c4a8237 100755 (executable)
@@ -133,6 +133,7 @@ $template->param(
                                                branchname => GetBranchName($data->{'branchcode'}),
                                                showfulllink => (scalar @loop_reading > 50),                                    
                                                loop_reading => \@loop_reading,
+                                               activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
 );
 output_html_with_http_headers $input, $cookie, $template->output;
 
diff --git a/misc/bin/sip_run.sh b/misc/bin/sip_run.sh
new file mode 100755 (executable)
index 0000000..b1bc8d9
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/bash
+# 
+# A sample script for starting SIP.  
+# You probably want to specify new log destinations.
+#
+# Takes 3 optional arguments:
+# ~ SIPconfig.xml file to use
+# ~ file for STDOUT, default ~/sip.out
+# ~ file for STDERR, default ~/sip.err
+#
+# The STDOUT and STDERR files are only for the SIPServer process itself.
+# Actual SIP communication and transaction logs are handled by Syslog.
+#
+# Examples:
+#   sip_run.sh /path/to/SIPconfig.xml
+#   sip_run.sh ~/my_sip/SIPconfig.xml sip_out.log sip_err.log
+
+
+for x in HOME PERL5LIB KOHA_CONF ; do
+       echo $x=${!x}
+       if [ -z ${!x} ] ; then 
+               echo ERROR: $x not defined;
+               exit 1;
+       fi;
+done;
+unset x;
+cd $PERL5LIB/C4/SIP;
+echo;
+
+sipconfig=${1};
+outfile=${2:-$HOME/sip.out};
+errfile=${3:-$HOME/sip.err};
+
+if [ $sipconfig ]; then
+       echo "Running with config file located in $sipconfig" ;
+       echo "Calling (backgrounded):";
+       echo "perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile";
+       perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile &
+
+else
+       echo "Please specify a config file and try again."
+fi
diff --git a/misc/bin/sip_shutdown.sh b/misc/bin/sip_shutdown.sh
new file mode 100755 (executable)
index 0000000..07abbce
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+. $HOME/.bash_profile
+
+# this is brittle: the primary server must have the lowest PPID
+# this is brittle: ps behavior is very platform-specific, only tested on Debian Etch
+
+target="SIPServer";
+PROCPID=$(ps x -o pid,ppid,args --sort ppid | grep "$target" | grep -v grep | head -1 | awk '{print $1}');
+
+if [ ! $PROCPID ] ; then
+    echo "No processes found for $target";
+    exit;
+fi
+
+echo "SIP Processes for this user ($USER):";
+ps x -o pid,ppid,args --sort ppid | grep "$target" | grep -v grep ;
+echo "Killing process #$PROCPID";
+kill $PROCPID;
index 4254d5a..a2b3737 100755 (executable)
@@ -19,6 +19,7 @@
 
 
 use strict;
+use warnings;
 
 use CGI;
 
@@ -74,7 +75,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({
        flagsrequired => {reports => '*'},
        debug => 0,
 });
-our $sep     = $input->param("sep");
+our $sep     = $input->param("sep") || '';
 $sep = "\t" if ($sep eq 'tabulation');
 $template->param(do_it => $do_it,
        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
@@ -169,6 +170,7 @@ my $CGIsepChoice=GetDelimiterChoices;
 $template->param(
        categoryloop => $categoryloop,
        itemtypeloop => \@itemtypeloop,
+       locationloop => \@locations,
           ccodeloop => \@ccodes,
          branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'}),
        hassort1=> $hassort1,
@@ -194,18 +196,25 @@ sub calculate {
 # Filters
 # Checking filters
 #
-       my @loopfilter;
-       foreach my $filter (keys %$filters_hashref){
-               $$filters_hashref{$filter} =~s/\*/%/;
-               $$filters_hashref{$filter} = format_date_in_iso($$filters_hashref{$_}) if ($_=~/date/);
-       }
-       #display
-       @loopfilter= map{{ crit=>$_ ,filter=>($_=~/date/?
-                                                                                       format_date($$filters_hashref{$_})
-                                                                                       :$$filters_hashref{$_}
-                                                                                 )
-                                         }
-                                       } sort keys %$filters_hashref;
+    my @loopfilter;
+    foreach my $filter ( keys %$filters_hashref ) {
+        $filters_hashref->{$filter} =~ s/\*/%/;
+        $filters_hashref->{$filter} =
+          format_date_in_iso( $filters_hashref->{$filter} )
+          if ( $filter =~ /date/ );
+    }
+
+    #display
+    @loopfilter = map {
+        {
+            crit   => $_,
+            filter => (
+                $_ =~ /date/
+                ? format_date( $filters_hashref->{$_} )
+                : $filters_hashref->{$_}
+            )
+        }
+    } sort keys %$filters_hashref;
 
 
 
@@ -228,7 +237,7 @@ sub calculate {
         if ($linefield =~ /^biblio\./ or $colfield =~ /^biblio\./ or any {$_=~/biblio/}keys %$filters_hashref);
        $strcalc .= "LEFT JOIN items ON reserves.itemnumber=items.itemnumber "
         if ($linefield =~ /^items\./ or $colfield =~ /^items\./ or any {$_=~/items/}keys %$filters_hashref);
-        
+
        my @sqlparams;
        my @sqlorparams;
        my @sqlor;
@@ -238,7 +247,6 @@ sub calculate {
                my $string;
                my $stringfield=$filter;
                $stringfield=~s/\_[a-z_]+$//;
-               warn $stringfield;
                if ($filter=~/ /){
                        $string=$stringfield;
                }
@@ -246,6 +254,9 @@ sub calculate {
                         push @sqlor, qq{( }.changeifreservestatus($filter)." = ? ) ";
                         push @sqlorparams, $$filters_hashref{$filter};
                }
+               elsif ($filter=~/_endex$/){
+                       $string = " $stringfield < ? ";
+               }
                elsif ($filter=~/_end$/){
                        $string = " $stringfield <= ? ";
                }
@@ -274,7 +285,6 @@ sub calculate {
        $dbcalc->execute(@sqlparams,@sqlparams);
        my ($emptycol,$emptyrow); 
        my $data = $dbcalc->fetchall_hashref([qw(line col)]);
-       my @loopline;
        my %cols_hash;
        foreach my $row (keys %$data){
                push @loopline, $row;
@@ -304,14 +314,13 @@ sub calculate {
        for my $col ( sort keys %cols_hash ) {
                my $total = 0;
                foreach my $row (@loopline) {
-                       $total += $$data{$row}{$col}{calculation};
+                       $total += $data->{$row}{$col}{calculation} if $data->{$row}{$col}{calculation};
                        $debug and warn "value added ".$$data{$row}{$col}{calculation}. "for line ".$row;
                }
                push @loopfooter, {'totalcol' => $total};
                push @loopcol, {'coltitle' => $col,
                                                coltitle_display=>display_value($colfield,$col)};
        }
-
        # the header of the table
        $globalline{loopfilter}=\@loopfilter;
        # the core of the table
@@ -331,22 +340,34 @@ sub null_to_zzempty ($) {
        ($string eq "NULL") and return 'zzEMPTY';
        return $string;         # else return the valid value
 }
-sub display_value{
-       my ($crit,$value)=@_;
-       my $display_value =
-               ($crit =~ /ccode/   ) ? $ccodes->{$value}    :
-               ($crit =~ /location/) ? $locations->{$value} :
-               ($crit =~ /itemtype/) ? $itemtypes->{$value}->{description} :
-               ($crit =~ /branch/) ? GetBranchName($value):
-               ($crit =~ /reservestatus/) ? reservestatushuman($value):
-               $value; # default fallback
-       if ($crit =~ /(sort1|sort2)/) {
-               $display_value=GetAuthorisedValues("B$_",$value);
-       } elsif ($crit =~ /category/) {
-               my $element=any{$value eq $_->{categorycode}} @$categoryloop;
-               $display_value=$$element{description};
-       }
-       return $display_value;
+sub display_value {
+    my ( $crit, $value ) = @_;
+    my $display_value =
+        ( $crit =~ /ccode/ )         ? $ccodes->{$value}
+      : ( $crit =~ /location/ )      ? $locations->{$value}
+      : ( $crit =~ /itemtype/ )      ? $itemtypes->{$value}->{description}
+      : ( $crit =~ /branch/ )        ? GetBranchName($value)
+      : ( $crit =~ /reservestatus/ ) ? reservestatushuman($value)
+      :                                $value;    # default fallback
+    if ($crit =~ /sort1/) {
+        foreach (@$Bsort1) {
+            ($value eq $_->{authorised_value}) or next;
+            $display_value = $_->{lib} and last;
+        }
+    }
+    elsif ($crit =~ /sort2/) {
+        foreach (@$Bsort2) {
+            ($value eq $_->{authorised_value}) or next;
+            $display_value = $_->{lib} and last;
+        }
+    }
+    elsif ( $crit =~ /category/ ) {
+        foreach (@$categoryloop) {
+            ( $value eq $_->{categorycode} ) or next;
+            $display_value = $_->{description} and last;
+        }
+    }
+    return $display_value;
 }
 sub reservestatushuman{
        my ($val)=@_;
index 21183da..24557f4 100755 (executable)
@@ -192,9 +192,9 @@ if ($borrowerslist) {
 
     foreach my $borrower (
         sort {
-                $a->{surname}
-              . $a->{firstname} cmp $b->{surname}
-              . $b->{firstname}
+                uc($a->{surname}
+              . $a->{firstname}) cmp uc($b->{surname}
+              . $b->{firstname})
         } @{$borrowerslist}
       )
     {
diff --git a/t/Koha_template_plugin_KohaDates.t b/t/Koha_template_plugin_KohaDates.t
deleted file mode 100644 (file)
index f9a0e72..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/perl
-#
-
-use strict;
-use warnings;
-use C4::Context;
-use C4::Dates;
-use Test::More tests => 5;
-
-BEGIN {
-        use_ok('Koha::Template::Plugin::KohaDates');
-}
-
-my $date = "1973-05-21";
-my $context = C4::Context->new();
-my $dateobj = C4::Dates->new();
-
-my $filter = Koha::Template::Plugin::KohaDates->new();
-ok ($filter, "new()");
-
-
-$context->set_preference( "dateformat", 'iso' );
-$context->clear_syspref_cache();
-$dateobj->reset_prefformat;
-
-my $filtered_date = $filter->filter($date);
-is ($filtered_date,$date, "iso conversion") or diag ("iso conversion fails");
-
-#$filter = Koha::Template::Plugin::KohaDates->new();
-$context->set_preference( "dateformat", 'us' );
-$context->clear_syspref_cache();
-$dateobj->reset_prefformat;
-
-$filtered_date = $filter->filter($date);
-is ($filtered_date,'05/21/1973', "us conversion") or diag ("us conversion fails $filtered_date");
-
-$context->set_preference( "dateformat", 'metric' );
-$context->clear_syspref_cache();
-$dateobj->reset_prefformat;
-
-$filtered_date = $filter->filter($date);
-is ($filtered_date,'21/05/1973', "metric conversion") or diag ("metric conversion fails $filtered_date");
diff --git a/t/db_dependent/Koha_template_plugin_KohaDates.t b/t/db_dependent/Koha_template_plugin_KohaDates.t
new file mode 100644 (file)
index 0000000..f9a0e72
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/perl
+#
+
+use strict;
+use warnings;
+use C4::Context;
+use C4::Dates;
+use Test::More tests => 5;
+
+BEGIN {
+        use_ok('Koha::Template::Plugin::KohaDates');
+}
+
+my $date = "1973-05-21";
+my $context = C4::Context->new();
+my $dateobj = C4::Dates->new();
+
+my $filter = Koha::Template::Plugin::KohaDates->new();
+ok ($filter, "new()");
+
+
+$context->set_preference( "dateformat", 'iso' );
+$context->clear_syspref_cache();
+$dateobj->reset_prefformat;
+
+my $filtered_date = $filter->filter($date);
+is ($filtered_date,$date, "iso conversion") or diag ("iso conversion fails");
+
+#$filter = Koha::Template::Plugin::KohaDates->new();
+$context->set_preference( "dateformat", 'us' );
+$context->clear_syspref_cache();
+$dateobj->reset_prefformat;
+
+$filtered_date = $filter->filter($date);
+is ($filtered_date,'05/21/1973', "us conversion") or diag ("us conversion fails $filtered_date");
+
+$context->set_preference( "dateformat", 'metric' );
+$context->clear_syspref_cache();
+$dateobj->reset_prefformat;
+
+$filtered_date = $filter->filter($date);
+is ($filtered_date,'21/05/1973', "metric conversion") or diag ("metric conversion fails $filtered_date");
diff --git a/tags/list.pl b/tags/list.pl
new file mode 100755 (executable)
index 0000000..6a363ac
--- /dev/null
@@ -0,0 +1,93 @@
+#!/usr/bin/perl
+
+# Copyright 2011 Athens County Public Libraries
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use warnings;
+use strict;
+use CGI;
+
+use C4::Auth qw(:DEFAULT check_cookie_auth);
+use C4::Biblio;
+use C4::Context;
+use C4::Dates qw(format_date);
+use C4::Items;
+use C4::Koha;
+use C4::Tags 0.03 qw(get_tags remove_tag get_tag_rows);
+use C4::Output;
+
+my $needed_flags = { tools => 'moderate_tags'
+};    # FIXME: replace when more specific permission is created.
+
+my $query        = CGI->new;
+my $op           = $query->param('op') || '';
+my $biblionumber = $query->param('biblionumber');
+my $tag          = $query->param('tag');
+my $tag_id       = $query->param('tag_id');
+
+my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+    {
+        template_name   => "tags/list.tmpl",
+        query           => $query,
+        type            => "intranet",
+        debug           => 1,
+        authnotrequired => 0,
+        flagsrequired   => $needed_flags,
+    }
+);
+
+if ( $op eq "del" ) {
+    remove_tag($tag_id);
+    print $query->redirect("/cgi-bin/koha/tags/list.pl?tag=$tag");
+}
+else {
+
+    my $marcflavour = C4::Context->preference('marcflavour');
+    my @results;
+
+    if ($tag) {
+        my $taglist = get_tag_rows( { term => $tag } );
+        for ( @{$taglist} ) {
+            my $dat    = &GetBiblioData( $_->{biblionumber} );
+            my $record = &GetMarcBiblio( $_->{biblionumber} );
+            $dat->{'subtitle'} =
+              GetRecordValue( 'subtitle', $record,
+                GetFrameworkCode( $_->{biblionumber} ) );
+            my @items = GetItemsInfo( $_->{biblionumber} );
+            $dat->{biblionumber} = $_->{biblionumber};
+            $dat->{tag_id}       = $_->{tag_id};
+            $dat->{items}        = \@items;
+            $dat->{TagLoop}      = get_tags(
+                {
+                    biblionumber => $_->{biblionumber},
+                    'sort'       => '-weight',
+                    limit        => 10
+                }
+            );
+            push( @results, $dat );
+        }
+
+        my $resultsarray = \@results;
+
+        $template->param(
+            tag    => $tag,
+            titles => $resultsarray,
+        );
+    }
+}
+
+output_html_with_http_headers $query, $cookie, $template->output;
diff --git a/xt/find-misplaced-executables b/xt/find-misplaced-executables
new file mode 100755 (executable)
index 0000000..ebee961
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# Script to find files that probably should not be executed.
+#
+# Copyright 2010 Catalyst IT Ltd
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+set -e
+
+find . \
+    -name misc -prune \
+    -o -name svc -prune \
+    -o -name xt -prune \
+    -o -name t -prune \
+    -o -name .git -prune \
+    -o -name blib -prune \
+    -o -name scripts -prune \
+    -o -name debian -prune \
+    -o -executable -type f \
+        '!' -name '*.pl' \
+        '!' -name '*.sh' \
+        '!' -name '*.plugin' \
+        '!' -name unapi \
+        -print