Browse Source

Add MARC preview to Z39.50 search.

Also, add title string to MARC editor.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
3.0.x
Ryan Higgins 15 years ago
committed by Joshua Ferraro
parent
commit
d878a92b3d
  1. 15
      catalogue/showmarc.pl
  2. 1
      cataloguing/addbiblio.pl
  3. 11
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
  4. 7
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl

15
catalogue/showmarc.pl

@ -35,6 +35,7 @@ use C4::Context;
use C4::Output;
use C4::Auth;
use C4::Biblio;
use C4::ImportBatch;
use XML::LibXSLT;
use XML::LibXML;
@ -42,6 +43,7 @@ my $userid = $ENV{'REMOTE_USER'};
my $input = new CGI;
my $biblionumber = $input->param('id');
my $importid = $input->param('importid');
my $view = $input->param('viewas');
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
@ -56,8 +58,17 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
);
$template->param( SCRIPT_NAME => $ENV{'SCRIPT_NAME'}, );
my ($record, $xmlrecord);
if($importid) {
my ($marc,$encoding) = GetImportRecordMarc($importid);
$record = MARC::Record->new_from_usmarc($marc) ;
if($view eq 'card') {
$xmlrecord = $record->as_xml();
}
}
if($view eq 'card') {
my $xmlrecord = GetXmlBiblio($biblionumber);
$xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord;
my $xslfile = C4::Context->config('intranetdir')."/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl";
my $parser = XML::LibXML->new();
@ -73,7 +84,7 @@ print $newxmlrecord;
} else {
my $record =GetMarcBiblio($biblionumber);
$record =GetMarcBiblio($biblionumber) unless $record;
my $formatted = $record->as_formatted;
$template->param( MARC_FORMATTED => $formatted );

1
cataloguing/addbiblio.pl

@ -785,6 +785,7 @@ $is_a_modif = 0;
if ($biblionumber) {
$is_a_modif = 1;
$template->param( title => $record->title(), );
# if it's a modif, retrieve bibli and biblioitem numbers for the future modification of old-DB.
( $biblionumbertagfield, $biblionumbertagsubfield ) =

11
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl

@ -46,11 +46,8 @@ function Dopop(link,i) {
function PopupZ3950() {
var strQuery = GetZ3950Terms();
if(strQuery){
window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes');
} else {
var strAlert = _("To perform a z39.50 search, you must enter at least one of the following: \n\n ISBN\n ISSN\n Title\n Author\n LCCN\n");
alert(strAlert);
}
window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,resize=yes');
}
}
/**
@ -434,7 +431,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
//]]>
</script>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloguing</a> &rsaquo; <!-- TMPL_IF NAME="biblionumber" -->Edit MARC Record Number <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --></div>
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloguing</a> &rsaquo; <!-- TMPL_IF NAME="biblionumber" -->Edit MARC Record Number <!-- TMPL_VAR name="biblionumber" --> ( <!-- TMPL_VAR NAME="title" --> )<!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --></div>
<div id="doc" class="yui-t7">
@ -444,7 +441,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
<h1><!-- TMPL_IF NAME="biblionumber" -->Edit MARC Record Number <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --></h1>
<h1><!-- TMPL_IF NAME="biblionumber" -->Edit MARC Record Number <!-- TMPL_VAR name="biblionumber" --></h1><h2> ( <!-- TMPL_VAR NAME="title" --> )</h2><!-- TMPL_ELSE -->Add MARC Record</h1><!-- /TMPL_IF -->
<!-- TMPL_UNLESS name="number" -->
<!-- show duplicate warning on tab 0 only -->

7
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl

@ -1,5 +1,6 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Z39.50 Search Results</title>
<!-- TMPL_INCLUDE NAME="greybox.inc" -->
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript">
//<![CDATA[
@ -61,7 +62,8 @@
<th>Author</th>
<th>ISBN</th>
<th>LCCN</th>
<th>&nbsp;</th>
<th>Preview<th>
<th>&nbsp;</th>
</tr>
<!-- TMPL_IF name="breeding_loop" -->
<!-- TMPL_LOOP name="breeding_loop" -->
@ -73,7 +75,8 @@
<td><!-- TMPL_VAR NAME="author" --></td>
<td><!-- TMPL_VAR NAME="isbn" --></td>
<td><!-- TMPL_VAR NAME="lccn" --></td>
<td><a href="javascript:Import(<!-- TMPL_VAR NAME="breedingid" -->,<!-- TMPL_VAR NAME="biblionumber" -->)">Import</a></td>
<td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR NAME="breedingid" -->" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=<!-- TMPL_VAR NAME="breedingid" -->" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
<td><a href="javascript:Import(<!-- TMPL_VAR NAME="breedingid" -->,<!-- TMPL_VAR NAME="biblionumber" -->)">Import</a></td>
</tr>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->

Loading…
Cancel
Save