Merge branch 'signoffs' into kcmaster

This commit is contained in:
Chris Cormack 2010-11-01 20:52:42 +13:00
commit c52225a599
13 changed files with 123 additions and 34 deletions

View file

@ -254,7 +254,14 @@ sub displayresults {
##Add necessary encoding changes to here -TG
my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" );
$oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn};
$oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn};
# pad | and ( with spaces to allow line breaks in the HTML
$oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn};
$oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn};
$oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn};
# pad | and ( with spaces to allow line breaks in the HTML
$oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn};
$oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn};
my (
$notmarcrecord, $alreadyindb, $alreadyinfarm,
$imported, $breedingid

View file

@ -161,8 +161,6 @@ elsif ( $op eq "delete" ) {
}
);
# $template->param("statements" => \@statements,
# "nbstatements" => $nbstatements);
}
else {
( $template, $loggedinuser, $cookie ) = get_template_and_user(

View file

@ -237,8 +237,15 @@ warn "query ".$query if $DEBUG;
# In rel2_2 i am not sure what encoding is so no character conversion is done here
##Add necessary encoding changes to here -TG
my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" );
$oldbiblio->{isbn} =~ s/ |-|\.//g,
$oldbiblio->{issn} =~ s/ |-|\.//g,
$oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn};
# pad | and ( with spaces to allow line breaks in the HTML
$oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn};
$oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn};
$oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn};
# pad | and ( with spaces to allow line breaks in the HTML
$oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn};
$oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn};
my (
$notmarcrecord, $alreadyindb, $alreadyinfarm,
$imported, $breedingid

View file

@ -1,7 +1,6 @@
<form name="f" method="get" action="auth_finder.pl">
<input type="hidden" name="op" value="do_search" />
<input type="hidden" name="type" value="intranet" />
<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->" />
<fieldset class="rows"><ol><li>
<span class="label">Authority type</span>

View file

@ -6,7 +6,6 @@
<form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get">
<input type="hidden" name="op" value="do_search" />
<input type="hidden" name="type" value="intranet" />
<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
<select name="authtypecode">
<!-- TMPL_LOOP NAME="authtypesloop" -->
<!-- TMPL_IF name="selected" -->
@ -36,7 +35,6 @@
<form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get">
<input type="hidden" name="op" value="do_search" />
<input type="hidden" name="type" value="intranet" />
<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
<select name="authtypecode">
<!-- TMPL_LOOP NAME="authtypesloop" -->
<!-- TMPL_IF name="selected" -->
@ -68,7 +66,6 @@
<form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get">
<input type="hidden" name="op" value="do_search" />
<input type="hidden" name="type" value="intranet" />
<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
<select name="authtypecode">
<!-- TMPL_LOOP NAME="authtypesloop" -->
<!-- TMPL_IF name="selected" -->

View file

@ -46,7 +46,13 @@
}
};
function Add() {
window.open("/cgi-bin/koha/labels/label-item-search.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes');
var barcodes = document.getElementById("barcode");
if (barcodes.value == '') {
window.open("/cgi-bin/koha/labels/label-item-search.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes');
}
else {
document.forms["add_by_barcode"].submit();
}
};
function DeDuplicate() {
window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=de_duplicate&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->";

View file

@ -14,6 +14,7 @@ $.tablesorter.addParser({
});
$(document).ready(function(){
$.tablesorter.defaults.widgets = ['zebra'];
$("#CheckAll").click(function(){
$(".checkboxed").checkCheckboxes();
return false;
@ -22,23 +23,48 @@ $.tablesorter.addParser({
$(".checkboxed").unCheckCheckboxes();
return false;
});
$("#closemenu").click(function(e){
$(".linktools").hide();
$("tr").removeClass("selected");
});
$("#resultst").tablesorter({
sortList: [[1,0]],
headers: { 0: {sorter:false}, 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }}
headers: { 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }}
});
/* Inline edit/delete links */
$("td").click(function(event){
var $tgt = $(event.target);
$(".linktools").hide();
$("tr").removeClass("selected");
if($tgt.is("a")||$tgt.is(":nth-child(5)")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")){
return true;
} else {
var position = $(this).offset();
var top = position.top+5;
var left = position.left+5;
$(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
}
var row = $(this).parent();
row.addClass("selected");
});
});
//]]>
</script>
<style type="text/css">
#custom-doc { width:54.92em;*width:53.55em;min-width:720px; margin:auto; text-align:left; }
</style>
<style type="text/css">
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
.linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent !important; }
</style>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; Order from Z39.50 search</div>
<div id="custom-doc" class="yui-t7">
<div id="doc3" class="yui-t7">
<div id="bd">
<!-- TMPL_IF name="opsearch" -->
<h2>Z39.50 Search Points</h2>
@ -114,13 +140,13 @@ $.tablesorter.addParser({
<!-- TMPL_IF NAME="breedingid" -->
<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
<td><!-- TMPL_VAR name="server" --></td>
<td><!-- TMPL_VAR name="server" --> <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR NAME="breedingid" -->" rel="gb_page_center[600,500]">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=<!-- TMPL_VAR NAME="breedingid" -->" rel="gb_page_center[600,500]">Preview Card</a> <a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->&amp;breedingid=<!-- TMPL_VAR NAME="breedingid" -->&amp;booksellerid=<!-- TMPL_VAR name="booksellerid" -->&amp;basketno=<!-- TMPL_VAR name="basketno" -->">Order</a> <a href="#" id="closemenu" title="Close this menu"> X </a></div></td>
<td><!-- TMPL_VAR NAME="title" ESCAPE="html" --></td>
<td><!-- TMPL_VAR NAME="author" --></td>
<td><!-- TMPL_VAR NAME="isbn" --></td>
<td><!-- TMPL_VAR NAME="lccn" --></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></td><td><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="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->&breedingid=<!-- TMPL_VAR NAME="breedingid" -->&booksellerid=<!-- TMPL_VAR name="booksellerid" -->&basketno=<!-- TMPL_VAR name="basketno" -->">Order</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></td><td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=<!-- TMPL_VAR NAME="breedingid" -->" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
<td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->&amp;breedingid=<!-- TMPL_VAR NAME="breedingid" -->&amp;booksellerid=<!-- TMPL_VAR name="booksellerid" -->&amp;basketno=<!-- TMPL_VAR name="basketno" -->">Order</a></td>
</tr>
<!-- /TMPL_IF -->

View file

@ -38,18 +38,19 @@ $(document).ready(function(){
});
/* Inline edit/delete links */
$("td").click(function(event){
var $tgt = $(event.target);
$(".linktools").hide();
$("tr").removeClass("selected");
if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){
return true;
} else {
var position = $(this).offset();
var top = position.top+5;
var left = position.left+5;
$(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
}
var row = $(this).parent();
row.addClass("selected");
var $tgt = $(event.target);
if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ return true; } else {
var position = $(this).offset();
var top = position.top+5;
var left = position.left+5;
$(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
}
});
});

View file

@ -8,7 +8,6 @@
<form name="f" method="post">
<input type="hidden" name="op" value="do_search" />
<input type="hidden" name="type" value="intranet" />
<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
<div class="details">
<h2>Search on</h2>
<p>
@ -32,4 +31,4 @@
</form>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

View file

@ -1,9 +1,26 @@
<!-- PLEASE MAINTAIN PROPER INDENTATION!!!! -->
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Tools &rsaquo; Labels &rsaquo; Manage Label Batches</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="greybox.inc" -->
<script type="text/javascript">
//<![CDATA[
function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
$(".focus:last").select();
}
function verifyBarcodes(barcodes) {
if (barcodes.value == '') {
alert("Please add barcodes using either the direct entry text area or the item search.");
return false; // not ok
}
else {
return true; // ok
};
}
//]]>
</script>
</head>
<body>
<body onload="dofocus();">
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
<div id="breadcrumbs">
@ -21,6 +38,21 @@
<div class="yui-g">
<div class="yui-u first" id="manage-label-batches">
<div class="hint">Current Branch: <!-- TMPL_VAR NAME="LoginBranchname" --></div>
<form name="add_by_barcode" action="/cgi-bin/koha/labels/label-edit-batch.pl" method="post">
<div>
<fieldset class="rows" style="border-bottom: 0px; border: 0px;">
<ol><li>
<input type="hidden" name="op" value="add" \>
<input type="hidden" name="batch_id" value="<!-- TMPL_VAR NAME="batch_id" -->" \>
<label for="barcode">Add by Barcode(s):
<br \> <span class="hint">One barcode per line.</span>
<br \> <span class="hint">Leave empty to add via item search.</span>
</label>
<textarea rows="5" id="barcode" name="barcode" tabindex="1" class="focus"></textarea>
</li></ol>
</fieldset>
</div>
</form>
<!-- TMPL_IF NAME="table_loop" -->
<form name="items" class="checkboxed">
<h2>Items in batch number <!-- TMPL_VAR NAME="batch_id" --></h2>
@ -47,8 +79,14 @@
</table>
</form>
<!-- TMPL_ELSE -->
<div class="dialog message"><h4>There are no items in Batch <!-- TMPL_VAR NAME="batch_id" --> yet</h4>
<p>Use the toolbar above to add items.</p></div>
<fieldset class="rows" style="border-bottom: 0px; border: 0px;">
<ol><li>
<div class="dialog message">
<h4>There are no items in Batch <!-- TMPL_VAR NAME="batch_id" --> yet</h4>
<p>Add items by barcode using the text area above or leave empty to add via item search.</p>
</div>
</li></ol>
</fieldset>
<!-- /TMPL_IF -->
</div>
<!-- TMPL_IF NAME="err" -->

View file

@ -14,7 +14,8 @@
<h3><!-- TMPL_VAR name="LibraryName" --></h3>
<!-- TMPL_IF NAME="branchname" --><!-- TMPL_VAR NAME="branchname" --><br /><!-- /TMPL_IF -->
Checked out to <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="cardnumber">"><!-- TMPL_VAR NAME="cardnumber" --></a><br />
Checked out to <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> <br />
(<a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="cardnumber">"><!-- TMPL_VAR NAME="cardnumber" --></a>)<br />
<!-- TMPL_VAR NAME="todaysdate" --><br />

View file

@ -12,7 +12,6 @@
<form name="f" action="/cgi-bin/koha/opac-authorities-home.pl" method="get">
<input type="hidden" name="op" value="do_search" />
<input type="hidden" name="type" value="opac" />
<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
<fieldset class="rows">
<legend>Authority search</legend>
<ol>

View file

@ -27,6 +27,7 @@ use CGI;
use C4::Auth qw(get_template_and_user);
use C4::Output qw(output_html_with_http_headers);
use C4::Branch qw(get_branch_code_from_name);
use C4::Items qw(GetItemnumberFromBarcode);
use C4::Creators 1.000000;
use C4::Labels 1.000000;
@ -57,7 +58,8 @@ my $display_columns = [ {_label_number => {label => 'Label Number', link_field
my $op = $cgi->param('op') || 'edit';
my $batch_id = $cgi->param('element_id') || $cgi->param('batch_id') || undef;
my @label_ids = $cgi->param('label_id') if $cgi->param('label_id');
my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number');
my @item_numbers = $cgi->param('item_number') || ();
my $barcode = $cgi->param('barcode') if $cgi->param('barcode');
my $branch_code = get_branch_code_from_name($template->param('LoginBranchname'));
@ -76,6 +78,15 @@ elsif ($op eq 'delete') {
$errstr = "batch $batch_id was not deleted." if $err;
}
elsif ($op eq 'add') {
if ($barcode) {
my @barcodes = split /\n/, $barcode; # $barcode is effectively passed in as a <cr> separated list
foreach my $number (@barcodes) {
$number =~ s/\r$//; # strip any naughty return chars
if (my $item_number = GetItemnumberFromBarcode($number)) { # we must test in case an invalid barcode is passed in; we effectively disgard them atm
push @item_numbers, $item_number;
}
}
}
$batch = C4::Labels::Batch->retrieve(batch_id => $batch_id);
$batch = C4::Labels::Batch->new(branch_code => $branch_code) if $batch == -2;
if ($branch_code){