SetVersion($DBversion);
}
+$DBversion ="3.11.00.XXX";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACPopupAuthorsSearch','0','Display the list of authors when clicking on one author.','','YesNo');");
+ print "Upgrade to $DBversion done (Bug 5888 - Subject search pop-up for the OPAC)\n";
+ SetVersion($DBversion);
+}
+
+
=head1 FUNCTIONS
=head2 TableExists($table)
//]]>
</script>
+[% IF OPACPopupAuthorsSearch %]
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
- function showAuthors(element, authornumber){
+ function showAuthors(element){
+ var authornumber = $(element).attr("data-count");
// Hide subjects menu if displayed
hideMenu(".subjectSearch");
$("#validSubjectSearch").removeAttr("href");
}
}
+ $(document).ready(function() {
+ $("a.showauthors").click(function(){
+ showAuthors(this);
+ return false;
+ });
+ });
+
//]]>
</script>
+[% END %]
<style type="text/css">
.branch-info-tooltip {
[% IF ( MARCAUTHORS ) %]
<span class="results_summary"><span class="label">Additional authors:</span>
+ [% IF OPACPopupAuthorsSearch %]
<div class="authorSearch" id="authorSearch">
<span><b>Select the item(s) to search :</b></span>
<br />
|
<a id="validAuthorSearch">Search</a>
</div>
+ [% END %]
[% FOREACH MARCAUTHOR IN MARCAUTHORS %]
[% authorsloop = loop %]
[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
[% MARCAUTHOR_SUBFIELDS_LOO.separator %]
<a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]"
- onclick="showAuthors(this, [% authorsloop.count %]); return false;"
+ class="showauthors" data-count="[% authorsloop.count %]"
href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>
[% END %]
[% IF (MARCAUTHOR.authoritylink) %]
[% IF ( MARCSUBJCTS ) %]
<span class="results_summary">
<span class="label">Subject(s):</span>
+ [% IF OPACPopupAuthorsSearch %]
<div class="subjectSearch" >
<span><b>Select the item(s) to search :</b></span>
<div id="subjectsList">
|
<a id="validSubjectSearch">Search</a>
</div>
+ [% END %]
[% FOREACH MARCSUBJCT IN MARCSUBJCTS %]
[% subjectsloop = loop %]
[% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %]
$template->{VARS}->{IDreamBooksReviews} = C4::Context->preference('IDreamBooksReviews');
$template->{VARS}->{IDreamBooksReadometer} = C4::Context->preference('IDreamBooksReadometer');
$template->{VARS}->{IDreamBooksResults} = C4::Context->preference('IDreamBooksResults');
+$template->{VARS}->{OPACPopupAuthorsSearch} = C4::Context->preference('OPACPopupAuthorsSearch');
if (C4::Context->preference('OpacHighlightedWords')) {
$template->{VARS}->{query_desc} = $query->param('query_desc');