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 1744-1768 Link Here
1744
    //<![CDATA[
1753
    //<![CDATA[
1745
        function showAuthors(element){
1754
        function showAuthors(element){
1746
            var authornumber = $(element).attr("data-count");
1755
            var authornumber = $(element).attr("data-count");
1747
            // Hide subjects menu if displayed
1748
            hideMenu(".subjectSearch");
1749
1756
1750
            // Check checkbox related to the clicked link
1757
            // Check checkbox related to the clicked link
1751
            $("#authorsList input[type='checkbox']").attr('checked', false);
1758
            $("#authorsList input[type='checkbox']").attr('checked', false);
1752
            $("#author_"+authornumber).attr('checked', true);
1759
            $("#author_"+authornumber).attr('checked', true);
1753
1760
1754
            makeAuthorRequest();
1761
            makeAuthorRequest();
1755
1756
            // Display menu
1757
            var left = element.offsetLeft || 0;
1758
            var top = element.offsetTop || 0;
1759
            $('.authorSearch').css('display', 'block');
1760
            $('.authorSearch').css('left', left);
1761
            $('.authorSearch').css('top', top + 15);
1762
        }
1763
1764
        function hideMenu(elem) {
1765
            $(elem).css('display', 'none');
1766
        }
1762
        }
1767
1763
1768
        function checkAll(checkbox, elem) {
1764
        function checkAll(checkbox, elem) {
Lines 1825-1831 Link Here
1825
            }
1821
            }
1826
        }
1822
        }
1827
        $(document).ready(function() {
1823
        $(document).ready(function() {
1828
            $("a.showauthors").click(function(){
1824
            $("a.showauthors").click(function(e){
1829
                e.preventDefault();
1825
                e.preventDefault();
1830
                showAuthors(this);
1826
                showAuthors(this);
1831
            });
1827
            });
1832
- 

Return to bug 13271