Lines 97-103
Link Here
|
97 |
[% END %] |
97 |
[% END %] |
98 |
</span> |
98 |
</span> |
99 |
[% END %] |
99 |
[% END %] |
100 |
<span id="catalogue_detail_marc_preview" class="results_summary"><span class="label">MARC Preview:</span> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber | uri %]&viewas=html" title="MARC" class="previewMARC">Show</a></span> |
100 |
|
|
|
101 |
<span id="catalogue_detail_marc_preview" class="results_summary"><span class="label">MARC Preview:</span> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber | uri %]&viewas=html " title="MARC" class="previewMARC">Show</a></span> |
102 |
|
103 |
[% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' ) %] |
104 |
<span id="catalogue_detail_elastic_record" class="results_summary"><span class="label">Elasticsearch Record :</span> <a href="/cgi-bin/koha/catalogue/showelastic.pl?id=[% biblionumber | uri %]" title="ELASTIC" class="previewElastic">Show</a></span> |
105 |
[% END %] |
101 |
|
106 |
|
102 |
[% IF ( holdcount ) %] |
107 |
[% IF ( holdcount ) %] |
103 |
<span class="results_summary"> |
108 |
<span class="results_summary"> |
Lines 169-175
Link Here
|
169 |
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] |
174 |
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] |
170 |
<li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li> |
175 |
<li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li> |
171 |
[% END %] |
176 |
[% END %] |
172 |
[% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' ) %]<li><a href="#esrecord" id="estab">Elasticsearch Record</a></li>[% END %] |
|
|
173 |
</ul> |
177 |
</ul> |
174 |
|
178 |
|
175 |
[% items_table_block_iter = 0 %] |
179 |
[% items_table_block_iter = 0 %] |
Lines 699-716
Link Here
|
699 |
</div> |
703 |
</div> |
700 |
[% END %] |
704 |
[% END %] |
701 |
|
705 |
|
702 |
[% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' ) %] |
|
|
703 |
<div id="esrecord" class="esrecord"> |
704 |
<div esid="[% biblionumber %]"></div> |
705 |
[% IF esrecord %] |
706 |
<p>[% esrecord %]</p> |
707 |
<script type="application/json" id="stuff">[% (esrecord) %]</script> |
708 |
[% ELSE %] |
709 |
<p>"This record was not found in the ES index"</p> |
710 |
[% END %] |
711 |
</div> |
712 |
[% END %] |
713 |
|
714 |
</div><!-- /bibliodetails --> |
706 |
</div><!-- /bibliodetails --> |
715 |
|
707 |
|
716 |
<div id="export" style="margin-top: 1em;"> |
708 |
<div id="export" style="margin-top: 1em;"> |
Lines 749-754
Link Here
|
749 |
</div> |
741 |
</div> |
750 |
</div> |
742 |
</div> |
751 |
|
743 |
|
|
|
744 |
<div id="elasticPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="elasticPreviewLabel" aria-hidden="true"> |
745 |
<div class="modal-dialog modal-lg"> |
746 |
<div class="modal-content"> |
747 |
<div class="modal-header"> |
748 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
749 |
<h3 id="elasticPreviewLabel">Elastic record</h3> |
750 |
</div> |
751 |
<div class="modal-body"> |
752 |
<div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div> |
753 |
</div> |
754 |
<div class="modal-footer"> |
755 |
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button> |
756 |
</div> |
757 |
</div> |
758 |
</div> |
759 |
</div> |
760 |
|
752 |
</main> |
761 |
</main> |
753 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
762 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
754 |
|
763 |
|
Lines 932-941
Link Here
|
932 |
var page = $(this).attr("href"); |
941 |
var page = $(this).attr("href"); |
933 |
$("#marcPreview .modal-body").load(page + " table"); |
942 |
$("#marcPreview .modal-body").load(page + " table"); |
934 |
$('#marcPreview').modal({show:true}); |
943 |
$('#marcPreview').modal({show:true}); |
|
|
944 |
|
935 |
}); |
945 |
}); |
936 |
$("#marcPreview").on("hidden.bs.modal", function(){ |
946 |
|
937 |
$("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); |
947 |
[% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' ) %] |
|
|
948 |
$("body").on("click",".previewElastic", function(event){ |
949 |
event.preventDefault(); |
950 |
let pageElastic = $(this).attr("href"); |
951 |
$("#elasticPreview .modal-body").load(pageElastic); |
952 |
$('#elasticPreview').modal({show:true}); |
938 |
}); |
953 |
}); |
|
|
954 |
[% END %] |
955 |
|
939 |
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %] |
956 |
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %] |
940 |
novSelect.loadContentForQuery({ |
957 |
novSelect.loadContentForQuery({ |
941 |
ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]', |
958 |
ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]', |
Lines 957-976
Link Here
|
957 |
verify_images(); |
974 |
verify_images(); |
958 |
});[% END %] |
975 |
});[% END %] |
959 |
|
976 |
|
960 |
[% IF Koha.Preference('SearchEngine') == 'Elasticsearch' && 1==0 %] |
|
|
961 |
function ESRecord (biblionumber) { |
962 |
$.getJSON("http://localhost:9200/koha_kohadev_biblios/data/", biblionumber, function( data ){ |
963 |
$.each( data, function( key, val ) { |
964 |
console.log("key "+key+"val "+val); |
965 |
}); |
966 |
}); |
967 |
} |
968 |
$(document).ready( function(){ |
969 |
var esid = [% biblionumber %]; |
970 |
ESRecord( esid ); |
971 |
}); |
972 |
[% END %] |
973 |
|
974 |
</script> |
977 |
</script> |
975 |
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %] |
978 |
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %] |
976 |
<script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script> |
979 |
<script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script> |
Lines 1017-1021
Link Here
|
1017 |
[% END %] |
1020 |
[% END %] |
1018 |
}); |
1021 |
}); |
1019 |
</script> |
1022 |
</script> |
|
|
1023 |
|
1020 |
[% END %] |
1024 |
[% END %] |
1021 |
[% INCLUDE 'intranet-bottom.inc' %] |
1025 |
[% INCLUDE 'intranet-bottom.inc' %] |