Dictionary feature implemented
This commit is contained in:
parent
64cd740d2b
commit
a71a6a78ad
2 changed files with 32 additions and 40 deletions
|
@ -46,26 +46,28 @@ a.catalogue:hover {
|
|||
<input type="text" name="search" value="<!-- TMPL_VAR Name="search" -->" size="35">
|
||||
<input type="submit" value="Start search" class="button catalogue">
|
||||
<input type="hidden" name="type" value="<!-- TMPL_VAR Name="type" -->">
|
||||
<input type="hidden" name="index" value="<!-- TMPL_VAR Name="anindex" ESCAPE="URL" -->">
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- TMPL_IF Name=search -->
|
||||
<div class="bloc100">
|
||||
<h2 class="catalogue">Dictionary Search results</h2>
|
||||
<!-- TMPL_IF NAME="authresult" -->
|
||||
<div id="resultnumber">
|
||||
<p><!-- TMPL_IF NAME="displayprev" -->
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search"><<Previous</a>
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search&index=<!-- TMPL_VAR Name="anindex" -->"><<Previous</a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_LOOP NAME="numbers" -->
|
||||
<!-- TMPL_IF NAME="highlight" -->
|
||||
<span class="highlight"><!-- TMPL_VAR NAME="number" --></span>
|
||||
<!-- TMPL_ELSE -->
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search"><!-- TMPL_VAR NAME="number" --></a>
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search&index=<!-- TMPL_VAR Name="anindex" -->"><!-- TMPL_VAR NAME="number" --></a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
<!-- TMPL_IF NAME="displaynext" -->
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&marclist=<!-- TMPL_VAR NAME="marclist" -->&search=<!-- TMPL_VAR NAME="search" -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search">Next>></a>
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&marclist=<!-- TMPL_VAR NAME="marclist" -->&search=<!-- TMPL_VAR NAME="search" -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search&index=<!-- TMPL_VAR Name="anindex" -->">Next>></a>
|
||||
<!-- /TMPL_IF -->
|
||||
</p>
|
||||
<p class="resultcount">
|
||||
|
@ -77,17 +79,20 @@ a.catalogue:hover {
|
|||
<div id="resultlist">
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="2" class="catalogue">Authorities</th>
|
||||
<th colspan="3" class="catalogue">Authorities</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="catalogue">Summary</th>
|
||||
<th class="catalogue">Used</th>
|
||||
<th class="catalogue">Select</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP NAME="authresult" -->
|
||||
<tr>
|
||||
<td><!-- TMPL_VAR NAME="summary" --></td>
|
||||
<td>
|
||||
<a href="../search.marc/search.pl?type=intranet&op=do_search&marclist=<!-- TMPL_VAR NAME="biblio_fields" -->&operator==&value=<!-- TMPL_VAR NAME="authid" -->&and_or=and&excluding=" class="button catalogue"><!-- TMPL_VAR NAME="used" --> biblio(s)
|
||||
<td><img src="/images/arrow.gif" width="32" hspace="0" vspace="0" border="0">
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
|
@ -108,9 +113,8 @@ a.catalogue:hover {
|
|||
<table>
|
||||
<tr>
|
||||
<th class="catalogue">Summary</th>
|
||||
<th class="catalogue">Item Count</th>
|
||||
<th class="catalogue">Location</th>
|
||||
<th class="catalogue"> </th>
|
||||
<th class="catalogue">Biblio Count</th>
|
||||
<th class="catalogue">Select</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP NAME="catresult" -->
|
||||
<tr>
|
||||
|
@ -124,29 +128,7 @@ a.catalogue:hover {
|
|||
<!-- TMPL_VAR NAME="count" -->
|
||||
</td>
|
||||
<td <!-- TMPL_IF NAME="even" -->class="hilighted"<!-- /TMPL_IF -->>
|
||||
<!-- TMPL_LOOP NAME="CN" -->
|
||||
<p>
|
||||
<!-- TMPL_VAR NAME="holdingbranch" -->
|
||||
<!-- TMPL_IF name="date_due" -->
|
||||
On Loan until <!-- TMPL_VAR NAME="date_due" -->
|
||||
<!-- TMPL_ELSE -->
|
||||
<!-- TMPL_IF NAME="itemcallnumber" -->
|
||||
(<!-- TMPL_VAR NAME="itemcallnumber" -->)
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="notforloan" -->
|
||||
<i>(<!-- TMPL_VAR name="notforloan" -->)</i>
|
||||
<!-- /TMPL_IF -->
|
||||
</p>
|
||||
<!-- /TMPL_LOOP -->
|
||||
<!-- TMPL_IF name="onorder" --><p>On order</p><!-- /TMPL_IF -->
|
||||
</td>
|
||||
<td <!-- TMPL_IF NAME="even" -->class="hilighted"<!-- /TMPL_IF -->>
|
||||
<!-- TMPL_UNLESS name="norequests" -->
|
||||
<a class="button catalogue" href="/cgi-bin/koha/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">Request</a>
|
||||
<!-- TMPL_ELSE -->
|
||||
<p>Not Reservable</p>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
<a href="javascript:SelectEntry('<!-- TMPL_VAR NAME="value" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL" -->)" class="button catalogue">Select</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
|
@ -154,17 +136,17 @@ a.catalogue:hover {
|
|||
</div>
|
||||
<div id="resultnumber">
|
||||
<p><!-- TMPL_IF NAME="displayprev" -->
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search"><<Previous</a>
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search&index=<!-- TMPL_VAR Name="anindex" -->"><<Previous</a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_LOOP NAME="numbers" -->
|
||||
<!-- TMPL_IF NAME="highlight" -->
|
||||
<span class="highlight"><!-- TMPL_VAR NAME="number" --></span>
|
||||
<!-- TMPL_ELSE -->
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search"><!-- TMPL_VAR NAME="number" --></a>
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search&index=<!-- TMPL_VAR Name="anindex" -->"><!-- TMPL_VAR NAME="number" --></a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
<!-- TMPL_IF NAME="displaynext" -->
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&marclist=<!-- TMPL_VAR NAME="marclist" -->&search=<!-- TMPL_VAR NAME="search" -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search">Next>></a>
|
||||
<a class="resultnumber" href="dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&marclist=<!-- TMPL_VAR NAME="marclist" -->&search=<!-- TMPL_VAR NAME="search" -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search&index=<!-- TMPL_VAR Name="anindex" -->">Next>></a>
|
||||
<!-- /TMPL_IF -->
|
||||
</p>
|
||||
<p class="resultcount">
|
||||
|
@ -173,10 +155,18 @@ a.catalogue:hover {
|
|||
<!-- /TMPL_IF -->
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
function SelectEntry(myentry, myindex){
|
||||
if (opener.document.f.value[myindex].value!=""){
|
||||
opener.document.f.value[myindex].value=opener.document.f.value[myindex].value+" "+myentry
|
||||
} else {
|
||||
opener.document.f.value[myindex].value=myentry
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -38,7 +38,9 @@ my ($tablename, $kohafield)=split /./,$field;
|
|||
$tablename="biblio" unless ($tablename);
|
||||
#my $kohafield = $input->param('kohafield');
|
||||
my @search = $input->param('search');
|
||||
#warn " ".$search[0];
|
||||
warn " ".$search[0];
|
||||
my $index = $input->param('index');
|
||||
warn " index: ".$index;
|
||||
my $op=$input->param('op');
|
||||
if (($search[0]) and not ($op eq 'do_search')){
|
||||
$op='do_search';
|
||||
|
@ -191,6 +193,7 @@ if ($op eq "do_search") {
|
|||
} else {
|
||||
$to = (($startfrom+1)*$resultsperpage);
|
||||
}
|
||||
$template->param(anindex => $input->param('index'));
|
||||
$template->param(result => \@results,
|
||||
catresult=> \@catresults,
|
||||
search => $search[0],
|
||||
|
@ -219,15 +222,14 @@ if ($op eq "do_search") {
|
|||
authnotrequired => 0,
|
||||
flagsrequired => {catalogue => 1},
|
||||
debug => 1,
|
||||
search => $search[0],
|
||||
marclist =>$field,
|
||||
});
|
||||
#warn "type : $type";
|
||||
|
||||
}
|
||||
$template->param(search => $search[0],
|
||||
marclist =>$field,
|
||||
type=>$type);
|
||||
type=>$type,
|
||||
anindex => $input->param('index'));
|
||||
|
||||
# Print the page
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
|
|
Loading…
Reference in a new issue