Bugzilla – Attachment 15230 Details for
Bug 5888
opac-detail subject/author links improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5888: Followup add a syspref (OPACPopupAuthorsSearch)
Bug-5888-Followup-add-a-syspref-OPACPopupAuthorsSe.patch (text/plain), 5.99 KB, created by
Jonathan Druart
on 2013-02-11 11:30:17 UTC
(
hide
)
Description:
Bug 5888: Followup add a syspref (OPACPopupAuthorsSearch)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-02-11 11:30:17 UTC
Size:
5.99 KB
patch
obsolete
>From 70ce331023d8eeb9eb44ad51980c42ad42f5a428 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 11 Feb 2013 12:28:37 +0100 >Subject: [PATCH] Bug 5888: Followup add a syspref (OPACPopupAuthorsSearch) > >New syspref OPACPopupAuthorsSearch. >If it is disabled, the development has no effect. >--- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > .../prog/en/modules/admin/preferences/opac.pref | 7 +++++++ > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 18 ++++++++++++++++-- > opac/opac-detail.pl | 1 + > 4 files changed, 32 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index ed922b8..4cb87b2 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6399,6 +6399,14 @@ if ( CheckVersion($DBversion) ) { > 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 (Add IDreamBooks enhanced content)\n"; >+ SetVersion($DBversion); >+} >+ >+ > > =head1 FUNCTIONS > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 300c6e1..9b698b0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -392,6 +392,13 @@ OPAC: > yes: Enable > no: Disable > - Quote of the Day display on OPAC home page >+ - >+ - pref: OPACPopupAuthorsSearch >+ default: 0 >+ choices: >+ yes: Display >+ no: Don't display >+ - the list of authors in a pop-up for a search. > Policy: > - > - pref: singleBranchMode >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index c807abc..b8f2efc 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -370,9 +370,11 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > //]]> > </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"); > >@@ -462,8 +464,16 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > $("#validSubjectSearch").removeAttr("href"); > } > } >+ $(document).ready(function() { >+ $("a.showauthors").click(function(){ >+ showAuthors(this); >+ return false; >+ }); >+ }); >+ > //]]> > </script> >+[% END %] > > <style type="text/css"> > .branch-info-tooltip { >@@ -530,6 +540,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > > [% 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 /> >@@ -561,12 +572,13 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > | > <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) %] >@@ -629,6 +641,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > [% 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"> >@@ -666,6 +679,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > | > <a id="validSubjectSearch">Search</a> > </div> >+ [% END %] > [% FOREACH MARCSUBJCT IN MARCSUBJCTS %] > [% subjectsloop = loop %] > [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 94edb35..edbf6fe 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -1001,6 +1001,7 @@ if (C4::Context->preference('OPACLocalCoverImages') == 1) { > $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'); >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5888
:
3345
|
9738
|
9855
|
9856
|
11586
|
11592
|
12308
|
12343
|
12344
|
13631
|
13632
|
13973
|
13974
|
14140
|
14141
|
15230
|
15231
|
15341
|
15342
|
15343
|
15344
|
15345
|
15346
|
15347
|
15348