my $index = $query->param('index');
my $tagid = $query->param('tagid');
my $resultstring = $query->param('result');
+my $relationship = $query->param('relationship');
my $dbh = C4::Context->dbh;
my $startfrom = $query->param('startfrom');
authtypecode => $authtypecode,
);
+$template->{VARS}->{source} = $query->param('source') || '';
+$template->{VARS}->{relationship} = $query->param('relationship') || '';
+
# Print the page
output_html_with_http_headers $query, $cookie, $template->output;
my $authid = $query->param('authid');
my $index = $query->param('index');
my $tagid = $query->param('tagid');
+my $relationship = $query->param('relationship');
my $authtypecode = &GetAuthTypeCode($authid);
my $tagslib = &GetTagsLabels( 1, $authtypecode );
my $letter = $_ || '@';
push( @subfield_loop, {marc_subfield => $letter, marc_values => $subfields{$_}} );
}
+
+ push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship );
}
else {
# authid is empty => the user want to empty the entry.
+[% PROCESS 'form-blocks.inc' %]
<script type="text/javascript">
//<![CDATA[
<form name="f" method="get" action="auth_finder.pl">
+ <input type="hidden" name="source" value="[% source %]" />
<input type="hidden" name="op" value="do_search" />
<input type="hidden" name="type" value="intranet" />
<input type="hidden" name="index" value="[% index %]" />
- <fieldset class="rows"><ol><li>
+ <fieldset class="rows"><legend>Search options</legend>
+ <ol><li>
<span class="label">Authority type</span>
[% authtypecode %]
<input type="hidden" name="authtypecode" value="[% authtypecode %]" />
<option value="HeadingDsc">Heading descendant</option>
</select>
</li></ol></fieldset>
- <fieldset class="action"> <input type="submit" value="Start search" class="submit" id="search" /> <a id="cancel" class="cancel close" href="#">Cancel</a>
- <span id="authfinderops">
- <a href="javascript:finderjumpfull('blinddetail-biblio-search.pl?authid=0&index=[% index %]')" id="clear" class="button">Clear field</a>
- <a href="javascript:finderjumpfull('authorities.pl?index=[% index %]&authtypecode=[% authtypecode %]')" id="createnew" class="button">Create new</a>
- </span>
- </fieldset>
+ [% IF source == 'auth' %]
+ <fieldset class="rows"><legend>Relationship information</legend>
+ <ol>
+ <li>
+ <label for="relationship">Special relationship: </label>
+ <select name="relationship" id="relationship">
+ [% selected=relationship %]
+ [% PROCESS selectoption value='' text='None specified' %]
+ [% PROCESS selectoption value='a' text='a - Earlier heading' %]
+ [% PROCESS selectoption value='b' text='b - Later heading' %]
+ [% PROCESS selectoption value='d' text='d - Acronym' %]
+ [% PROCESS selectoption value='f' text='f - Musical composition' %]
+ [% PROCESS selectoption value='g' text='g - Broader term' %]
+ [% PROCESS selectoption value='h' text='h - Narrower term' %]
+ [% PROCESS selectoption value='i' text='i - Reference instruction phrase in subfield $i' %]
+ [% PROCESS selectoption value='n' text='n - Not applicable' %]
+ [% PROCESS selectoption value='r' text='r - Relationship designation in $i or $4' %]
+ [% PROCESS selectoption value='t' text='t - Immediate parent body' %]
+ </select>
+ </li>
+ </ol>
+ </fieldset>
+ [% END %]
+ <fieldset class="action"> <input type="submit" value="Start search" class="submit" id="search" /> <a id="cancel" class="cancel close" href="#">Cancel</a>
+ <span id="authfinderops">
+ <a href="javascript:finderjumpfull('blinddetail-biblio-search.pl?authid=0&index=[% index %]')" id="clear" class="button">Clear field</a>
+ <a href="javascript:finderjumpfull('authorities.pl?index=[% index %]&authtypecode=[% authtypecode %]')" id="createnew" class="button">Create new</a>
+ </span>
+ </fieldset>
</form>
--- /dev/null
+[% BLOCK selectoption %]
+ [% IF value == selected %]<option value='[% value %]' selected='selected'>[% text %]</option>
+ [% ELSE %]<option value='[% value %]'>[% text %]</option>
+ [% END %]
+[% END %]
}
}
}
- newin=window.open("../authorities/auth_finder.pl?authtypecode="+ authtype+ "&index="+tagsubfieldid+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes');
+ newin=window.open("../authorities/auth_finder.pl?source=auth&authtypecode="+ authtype+ "&index="+tagsubfieldid+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes');
}
function AddField(field,cntrepeatfield) {
{
window.open(page,'','fullscreen,scrollbars');
}
+
+function doauth(authid, index, repet)
+{
+[% IF source == 'auth' %]
+ var e = document.getElementById("relationship");
+ var relationship = e.options[e.selectedIndex].value;
+
+ jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet + '&relationship=' + relationship);
+[% ELSE %]
+ jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet);
+[% END %]
+}
</script>
</head>
<body id="auth_searchresultlist_auth" class="auth">
<td>
[% IF resul.repets %]
[% FOREACH repet IN resul.repets %]
- <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=[% resul.authid %]&index=[% repet.index %]&s;repet=[% repet.repet %]')" title="[% repet.value %]">[% repet.repet %]</a>
+ <a href="javascript:doauth('[% resul.authid %]', '[% repet.index %]', '[% repet.repet %]')" title="[% repet.value %]">[% repet.repet %]</a>
[% END %]
[% ELSE %]
- <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=[% resul.authid %]&index=[% index %]')">Choose</a>
+ <a href="javascript:doauth('[% resul.authid %]', '[% index %]', '')">choose</a>
[% END %]
</td>
<td><a href="authorities.pl?authid=[% resul.authid %]">Edit authority</a></td>