Opac authorities search

This commit is contained in:
kados 2006-03-04 03:19:25 +00:00
parent 76fb64f390
commit 0382f6fbb1
3 changed files with 202 additions and 0 deletions

View File

@ -0,0 +1,68 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryName" --> Catalog -- Advanced Search
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!--TMPL_INCLUDE NAME="masthead_adv.inc" -->
<!--TMPL_INCLUDE NAME="navigation.inc" -->
<div id="main">
<h1>Authority search</h1>
<form name="f" action="/cgi-bin/koha/opac-authorities-home.pl" method="post">
<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" -->">
<div class="details">
<h2>Search on
<select name="authtypecode">
<!-- TMPL_LOOP NAME="authtypesloop" -->
<!-- TMPL_IF name="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="authtypetext" --></option>
<!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="value" -->"> <!-- TMPL_VAR NAME="authtypetext" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</h2>
<p>
<label for="mainentry">Main entry</label>
<input type="hidden" name="marclist" value="mainentry">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<select name="operator">
<option value="contains">contains</option>
<option value="start">start by</option>
</select>
<input type="text" id="mainentry" name="value" value="<!-- TMPL_VAR NAME="value" -->">
</p>
<p>
<label for="anywhere">Anywhere</label>
<input type="hidden" name="marclist" value="">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
<select name="operator">
<option value="contains">contains</option>
<option value="start">start by</option>
</select>
<input type="text" id="anywhere" name="value" value="<!-- TMPL_VAR NAME="value" -->">
</p>
<p>
<input type="submit" value="Start search" class="submit">
</p>
</div>
</form>
<div class="details">
<h2>Add authority</h2>
<form name="f2" method="post" action="authorities.pl">
<p><label for="authtypecode">Authority type</label>
<select name="authtypecode" id="authtypecode">
<!-- TMPL_LOOP name="authtypesloop" -->
<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->>
<!-- TMPL_VAR name="authtypetext" -->
</option>
<!-- /TMPL_LOOP -->
</select>
<input type="submit" value="Add" class="submit">
</p>
</form>
</div>
</div>
<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

View File

@ -0,0 +1,46 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryName" --> Catalog -- Advanced Search
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!--TMPL_INCLUDE NAME="masthead_adv.inc" -->
<!--TMPL_INCLUDE NAME="navigation.inc" -->
<div id="main">
<div class="tabbed">
<h1>Authority #<!-- TMPL_VAR NAME="authid" --> (<!-- TMPL_VAR name="authtypetext" -->)</h1>
<a href="authorities.pl?authid=<!-- TMPL_VAR NAME="authid" -->">Edit</a>
<!-- TMPL_UNLESS name="count" -->
<a href="javascript:confirm_deletion()">Delete</a>
<!-- /TMPL_UNLESS -->
<a href="javascript:Dopop('detailprint.pl?authid=<!-- TMPL_VAR NAME="authid" -->')">Print</a>
<a href="../search.marc/search.pl?type=opac&amp;op=do_search&amp;marclist=<!-- TMPL_VAR NAME="biblio_fields" -->&amp;operator==&amp;value=<!-- TMPL_VAR NAME="authid" -->&amp;and_or=and&amp;excluding="><!-- TMPL_VAR name="count" --> biblios</a>
</div>
<div name="0XX" id="0XX" class="tab" style="visibility:visible">
<!-- TMPL_LOOP NAME="0XX" -->
<p class="MARCtag">
<!-- TMPL_VAR NAME="tag" -->
</p>
<!-- TMPL_LOOP NAME="subfield" -->
<p>
<label class="labelsubfield">
<!-- TMPL_VAR NAME="marc_subfield" -->
<!-- TMPL_VAR NAME="marc_lib" --></label>
<!-- TMPL_VAR NAME="marc_value" -->
</p>
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP -->
</div>
</div>
<script language="JavaScript" type="text/javascript">
function confirm_deletion() {
var is_confirmed = confirm('Are you sure you want to delete this authority?');
if (is_confirmed) {
window.location="authorities-home.pl?op=delete&amp;authid=<!-- TMPL_VAR NAME="authid" -->";
}
}
function Dopop(link) {
newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
}
</script>
</body>
</html>

View File

@ -0,0 +1,88 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryName" --> Catalog -- Authorities Search
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!--TMPL_INCLUDE NAME="masthead_adv.inc" -->
<!--TMPL_INCLUDE NAME="navigation.inc" -->
<div id="main">
<h1>Authority search results</h1>
<div id="pages">
<!-- TMPL_IF name="displayprev" -->
<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
&lt;&lt;
</a>
<!-- /TMPL_IF -->
<!-- TMPL_LOOP NAME="numbers" -->
<!-- TMPL_IF name="highlight" -->
<span class="current"><!-- TMPL_VAR NAME="number" --></span>
<!-- TMPL_ELSE -->
<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&authtypecode=<!-- TMPL_VAR name="authtypecode" -->"><!-- TMPL_VAR NAME="number" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
<!-- TMPL_IF name="displaynext" -->
<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&authtypecode=<!-- TMPL_VAR name="authtypecode" -->">&gt;&gt;</a>
<!-- /TMPL_IF -->
</div>
<div id="results">
<!-- TMPL_IF name="total" -->
&nbsp;<b>Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></b><br><br>
<!-- TMPL_ELSE -->
&nbsp;No results found.<br>
<!-- /TMPL_IF -->
</div>
<div class="searchresults">
<table>
<tr>
<th>Summary</th>
<!-- TMPL_UNLESS name="isEDITORS" -->
<th>Used in</th>
<!-- /TMPL_UNLESS -->
<th>View</th>
<th>Delete</th>
</tr>
<!-- TMPL_LOOP NAME="result" -->
<tr>
<td><!-- TMPL_VAR NAME="summary" --></td>
<!-- TMPL_UNLESS name="isEDITORS" -->
<td>
<a href="/cgi-bin/koha/opac-search.pl?type=opac&amp;op=do_search&amp;marclist=<!-- TMPL_VAR NAME="biblio_fields" -->&amp;operator==&amp;value=<!-- TMPL_VAR NAME="authid" -->&amp;and_or=and&amp;excluding="><!-- TMPL_VAR NAME="used" --> biblio(s)</a>
</td>
<!-- /TMPL_UNLESS -->
<td>
<a href="opac-authoritiesdetail.pl?authid=<!-- TMPL_VAR NAME="authid" -->">View Authority Record: <!-- TMPL_VAR NAME="authid" --></a>
</td>
<td>
<!-- TMPL_UNLESS name="used" -->
<a href="javascript:confirm_deletion(<!-- TMPL_VAR NAME="authid" -->)">Delete</a>
<!-- /TMPL_UNLESS -->
</td>
</tr>
<!-- /TMPL_LOOP -->
</table>
</div>
<div id="resultnumber">
<p>
<!-- TMPL_IF name="displayprev" -->
<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&authtypecode=<!-- TMPL_VAR name="authtypecode" -->">&lt;&lt;</a>
<!-- /TMPL_IF -->
<!-- TMPL_LOOP NAME="numbers" -->
<!-- TMPL_IF name="highlight" --><span class="current"><!-- TMPL_VAR NAME="number" --></span><!-- TMPL_ELSE -->
<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&authtypecode=<!-- TMPL_VAR name="authtypecode" -->"><!-- TMPL_VAR NAME="number" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
<!-- TMPL_IF name="displaynext" -->
<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">&gt;&gt;</a>
<!-- /TMPL_IF -->
</p>
</div>
</div>
<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
<script language="JavaScript" type="text/javascript" >
function confirm_deletion(id) {
var is_confirmed = confirm('Are you sure you want to delete this authority?');
if (is_confirmed) {
window.location="authorities-home.pl?op=delete&amp;authid="+id;
}
}
</script>