Nick Clemens
557a0285ca
This simply adds a row to the config page for configuring a mapping for Control number, without this patch you cannot configure the feild, and the default is 'any' I used the first record here for testing: http://lx2.loc.gov:210/NAF?operation=searchRetrieve&version=1.1&query=query=bath.personalName=%22butler%20octavia%22&maximumRecords=20&recordSchema=marcxml Enter SRU server using settings here: https://www.loc.gov/z3950/lcserver.html#serv host: lx2.loc.gov port: 210 db: NAF userid: password: servername: LOC SRU checked: NULL rank: NULL syntax: USMARC timeout: 0 servertype: sru encoding: utf8 recordtype: authority To test: 1 - Setup SRU server using settings above 2 - In the server config click 'Modify' under 'SRU search fields mapping' 3 - Note you don't have an option for 'Control number' 4 - Go to Authorities 5 - New from Z39.50/SRU 6 - Search 'Control number' field with: PS3552.U827 7 - You get the record noted above as all fields are searched 8 - Search 'Control number' field with: 79056654 9 - You get the record noted above as all fields are searched 10 - Apply patch 11 - In the server config click 'Modify' under 'SRU search fields mapping' 12 - Note you now have a config for 'Control number' 13 - Enter 'bath.lccn' 14 - Save 15 - Repeat search from #6 - no result 16 - Repeat search from #8 - correct result as only lccn fields are search 17 - Modify server config ans set 'Control number' to 'bath.lcCallNumber' 18 - Repeat search from #6 - correct results as call number field is now search 19 - Repeast search from #8 - no result Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
104 lines
4.6 KiB
Text
104 lines
4.6 KiB
Text
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>SRU search fields mapping for authorities › Koha</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="admin_sru_modmapping" class="admin">
|
|
|
|
<div class="main container-fluid">
|
|
|
|
<main>
|
|
<h1>Modify SRU search fields mapping for authorities</h1>
|
|
<form id="form01" method="post">
|
|
<fieldset class="rows">
|
|
<div class="row">
|
|
<div class="col-xs-6">
|
|
<ol>
|
|
<li>
|
|
<label for="srchany">Keyword (any): </label>
|
|
<input id="srchany" type="text" value="[% mapping.srchany | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="nameany">Name (any): </label>
|
|
<input id="nameany" type="text" value="[% mapping.nameany | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="authorany">Author (any): </label>
|
|
<input id="authorany" type="text" value="[% mapping.authorany | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="authorpersonal">Author (personal): </label>
|
|
<input id="authorpersonal" type="text" value="[% mapping.authorpersonal | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="authorcorp">Author (corporate): </label>
|
|
<input id="authorcorp" type="text" value="[% mapping.authorcorp | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="authormeetingcon">Author (meeting/conference): </label>
|
|
<input id="authormeetingcon" type="text" value="[% mapping.authormeetingcon | html %]" />
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<ol>
|
|
<li>
|
|
<label for="controlnumber">Control number: </label>
|
|
<input id="controlnumber" type="text" value="[% mapping.controlnumber | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="subject">Subject heading: </label>
|
|
<input id="subject" type="text" value="[% mapping.subject | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="subjectsubdiv">Subject sub-division: </label>
|
|
<input id="subjectsubdiv" type="text" value="[% mapping.subjectsubdiv | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="title">Title (any): </label>
|
|
<input id="title" type="text" value="[% mapping.title | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="uniformtitle">Title (uniform): </label>
|
|
<input id="uniformtitle" type="text" value="[% mapping.uniformtitle | html %]" />
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="submit" class="btn btn-primary" value="Save" />
|
|
<a class="close cancel" href="#">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
|
|
</main>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
<script>
|
|
$(document).ready(function() {
|
|
$("#form01").submit(function(event) {
|
|
if(window.opener) {
|
|
var newmap=allInputs();
|
|
window.opener.$('#show_sru_fields').val(newmap);
|
|
window.close();
|
|
} else {
|
|
// In this case not called as a popup. Just do nothing.
|
|
event.preventDefault();
|
|
}
|
|
});
|
|
});
|
|
function allInputs () {
|
|
var aInput= new Array();
|
|
$("form :input").each(function() {
|
|
if( this.id && $(this).val() ) {
|
|
aInput.push(this.id+'='+$(this).val());
|
|
}
|
|
});
|
|
return aInput.join(',');
|
|
}
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
|