Adding authority search functionality to OPAC advanced search page, to synch with default template

This commit is contained in:
oleonard 2005-06-09 18:21:40 +00:00
parent b78f396eb1
commit a80ebd6f13
2 changed files with 145 additions and 3 deletions

View File

@ -0,0 +1,142 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Dictionary Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<div id="window">
<h1>Dictionary Search</h1>
<div class="content-block"><form name="f" method="post" action="opac-dictionary.pl">
<input type="hidden" name="op" value="do_search" />
<label for="keyword">Keyword(s): </label>
<input type="hidden" name="marclist" value="<!-- TMPL_VAR Name="marclist" -->" />
<input type="text" name="search" value="<!-- TMPL_VAR Name="search" -->" size="20" />
<input type="submit" value="Start search" class="submit" />
<input type="hidden" name="type" value="<!-- TMPL_VAR Name="type" -->" />
<input type="hidden" name="index" value="<!-- TMPL_VAR Name="anindex" ESCAPE="URL" -->" />
</form></div>
<!-- TMPL_IF Name=search -->
<!-- TMPL_IF NAME="authresult" -->
<div class="pages">
<!-- TMPL_IF NAME="displayprev" -->
<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">&lt;&lt;Previous</a>
<!-- /TMPL_IF -->
<!-- TMPL_LOOP NAME="numbers" -->
<!-- TMPL_IF NAME="highlight" -->
<span class="current"><!-- TMPL_VAR NAME="number" --></span>
<!-- TMPL_ELSE -->
<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->"><!-- TMPL_VAR NAME="number" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
<!-- TMPL_IF NAME="displaynext" -->
<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">Next&gt;&gt;</a>
<!-- /TMPL_IF -->
</div>
<div id="results">
<!-- TMPL_IF NAME="nbresults" -->
Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="nbresults" --> in Authorities.<!-- TMPL_ELSE -->No results found in Authorities.
<!-- /TMPL_IF -->
</div>
<table>
<tr>
<th colspan="3">Authorities</th>
</tr>
<tr>
<th>Summary</th>
<th>Used in</th>
<th>Select</th>
</tr>
<!-- TMPL_LOOP NAME="authresult" -->
<!-- TMPL_IF NAME="even" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
<td>
<!-- TMPL_VAR NAME="summary" -->
</td>
<td>
<!-- TMPL_VAR NAME="used" --> record(s)
</td>
<td>
<a href="javascript:SelectEntry('<!-- TMPL_VAR NAME="mainentry" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL" -->,0)" class="button catalogue">Select</a> |
<a href="javascript:SelectEntry('<!-- TMPL_VAR NAME="mainentry" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL" -->,1)" class="button catalogue">Sel &amp; close</a>
</td>
</tr>
<!-- /TMPL_LOOP -->
</table>
<!-- TMPL_ELSE -->
<h4>No results in Authorities</h4>
<!-- /TMPL_IF -->
<!-- TMPL_IF Name=catresult -->
<h3>Catalog Search Results</h3>
<div id="results">
<!-- TMPL_IF NAME="total" -->
Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --> in the catalog<!-- TMPL_ELSE -->No results found in the catalog.
<!-- /TMPL_IF -->
</div>
<table>
<tr>
<th>Summary</th>
<th>Used in</th>
<th>Select</th>
</tr>
<!-- TMPL_LOOP NAME="catresult" -->
<!-- TMPL_IF NAME="even" --><tr class="highlight"><!-- TMPL_ELSE --><!-- /TMPL_IF -->
<td>
<!-- TMPL_IF name="MARC_ON" -->
<!-- TMPL_VAR NAME="value" -->
<!-- TMPL_ELSE -->
<!-- TMPL_VAR NAME="value" -->
<!-- /TMPL_IF -->
</td>
<td>
<!-- TMPL_VAR NAME="count" --> record(s)
</td>
<td>
<a href="javascript:SelectEntry('<!-- TMPL_VAR NAME="value" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL" -->,0)" class="button catalogue">Select</a> |
<a href="javascript:SelectEntry('<!-- TMPL_VAR NAME="value" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL" -->,1)" class="button catalogue">Sel &amp; close</a>
</td>
</tr>
<!-- /TMPL_LOOP -->
</table>
<div class="pages">
<!-- TMPL_IF NAME="displayprev" -->
<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">&lt;&lt;Previous</a>
<!-- /TMPL_IF -->
<!-- TMPL_LOOP NAME="numbers" -->
<!-- TMPL_IF NAME="highlight" -->
<span class="current"><!-- TMPL_VAR NAME="number" --></span>
<!-- TMPL_ELSE -->
<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->"><!-- TMPL_VAR NAME="number" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
<!-- TMPL_IF NAME="displaynext" -->
<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">Next&gt;&gt;</a>
<!-- /TMPL_IF -->
<div id="results">
<!-- TMPL_IF NAME="total" -->
Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --> in the catalog.<!-- TMPL_ELSE -->No results found in the catalog.
<!-- /TMPL_IF -->
</div>
<!-- /TMPL_IF -->
<script language="JavaScript" type="text/javascript">
function SelectEntry(myentry, myindex, wclose){
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
}
if (wclose == 1) {
// alert("closing")
self.close();
}
}
</script>
<!-- /TMPL_IF -->
</div>
</body>
</html>

View File

@ -50,18 +50,18 @@
<input type="hidden" name="and_or" value="and" />
<input type="hidden" name="excluding" value="" />
<input type="hidden" name="operator" value="contains" />
<input type="text" id="title" name="value" /></td></tr>
<input type="text" id="title" name="value" /><a href="javascript:Dopop('opac-dictionary.pl?marclist=biblio.title&amp;type=intranet&amp;index=1',1)"><strong>...</strong></a></td></tr>
<tr><th><label for="author">Author</label></th><td><input type="hidden" name="marclist" value="biblio.author" />
<input type="hidden" name="and_or" value="and" />
<input type="hidden" name="excluding" value="" />
<input type="hidden" name="operator" value="contains" />
<input type="text" id="author" name="value" /></td></tr>
<input type="text" id="author" name="value" /><a href="javascript:Dopop('opac-dictionary.pl?marclist=biblio.author&amp;type=intranet&amp;index=2',2)"><strong>...</strong></a></td></tr>
<tr><th><label for="subject">Subject</label></th><td>
<input type="hidden" name="marclist" value="bibliosubject.subject" />
<input type="hidden" name="and_or" value="and" />
<input type="hidden" name="excluding" value="" />
<input type="hidden" name="operator" value="contains" />
<input type="text" id="subject" name="value" size="35" /></td></tr>
<input type="text" id="subject" name="value" size="35" /><a href="javascript:Dopop('opac-dictionary.pl?marclist=bibliosubject.subject&amp;type=intranet&amp;index=3',3)"><strong>...</strong></a></td></tr>
<tr><th><label for="seriestitle">Series title</label></th><td>
<input type="hidden" name="marclist" value="biblio.seriestitle" />
<input type="hidden" name="and_or" value="and" />