[Koha-cvs] koha koha-tmpl/opac-tmpl/prog/en/opac-basket.tm... [rel_3_0]
Antoine Farnault
antoine at koha-fr.org
Fri Dec 15 18:41:48 CET 2006
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: Antoine Farnault <toins> 06/12/15 17:41:48
Modified files:
koha-tmpl/opac-tmpl/prog/en: opac-basket.tmpl
opac : opac-basket.pl
Log message:
- adding MarcNote, MarcSubject, MarcAuthors to the verbose view.
- reindenting the template.
- fix some bugs.
/!\ Be careful HTML::Template::Pro is CASE SENSITIVE !
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/prog/en/opac-basket.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.4&r2=1.1.2.5
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-basket.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.8.2.3&r2=1.8.2.4
Patches:
Index: koha-tmpl/opac-tmpl/prog/en/opac-basket.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/opac-tmpl/prog/en/opac-basket.tmpl,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -b -r1.1.2.4 -r1.1.2.5
--- koha-tmpl/opac-tmpl/prog/en/opac-basket.tmpl 7 Dec 2006 16:49:51 -0000 1.1.2.4
+++ koha-tmpl/opac-tmpl/prog/en/opac-basket.tmpl 15 Dec 2006 17:41:48 -0000 1.1.2.5
@@ -15,9 +15,9 @@
<!-- TMPL_ELSE -->
<a href="opac-basket.pl" onclick="showMore(); return false;">More Details</a>
<!-- /TMPL_IF -->
- <a href="opac-basket.pl" onclick="delSelRecords(); return false;">Remove Selected Items</a>
<a href="opac-basket.pl" onclick="sendBasket(); return false;">Send</a>
<a href="opac-basket.pl" onclick="printBasket(); return false;">Print</a>
+ <a href="opac-basket.pl" onclick="delSelRecords(); return false;">Remove Selected Items</a>
<a href="opac-basket.pl" onclick="delBasket(); return false;">Empty and Close</a>
<a href="opac-basket.pl" onclick="quit(); return false;">Hide Window</a>
<!-- /TMPL_UNLESS -->
@@ -27,32 +27,135 @@
<!-- TMPL_IF NAME="verbose" -->
<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-<h3><!-- TMPL_VAR NAME="title" --><!-- TMPL_IF name="subtitle" --> <!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_IF --></h3>
+<h3>
+ <!-- TMPL_VAR NAME="title" --><!-- TMPL_IF name="subtitle" --> <!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_IF -->
+</h3>
<table>
- <!-- TMPL_UNLESS NAME="print_basket" --><tr><td colspan="2"><form><label for="bib<!-- TMPL_VAR NAME="biblionumber" -->"><input type="checkbox" value="<!-- TMPL_VAR NAME="biblionumber" -->" name="bib<!-- TMPL_VAR NAME="biblionumber" -->" id="bib<!-- TMPL_VAR NAME="biblionumber" -->" onclick="selRecord(value,checked)"> Select this Item</label></form></td></tr><!-- /TMPL_UNLESS -->
+ <!-- TMPL_UNLESS NAME="print_basket" -->
+ <tr>
+ <td colspan="2">
+ <form>
+ <label for="bib<!-- TMPL_VAR NAME="biblionumber" -->">Select this Item</label>
+ <input type="checkbox"
+ value="<!-- TMPL_VAR NAME="biblionumber" -->"
+ name="bib<!-- TMPL_VAR NAME="biblionumber" -->"
+ id="bib<!-- TMPL_VAR NAME="biblionumber" -->"
+ onclick="selRecord(value,checked)" />
+ </form>
+ </td>
+ </tr>
+ <!-- /TMPL_UNLESS -->
+
+ <!-- TMPL_IF name="isbn" -->
+ <tr>
+ <th scope="row">ISBN:</th>
+ <td><!-- TMPL_VAR NAME="isbn" --></td>
+ </tr>
+ <!-- /TMPL_IF -->
- <!-- TMPL_IF name="isbn" --><tr><th scope="row">ISBN:</th><td><!-- TMPL_VAR NAME="ISBN" --></td></tr><!-- /TMPL_IF -->
+ <!-- TMPL_IF name="MARCAUTHORS" -->
+ <tr>
+ <td scope="row">Subjects: </td>
+ <td>
+ <!-- TMPL_LOOP NAME="MARCAUTHORS" -->
+ <a href="/cgi-bin/koha/opac-search.pl?q=au:<!-- TMPL_VAR NAME="value" -->">
+ <!-- TMPL_VAR NAME="value" -->
+ </a>
+ <!-- /TMPL_LOOP -->
+ </td>
+ </tr>
+ <!-- /TMPL_IF -->
- <!-- TMPL_IF name="author" --><tr><th scope="row">Author:</th><td> <!-- TMPL_VAR NAME="author" --></td></tr><!-- /TMPL_IF -->
- <!-- TMPL_IF name="additional" --><tr><th scope="row">Additional authors:</th><td><!-- TMPL_VAR NAME="additional" --></td></tr><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="publishercode" -->
- <tr><th scope="row">Publisher:</th><td><!-- TMPL_VAR NAME="place" --> <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_VAR NAME="publicationyear" --></td></tr>
+ <tr>
+ <th scope="row">Publisher:</th>
+ <td><!-- TMPL_VAR NAME="place" --> <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_VAR NAME="publicationyear" -->
+ </td>
+ </tr>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="pages" -->
- <tr><th scope="row">Details: </th><td><!-- TMPL_VAR NAME="pages" --> <!-- TMPL_VAR NAME="illus" --> <!-- TMPL_VAR NAME="size" --></td></tr>
+ <tr>
+ <th scope="row">Details: </th>
+ <td><!-- TMPL_VAR NAME="pages" --> <!-- TMPL_VAR NAME="illus" --> <!-- TMPL_VAR NAME="size" --></td>
+ </tr>
<!-- /TMPL_IF -->
- <!-- TMPL_IF name="collection" --><tr><th scope="row">Collection:</th><td> <!-- TMPL_VAR NAME="seriestitle" --></td></tr><!-- /TMPL_IF -->
- <!-- TMPL_IF name="subject" --><tr><th scope="row">Subject:</th><td> <!-- TMPL_VAR NAME="subject" --></td></tr><!-- /TMPL_IF -->
- <!-- TMPL_IF name="copyrightdate" --><tr><th scope="row">Copyright:</th><td> <!-- TMPL_VAR NAME="copyrightdate" --></td></tr><!-- /TMPL_IF -->
- <!-- TMPL_IF name="notes" --><tr><th scope="row">Notes:</th><td> <!-- TMPL_VAR NAME="notes" --></td></tr><!-- /TMPL_IF -->
- <!-- TMPL_IF name="unititle" --><tr><th scope="row">Unified title:</th><td> <!-- TMPL_VAR NAME="unititle" --></td></tr><!-- /TMPL_IF -->
- <!-- TMPL_IF name="serial" --><tr><th scope="row">Serial:</th><td><!-- TMPL_VAR NAME="serial" --></td></tr><!-- /TMPL_IF -->
- <!-- TMPL_IF name="dewey" --><tr><th scope="row">Dewey:</th><td><!-- TMPL_VAR name="dewey" --></td></tr><!-- /TMPL_IF -->
- <!-- TMPL_IF name="classification" --><tr><th scope="row">Call Number:</th><td> <!-- TMPL_VAR name="classification" --></td></tr><!-- /TMPL_IF -->
- <!-- TMPL_IF name="lccn" --><tr><th scope="row">LCCN:</th><td> <!-- TMPL_VAR name="lccn" --></td></tr><!-- /TMPL_IF -->
- <!-- TMPL_IF name="url" --><tr><th scope="row">URL:</th><td> <!-- TMPL_VAR NAME="url" --></td></tr><!-- /TMPL_IF -->
- </table>
- <table><tr>
+ <!-- TMPL_IF name="collection" -->
+ <tr>
+ <th scope="row">Collection:</th>
+ <td> <!-- TMPL_VAR NAME="seriestitle" --></td>
+ </tr>
+ <!-- /TMPL_IF -->
+
+ <!-- TMPL_IF name="MARCSUBJCTS" -->
+ <tr>
+ <td scope="row">Subjects: </td>
+ <td>
+ <!-- TMPL_LOOP NAME="MARCSUBJCTS" -->
+ <a href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_VAR NAME="link" ESCAPE="URL"-->">
+ <!-- TMPL_VAR NAME="label" -->
+ </a>
+
+ <!-- /TMPL_LOOP -->
+ </td>
+ </tr>
+ <!-- /TMPL_IF -->
+
+ <!-- TMPL_IF name="copyrightdate" -->
+ <tr><th scope="row">Copyright:</th>
+ <td> <!-- TMPL_VAR NAME="copyrightdate" --></td>
+ </tr>
+ <!-- /TMPL_IF -->
+
+ <!-- TMPL_IF name="MARCNOTES" -->
+ <tr>
+ <td scope="row">Notes: </td>
+ <td>
+ <!-- TMPL_LOOP NAME="MARCNOTES" -->
+ - <!-- TMPL_VAR NAME="marcnote" -->
+ <!-- /TMPL_LOOP -->
+ </td>
+ </tr>
+ <!-- /TMPL_IF -->
+
+ <!-- TMPL_IF name="unititle" -->
+ <tr>
+ <th scope="row">Unified title:</th>
+ <td> <!-- TMPL_VAR NAME="unititle" --></td>
+ </tr>
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="serial" -->
+ <tr>
+ <th scope="row">Serial:</th>
+ <td><!-- TMPL_VAR NAME="serial" --></td>
+ </tr>
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="dewey" -->
+ <tr>
+ <th scope="row">Dewey:</th>
+ <td><!-- TMPL_VAR name="dewey" --></td>
+ </tr>
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="classification" -->
+ <tr>
+ <th scope="row">Call Number:</th>
+ <td> <!-- TMPL_VAR name="classification" --></td>
+ </tr>
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="lccn" -->
+ <tr>
+ <th scope="row">LCCN:</th>
+ <td> <!-- TMPL_VAR name="lccn" --></td>
+ </tr>
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="url" -->
+ <tr>
+ <th scope="row">URL:</th>
+ <td> <!-- TMPL_VAR NAME="url" --></td>
+ </tr><!-- /TMPL_IF -->
+</table>
+ <!-- TMPL_IF NAME="ITEM_RESULTS" -->
+ <table>
+ <tr>
<th>Location: </th>
<th>Barcode: </th>
</tr>
@@ -64,27 +167,65 @@
(<!-- TMPL_VAR NAME="itemcallnumber" -->)
<!-- /TMPL_IF -->
</td>
- <td><!-- TMPL_VAR NAME="barcode" --></td>
+ <td>
+ <!-- TMPL_VAR NAME="barcode" -->
+ </td>
</tr>
- <!-- /TMPL_LOOP --></table>
- <br>
+ <!-- /TMPL_LOOP -->
+ </table>
+ <!-- /TMPL_IF -->
+<br>
<!-- /TMPL_LOOP -->
+
<!-- TMPL_ELSE -->
-<table><!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
+<table>
+ <!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
<!-- BIBLIO RECORD TABLE -->
-<!-- TMPL_IF NAME="even" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-<td><form><!-- TMPL_UNLESS NAME="print_basket" --><label for="bib<!-- TMPL_VAR NAME="biblionumber" -->"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" /></label><br><input type="checkbox" value="<!-- TMPL_VAR NAME="biblionumber" -->" name="bib<!-- TMPL_VAR NAME="biblionumber" -->" id="bib<!-- TMPL_VAR NAME="biblionumber" -->" onclick="selRecord(value,checked);"><!-- /TMPL_UNLESS --></form></td><td><p><a href="#" onclick="openBiblio('<!-- TMPL_VAR name="dest" -->',<!-- TMPL_VAR name="biblionumber" -->)"><!-- TMPL_VAR NAME="title" --></a> <!-- TMPL_VAR NAME="author" -->
+<!-- TMPL_IF NAME="even" -->
+<tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+ <td>
+ <form>
+ <!-- TMPL_UNLESS NAME="print_basket" -->
+ <label for="bib<!-- TMPL_VAR NAME="biblionumber" -->">
+ <img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" />
+ </label>
+ <br />
+ <input type="checkbox"
+ value="<!-- TMPL_VAR NAME="biblionumber" -->"
+ name="bib<!-- TMPL_VAR NAME="biblionumber" -->"
+ id="bib<!-- TMPL_VAR NAME="biblionumber" -->"
+ onclick="selRecord(value,checked);">
+ <!-- /TMPL_UNLESS -->
+ </form>
+ </td>
+ <td>
+ <p>
+ <a href="#" onclick="openBiblio('<!-- TMPL_VAR name="dest" -->',<!-- TMPL_VAR name="biblionumber" -->)">
+ <!-- TMPL_VAR NAME="title" -->
+ </a>
+ <!-- TMPL_VAR NAME="author" -->
<!-- TMPL_IF name="publishercode" -->- <!-- TMPL_VAR name="publishercode" -->
<!-- TMPL_IF name="place" --> <!-- TMPL_VAR name="place" --><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF name="pages" --> - <!-- TMPL_VAR name="pages" --><!-- TMPL_IF name="size" --> <!-- TMPL_VAR name="size" --><!-- /TMPL_IF --><!-- /TMPL_IF -->
- <!-- TMPL_IF name="notes" --><p><!-- TMPL_VAR name="notes" --></p><!-- /TMPL_IF -->
- </p></td><td><!-- TMPL_VAR NAME="classification" --></td></tr>
+ <!-- TMPL_IF name="pages" --> - <!-- TMPL_VAR name="pages" --><!-- TMPL_IF name="size" --> <!-- TMPL_VAR name="size" -->
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="notes" -->
+ <p><!-- TMPL_VAR name="notes" --></p>
+ <!-- /TMPL_IF -->
+ </td>
+ <td>
+ <a href="javascript:Dopop('/cgi-bin/koha/opac-addbookbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->')">Add to a shelf</a>
+ </td>
+ <td><!-- TMPL_VAR NAME="classification" --></td>
+</tr>
<!-- /TMPL_LOOP -->
</table>
<!-- /TMPL_IF -->
+
<!-- TMPL_UNLESS NAME="print_basket" -->
-<form name="myform"><input type="hidden" name="records"></form>
+<form name="myform">
+ <input type="hidden" name="records">
+</form>
<!-- /TMPL_UNLESS -->
<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
-
Index: opac/opac-basket.pl
===================================================================
RCS file: /sources/koha/koha/opac/opac-basket.pl,v
retrieving revision 1.8.2.3
retrieving revision 1.8.2.4
diff -u -b -r1.8.2.3 -r1.8.2.4
--- opac/opac-basket.pl 7 Dec 2006 15:42:15 -0000 1.8.2.3
+++ opac/opac-basket.pl 15 Dec 2006 17:41:48 -0000 1.8.2.4
@@ -15,7 +15,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: opac-basket.pl,v 1.8.2.3 2006/12/07 15:42:15 toins Exp $
+# $Id: opac-basket.pl,v 1.8.2.4 2006/12/15 17:41:48 toins Exp $
use strict;
require Exporter;
@@ -47,26 +47,28 @@
my @results;
my $num = 1;
+my $marcflavour = C4::Context->preference('marcflavour');
foreach my $biblionumber ( @bibs ) {
$template->param( biblionumber => $biblionumber );
my $dat = &GetBiblioData($biblionumber);
my $record = &GetMarcBiblio($biblionumber);
- my $addauthor =
- &GetMarcAuthors( $record, C4::Context->preference("marcflavour") );
- my $authorcount = scalar @$addauthor;
+ my $marcnotesarray = GetMarcNotes( $record, $marcflavour );
+ my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
+ my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my @items = &GetItemsInfo( undef, $biblionumber, 'opac' );
- $dat->{'additional'} = "";
- foreach (@$addauthor) {
- $dat->{'additional'} .= "|" . $_->{'a'};
- } # for
if ( $num % 2 == 1 ) {
$dat->{'even'} = 1;
}
+
$num++;
- $dat->{'biblionumber'} = $biblionumber;
+ $dat->{biblionumber} = $biblionumber;
$dat->{ITEM_RESULTS} = \@items;
+ $dat->{MARCNOTES} = $marcnotesarray;
+ $dat->{MARCSUBJCTS} = $marcsubjctsarray;
+ $dat->{MARCAUTHORS} = $marcauthorsarray;
+
if ( C4::Context->preference("BiblioDefaultView") eq "normal" ) {
$dat->{dest} = "opac-detail.pl";
}
@@ -83,6 +85,8 @@
# my $itemsarray=\@items;
-$template->param( BIBLIO_RESULTS => $resultsarray, );
+$template->param(
+ BIBLIO_RESULTS => $resultsarray,
+);
output_html_with_http_headers $query, $cookie, $template->output;
More information about the Koha-cvs
mailing list