View | Details | Raw Unified | Return to bug 13271
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-18 / +13 lines)
Lines 154-160 Link Here
154
                                            </ul>
154
                                            </ul>
155
                                        </div>
155
                                        </div>
156
                                        <div class="modal-footer">
156
                                        <div class="modal-footer">
157
                                            <a href="#" class="btn btn-primary">Search</a>
157
                                            <a id="validAuthorSearch" href="#" class="btn btn-primary">Search</a>
158
                                            <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
158
                                            <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
159
                                        </div>
159
                                        </div>
160
                                    </div>
160
                                    </div>
Lines 164-172 Link Here
164
                                    [% authorsloop = loop %]
164
                                    [% authorsloop = loop %]
165
                                    [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
165
                                    [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
166
                                        [% MARCAUTHOR_SUBFIELDS_LOO.separator %]
166
                                        [% MARCAUTHOR_SUBFIELDS_LOO.separator %]
167
                                        <a role="button" data-toggle="modal" title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]"
167
                                        [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %]
168
                                            <a role="button" data-toggle="modal" title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]"
168
                                            class="showauthors" data-count="[% authorsloop.count %]"
169
                                            class="showauthors" data-count="[% authorsloop.count %]"
169
                                            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 %]#authorSearch">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>
170
                                            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 %]#authorSearch">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>
171
                                        [% ELSE %]
172
                                            <a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]"
173
                                            class="showauthors" 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>
174
                                        [% END %]
170
                                    [% END %]
175
                                    [% END %]
171
                                    [% IF (MARCAUTHOR.authoritylink) %]
176
                                    [% IF (MARCAUTHOR.authoritylink) %]
172
                                        <a class='authlink' href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCAUTHOR.authoritylink %]"><img style="vertical-align:middle" height="15" width="15" src="[% interface %]/[% theme %]/images/filefind.png"></a>
177
                                        <a class='authlink' href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCAUTHOR.authoritylink %]"><img style="vertical-align:middle" height="15" width="15" src="[% interface %]/[% theme %]/images/filefind.png"></a>
Lines 281-287 Link Here
281
                                    [% subjectsloop = loop %]
286
                                    [% subjectsloop = loop %]
282
                                    [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %]
287
                                    [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %]
283
                                        [% SUBFIELD.separator %]
288
                                        [% SUBFIELD.separator %]
284
                                        <a role="button" data-toggle="modal" title="$[% SUBFIELD.code %] [% SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]#subjectSearch" onclick="showSubjects(this, [% subjectsloop.count %], [% loop.count %]); return false;">[% SUBFIELD.value %]</a>
289
                                        [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %]
290
                                            <a role="button" data-toggle="modal" title="$[% SUBFIELD.code %] [% SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]#subjectSearch" onclick="showSubjects(this, [% subjectsloop.count %], [% loop.count %]); return false;">[% SUBFIELD.value %]</a>
291
                                        [% ELSE %]
292
                                            <a title="$[% SUBFIELD.code %] [% SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% SUBFIELD.value %]</a>
293
                                        [% END %]
285
                                    [% END %]
294
                                    [% END %]
286
                                    [% IF (MARCSUBJCT.authoritylink) %]
295
                                    [% IF (MARCSUBJCT.authoritylink) %]
287
                                        <a class="authlink" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCSUBJCT.authoritylink %]"><img style="vertical-align:middle" height="15" width="15" src="[% interface %]/[% theme %]/images/filefind.png" /></a>
296
                                        <a class="authlink" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCSUBJCT.authoritylink %]"><img style="vertical-align:middle" height="15" width="15" src="[% interface %]/[% theme %]/images/filefind.png" /></a>
Lines 1745-1769 Link Here
1745
    //<![CDATA[
1754
    //<![CDATA[
1746
        function showAuthors(element){
1755
        function showAuthors(element){
1747
            var authornumber = $(element).attr("data-count");
1756
            var authornumber = $(element).attr("data-count");
1748
            // Hide subjects menu if displayed
1749
            hideMenu(".subjectSearch");
1750
1757
1751
            // Check checkbox related to the clicked link
1758
            // Check checkbox related to the clicked link
1752
            $("#authorsList input[type='checkbox']").attr('checked', false);
1759
            $("#authorsList input[type='checkbox']").attr('checked', false);
1753
            $("#author_"+authornumber).attr('checked', true);
1760
            $("#author_"+authornumber).attr('checked', true);
1754
1761
1755
            makeAuthorRequest();
1762
            makeAuthorRequest();
1756
1757
            // Display menu
1758
            var left = element.offsetLeft || 0;
1759
            var top = element.offsetTop || 0;
1760
            $('.authorSearch').css('display', 'block');
1761
            $('.authorSearch').css('left', left);
1762
            $('.authorSearch').css('top', top + 15);
1763
        }
1764
1765
        function hideMenu(elem) {
1766
            $(elem).css('display', 'none');
1767
        }
1763
        }
1768
1764
1769
        function checkAll(checkbox, elem) {
1765
        function checkAll(checkbox, elem) {
Lines 1826-1832 Link Here
1826
            }
1822
            }
1827
        }
1823
        }
1828
        $(document).ready(function() {
1824
        $(document).ready(function() {
1829
            $("a.showauthors").click(function(){
1825
            $("a.showauthors").click(function(e){
1830
                e.preventDefault();
1826
                e.preventDefault();
1831
                showAuthors(this);
1827
                showAuthors(this);
1832
            });
1828
            });
1833
- 

Return to bug 13271