example search for Koha database
authorMarijana Glavica <mglavica@ffzg.hr>
Mon, 27 Jul 2009 13:40:29 +0000 (13:40 +0000)
committerMarijana Glavica <mglavica@ffzg.hr>
Mon, 27 Jul 2009 13:40:29 +0000 (13:40 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1252 07558da8-63fa-0310-ba24-9fe276d99e06

vhost/koha/config.yml
vhost/koha/html.pm
vhost/koha/koha-labels.txt
vhost/koha/marc.pl

index b2ec4d9..0646f02 100644 (file)
@@ -5,13 +5,12 @@ vhost:
 
 databases:
   koha:
-    name: 'Katalog knjižnice Filozofskog fakulteta'
+    name: 'Katalog Knjižnice Filozofskog fakulteta'
     description: 'pretraživanje kataloga'
     input:
       - name: 'database'
         module: 'WebPAC::Input::Koha'
         path: 'var/koha.marc'
-        hide: 1
       - name: 'marc'
         module: 'WebPAC::Input::MARC'
         path: 'var/koha.marc'
index 9aabf1e..73f705b 100644 (file)
@@ -12,7 +12,9 @@ sub title {
        my ($self,$title,$data) = @_;
        my $biblionumber = $data->{biblionumber} || die; # title only without biblionumber
 
-       qq|<a target="koha.ffzg.hr" href="http://koha.ffzg.hr/cgi-bin/koha/opac-detail.pl?biblionumber=$biblionumber">$title</a>|;
+       my $responsibility = $1 if $title =~ s{(\s+/\s+.+)$}{};
+
+       qq|<a target="koha.ffzg.hr" href="http://koha.ffzg.hr/cgi-bin/koha/opac-detail.pl?biblionumber=$biblionumber">$title</a>$responsibility|;
 }
 
 1;
index 46ba28d..08e220c 100644 (file)
@@ -2,3 +2,4 @@ author          Author
 title          Title
 isbn           ISBN
 impressum      Impressum
+year           Year
index 767e323..86d19a5 100644 (file)
@@ -19,6 +19,11 @@ search( 'impressum',
                rec('260','c'), 
        )
 );
+if ( my $year = rec('008') ) {
+       search( 'year',
+               substr( $year,7,4 )
+       ) if length($year) > 13;
+}
 search( 'keywords',
        join_with(' ; ',
                rec('653','a')