Browse Source

improving behaviour when MARC=OFF

3.0.x
tipaul 18 years ago
parent
commit
5dda1342e9
  1. 5
      acqui.simple/additem-nomarc.pl
  2. 2
      acqui.simple/saveitem.pl
  3. 92
      koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio-nomarc.tmpl
  4. 301
      koha-tmpl/intranet-tmpl/default/en/acqui.simple/additem-nomarc.tmpl
  5. 24
      loadmodules.pl
  6. 1
      search.marc/search.pl

5
acqui.simple/additem-nomarc.pl

@ -20,6 +20,9 @@
# Suite 330, Boston, MA 02111-1307 USA
# $Log$
# Revision 1.4 2004/11/19 16:41:49 tipaul
# improving behaviour when MARC=OFF
#
# Revision 1.3 2004/08/13 16:37:25 tipaul
# adding frameworkcode to API in some subs
#
@ -30,7 +33,7 @@
use CGI;
use strict;
# use C4::Catalogue;
use C4::Acquisition;
use C4::Biblio;
use C4::Output;
use HTML::Template;

2
acqui.simple/saveitem.pl

@ -54,7 +54,7 @@ my $biblioitem = {
volumeddesc => $input->param('volumeddesc')?$input->param('volumeddesc'):"",
pages => $input->param('pages')?$input->param('pages'):"",
size => $input->param('size')?$input->param('size'):"",
notes => $input->param('notes')?$input->param('notes'):""
notes => $input->param('itemnotes')?$input->param('itemnotes'):""
}; # my biblioitem
my $newgroup = 0;
my $website = 0;

92
koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio-nomarc.tmpl

@ -1,60 +1,36 @@
<!-- TMPL_INCLUDE NAME="acquisitions-top.inc" -->
<!-- TMPL_INCLUDE NAME="cat-top.inc" -->
<font size="6"><em>Adding a new Biblio</em></font><br>
<table bgcolor="#ffcc00" width="80%" cellpadding="5">
<tr>
<td><font size="5">Section One: Copyright Information </font></td>
</tr>
</table>
<!-- TMPL_IF NAME="ERROR" -->
<p>&nbsp;</p>
<center>
<font color="#FF0000">Please Specify a Title</font>
</center>
<!-- /TMPL_IF -->
<form action="savebiblio.pl" method="post">
<table align="center">
<tr>
<td>Title: *</td>
<td><input name="title" size="40" /></td>
</tr>
<tr>
<td>Subtitle:</td>
<td><input name="subtitle" size="40" /></td>
</tr>
<tr>
<td>Author:</td>
<td><input name="author" size="40" /></td>
</tr>
<tr valign="top"><td class="text">Additional Authors:<br><i>One Author per line</i></td>
<td><textarea class="form-box-textarea2" name="additionalauthors" cols="30" rows="6"></textarea></td></tr>
<tr valign="top">
<td>Series Title:<br />
<i>(if applicable)</i></td>
<td><input name="seriestitle" size="40" /></td>
</tr>
<tr valign="top"><td class="text">Subject Headings:<br><i>One Subject per line</i></td>
<td><textarea class="form-box-textarea2" name="subjectheadings" cols="30" rows="6"></textarea></td></tr>
<tr>
<td>Copyright Date:</td>
<td><input name="copyrightdate" size="40" /></td>
</tr>
<tr valign="top">
<td>Abstract:</td>
<td><textarea cols="30" rows="6" name="abstract"></textarea></td>
</tr>
<tr valign="top">
<td>Notes:</td>
<td><textarea cols="30" rows="6" name="notes"></textarea></td>
</tr>
<tr valign="top">
<td colspan="2"><center><input type="submit" value="Submit"></center></td>
</tr>
</table>
</form>
* Required
<div id="mainbloc">
<h1 class="catalogue">Adding a new Biblio</h1>
<div id="bloc60">
<h2 class="catalogue">Section One: Copyright Information </h2>
<!-- TMPL_IF NAME="ERROR" -->
<p class="problem">Please Specify a Title</p>
<!-- /TMPL_IF -->
<form action="savebiblio.pl" method="post">
<p><label class="label100">Title: *</label><input name="title" size="40" /></p>
<p><label class="label100">Subtitle:</label><input name="subtitle" size="40" /></p>
<p><label class="label100">Author:</label><input name="author" size="40" /></p>
<p>Additional Authors: <i>One Author per line</i></p>
<p><label class="label100">&nbsp;</label>
<textarea class="form-box-textarea2" name="additionalauthors" cols="30" rows="6"></textarea>
</p>
</p>
<p>Series Title: <i>(if applicable)</i></p>
<p><label class="label100">&nbsp;</label><input name="seriestitle" size="40" /></p>
<p>Subject Headings: <i>One Subject per line</i></p>
<p><label class="label100">&nbsp;</label>
<textarea class="form-box-textarea2" name="subjectheadings" cols="30" rows="6"></textarea>
</p>
<label class="label100">Copyright Date:</label><input name="copyrightdate" size="40" /></p>
<label class="label100">Abstract:</label><textarea cols="30" rows="6" name="abstract"></textarea></p>
<label class="label100">Notes:</label><textarea cols="30" rows="6" name="notes"></textarea></p>
<p><input type="submit" value="Submit" class="button catalogue"></p>
</form>
* Required
</div>
</div>
<!-- TMPL_INCLUDE NAME="acquisitions-bottom.inc" -->

301
koha-tmpl/intranet-tmpl/default/en/acqui.simple/additem-nomarc.tmpl

@ -1,201 +1,102 @@
<!-- TMPL_INCLUDE NAME="acquisitions-top.inc" -->
<font size="6"><em><!-- TMPL_VAR NAME="TITLE" --></em></font>
<p>
<!-- TMPL_IF NAME="NOBARCODE" -->
<font size="5" color="red">You must give the item a barcode</font>
<p>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="NOBIBLIOITEM" -->
<font size="5" color="red">You must create a new group for your item to be
added to</font>
<p>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="BARCODEINUSE" -->
<font size="5" color="red">Sorry, that barcode is already in use</font>
<p>
<!-- /TMPL_IF -->
<table align="left" cellpadding="5" cellspacing="0" border="1" width="220">
<tr valign="top" bgcolor="#CCCC99">
<td background="/images/background-mem.gif"><b>BIBLIO RECORD <!-- TMPL_VAR NAME="BIBNUM" --></b></td>
</tr>
<tr valign="top">
<td><b>Author:</b> <!-- TMPL_VAR NAME="AUTHOR" --><br>
<b>Copyright:</b> <!-- TMPL_VAR NAME="COPYRIGHT" --><br>
<b>Series Title:</b> <!-- TMPL_VAR NAME="SERIES" --><br>
<b>Notes:</b> <!-- TMPL_VAR NAME="NOTES" --></td>
</tr>
<!-- TMPL_LOOP NAME="BIBITEMS" -->
<!-- TMPL_IF NAME="WEB" -->
<tr valign="top" bgcolor="#CCCC99">
<td
background="/images/background-mem.gif"><b><!-- TMPL_VAR NAME="biblioitemnumber" --> GROUP -
<!-- TMPL_VAR NAME="itemtype" -->
</b></td>
</tr>
<tr valign="top">
<td><b>URL:</b> <!-- TMPL_VAR NAME="url" --><br>
<b>Date:</b> <!-- TMPL_VAR NAME="publicationyear" --><br>
<b>Notes:</b> <!-- TMPL_VAR NAME="notes" --></td>
</tr>
<!-- TMPL_ELSE -->
<tr valign="top" bgcolor="#CCCC99">
<td
background="/images/background-mem.gif"><b><!-- TMPL_VAR NAME="biblioitemnumber" -->
GROUP - <!-- TMPL_VAR NAME="itemtype" --></b></td>
</tr>
<tr valign="top">
<td><b>ISBN:</b> <!-- TMPL_VAR NAME="isbn" --><br>
<b>Dewey:</b> <!-- TMPL_VAR NAME="dewey" --><br>
<b>Publisher:</b> <!-- TMPL_VAR NAME="publishercode" --><br>
<b>Place:</b> <!-- TMPL_VAR NAME="place" --><br>
<b>Date:</b> <!-- TMPL_VAR NAME="publicationyear" --></td>
</tr>
<!-- TMPL_LOOP NAME="ITEMS -->
<tr valign="top" bgcolor="#FFFFCC">
<td><b>Item:</b> <!-- TMPL_VAR NAME="barcode" --><br>
<b>Home Branch:</b> <!-- TMPL_VAR NAME="homebranch" --><br>
<b>Notes:</b> <!-- TMPL_VAR NAME="itemnotes" --></td>
</tr>
<!-- /TMPL_LOOP -->
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</table>
<img src="/images/holder.gif" width="16" height="650" align="left">
<center>
<form action="saveitem.pl" method="post">
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="BIBNUM" -->">
<table border="1" cellspacing="0" cellpadding="5">
<tr valign="top" bgcolor="#CCCC99">
<td background="/images/background-mem.gif" colspan="2"><b>ADD NEW
ITEM:</b><br>
<small><i>For a website add the group only</i></small></td>
</tr>
<tr valign="top">
<td>Item Barcode:</td>
<td><input type="text" name="barcode" size="40"></td>
</tr>
<tr valign="top">
<td>Branch:</td>
<td><select name="homebranch">
<!-- TMPL_LOOP NAME="BRANCHES" -->
<option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
<!-- /TMPL_LOOP -->
</select></td>
</tr>
<tr valign="top">
<td>Replacement Price:</td>
<td><input type="text" name="replacementprice" size="40"></td>
</tr>
<tr valign="top">
<td>Notes:</td>
<td><textarea name="itemnotes" cols="30" rows="6"></textarea></td>
</tr>
<tr valign="top" bgcolor="#CCCC99">
<td colspan="2" background="/images/background-mem.gif"><b>Add to existing group:</b></td>
</tr>
<tr valign="top">
<td>Group:</td>
<td><select name="biblioitemnumber">
<!-- TMPL_LOOP NAME="BIBITEMS" -->
<!-- TMPL_IF NAME="WEB" -->
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="biblioitemnumber" -->"><!-- TMPL_VAR NAME="itemtype" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select></td>
</tr>
<tr valign="top">
<td colspan="2" align="center"><input type="submit" name="existinggroup"
value="Add New Item to Existing Group"></td>
</tr>
<tr valign="top" bgcolor="#CCCC99">
<td colspan="2" background="/images/background-mem.gif"><b>OR Add to a new
Group:</b></td>
</tr>
<tr valign="top">
<td>Format:</td>
<td><select name="itemtype">
<!-- TMPL_LOOP NAME="ITEMTYPES" -->
<option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
<!-- /TMPL_LOOP -->
</select></td>
</tr>
<tr valign="top">
<td>ISBN:</td>
<td><input name="isbn" size="40"></td>
</tr>
<tr valign="top">
<td>Publisher:</td>
<td><input name="publishercode" size="40"></td>
</tr>
<tr valign="top">
<td>Publication Year:</td>
<td><input name="publicationyear" size="40"></td>
</tr>
<tr valign="top">
<td>Place of Publication:</td>
<td><input name="place" size="40"></td>
</tr>
<tr valign="top">
<td>Illustrator:</td>
<td><input name="illus" size="40"></td>
</tr>
<tr valign="top">
<td>Website URL:</td>
<td><input name="url" size="40"></td>
</tr>
<tr valign="top">
<td>Dewey:</td>
<td><input name="dewey" size="40"></td>
</tr>
<tr valign="top">
<td>Dewey Subclass:</td>
<td><input name="subclass" size="40"></td>
</tr>
<tr valign="top">
<td>ISSN:</td>
<td><input name="issn" size="40"></td>
</tr>
<tr valign="top">
<td>LCCN:</td>
<td><input name="lccn" size="40"></td>
</tr>
<tr valign="top">
<td>Volume:</td>
<td><input name="volume" size="40"></td>
</tr>
<tr valign="top">
<td>Number:</td>
<td><input name="number" size="40"></td>
</tr>
<tr valign="top">
<td>Volume Description:</td>
<td><input name="volumeddesc" size="40"></td>
</tr>
<tr valign="top">
<td>Pages:</td>
<td><input name="pages" size="40"></td>
</tr>
<tr valign="top">
<td>Size:</td>
<td><input name="size" size="40"></td>
</tr>
<tr valign="top">
<td>Notes:</td>
<td><textarea name="notes" cols="30" rows="6"></textarea></td>
</tr>
<tr valign="top">
<td colspan="2" align="center"><input type="submit" name="newgroup"
value="Add New Item to New Group"></td>
</tr>
</table>
</form>
</center>
<!-- TMPL_INCLUDE NAME="cat-top.inc" -->
<div id="mainbloc">
<h1 class="catalogue"><!-- TMPL_VAR NAME="TITLE" --></h1>
<div id="bloc25">
<p>
<!-- TMPL_IF NAME="NOBARCODE" -->
<p class="problem">You must give the item a barcode</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="NOBIBLIOITEM" -->
<p class="problem">You must create a new group for your item to be added to</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="BARCODEINUSE" -->
<p class="problem">Sorry, that barcode is already in use</p>
<!-- /TMPL_IF -->
<h2 class="catalogue">BIBLIO RECORD <!-- TMPL_VAR NAME="BIBNUM" --></h2>
<p><label class="label100">Author:</label> <!-- TMPL_VAR NAME="AUTHOR" --></p>
<p><label class="label100">Copyright:</label> <!-- TMPL_VAR NAME="COPYRIGHT" --></p>
<p><label class="label100">Series Title:</label> <!-- TMPL_VAR NAME="SERIES" --></p>
<p><label class="label100">Notes:</label> <!-- TMPL_VAR NAME="NOTES" --></p>
<!-- TMPL_LOOP NAME="BIBITEMS" -->
<!-- TMPL_IF NAME="WEB" -->
<h2 class="catalogue"><!-- TMPL_VAR NAME="biblioitemnumber" --> GROUP - <!-- TMPL_VAR NAME="itemtype" --></h2>
<p><label>URL:</label><!-- TMPL_VAR NAME="url" --></p>
<p><label>Date:</label> <!-- TMPL_VAR NAME="publicationyear" --></p>
<p><label>Notes:</label> <!-- TMPL_VAR NAME="notes" --></p>
<!-- TMPL_ELSE -->
<h2 class="catalogue"><!-- TMPL_VAR NAME="biblioitemnumber" --> GROUP - <!-- TMPL_VAR NAME="itemtype" --></h2>
<p><label>ISBN:</label> <!-- TMPL_VAR NAME="isbn" --></p>
<p><label>Dewey:</label> <!-- TMPL_VAR NAME="dewey" --></p>
<p><label>Publisher:</label> <!-- TMPL_VAR NAME="publishercode" --></p>
<p><label>Place:</label> <!-- TMPL_VAR NAME="place" --></p>
<p><label>Date:</label> <!-- TMPL_VAR NAME="publicationyear" --></p>
<!-- TMPL_LOOP NAME="ITEMS -->
<p><label class="label100">Item:</label> <!-- TMPL_VAR NAME="barcode" --></p>
<p><label class="label100">Home Branch:</label> <!-- TMPL_VAR NAME="homebranch" --></p>
<p><label class="label100">Notes:</label> <!-- TMPL_VAR NAME="itemnotes" --></p>
<!-- /TMPL_LOOP -->
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</div>
<div id="bloc25">
<form action="saveitem.pl" method="post">
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="BIBNUM" -->">
<h2 class="catalogue">ADD NEW ITEM:</h2>
<p><i>For a website add the group only</i></p>
<p><label>Item Barcode:</label><input type="text" name="barcode" size="40"></p>
<p>
<label>Branch:</label>
<select name="homebranch">
<!-- TMPL_LOOP NAME="BRANCHES" -->
<option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
<!-- /TMPL_LOOP -->
</select>
</p>
<p><label>Replacement Price:</label><input type="text" name="replacementprice" size="40"></p>
<p><label>Notes:</label><textarea name="itemnotes" cols="30" rows="6"></textarea></p>
</div>
<div id="bloc25">
<h2 class="catalogue">Add to existing group:</h2>
<p>
<label>Group:</label><select name="biblioitemnumber">
<!-- TMPL_LOOP NAME="BIBITEMS" -->
<!-- TMPL_IF NAME="WEB" -->
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="biblioitemnumber" -->"><!-- TMPL_VAR NAME="itemtype" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</p>
<p><input type="submit" name="existinggroup" value="Add New Item to Existing Group"></p>
</div>
<div id="bloc25">
<h2 class="catalogue">OR Add to a new Group:</h2>
<p>
<label>Format:</label>
<select name="itemtype">
<!-- TMPL_LOOP NAME="ITEMTYPES" -->
<option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
<!-- /TMPL_LOOP -->
</select>
</p>
<p><label>ISBN:</label><input name="isbn" size="40"></p>
<p><label>Publisher:</label><input name="publishercode" size="40"></p>
<p><label>Publication Year:</label><input name="publicationyear" size="40"></p>
<p><label>Place of Publication:</label><input name="place" size="40"></p>
<p><label>Illustrator:</label><input name="illus" size="40"></p>
<p><label>Website URL:</label><input name="url" size="40"></p>
<p><label>Dewey:</label><input name="dewey" size="40"></p>
<p><label>Dewey Subclass:</label><input name="subclass" size="40"></p>
<p><label>ISSN:</label><input name="issn" size="40"></p>
<p><label>LCCN:</label><input name="lccn" size="40"></p>
<p><label>Volume:</label><input name="volume" size="40"></p>
<p><label>Number:</label><input name="number" size="40"></p>
<p><label>Volume Description:</label><input name="volumeddesc" size="40"></p>
<p><label>Pages:</label><input name="pages" size="40"></p>
<p><label>Size:</label><input name="size" size="40"></p>
<p><label>Notes:</label><textarea name="notes" cols="30" rows="6"></textarea></p>
<p><input type="submit" name="newgroup" value="Add New Item to New Group" class="button catalogue"></p>
</form>
</div>
</div>
<!-- TMPL_INCLUDE NAME="acquisitions-bottom.inc" -->

24
loadmodules.pl

@ -68,19 +68,19 @@ sub catalogue_search {
my $keyword=$input->param('keyword');
my $query = new CGI;
my $type = $query->param('type');
if ($keyword) {
if ($marc_p) {
# if ($keyword) {
# if ($marc_p) {
# print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type");
# } else {
# print $input ->redirect("/cgi-bin/koha/search.pl?keyword=$keyword");
# }
# } else {
# if ($marc_p) {
print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type");
} else {
print $input ->redirect("/cgi-bin/koha/search.pl?keyword=$keyword");
}
} else {
if ($marc_p) {
print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type");
} else {
print $input ->redirect("/cgi-bin/koha/catalogue-home.pl");
}
}
# } else {
# print $input ->redirect("/cgi-bin/koha/catalogue-home.pl");
# }
# }
}
sub somethingelse {

1
search.marc/search.pl

@ -194,6 +194,7 @@ if ($op eq "do_search") {
from=>$from,
to=>$to,
numbers=>\@numbers,
MARC_ON => C4::Context->preferences("MARC"),
);
} elsif ($op eq "AddStatement") {

Loading…
Cancel
Save