4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Cataloging</title>
6 [% INCLUDE 'doc-head-close.inc' %]
9 <body id="cat_addbooks" class="cat">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'cataloging-search.inc' %]
13 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › Cataloging</div>
15 <div class="main container-fluid">
17 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
19 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
20 <div id="toolbar" class="btn-toolbar">
21 [% IF Koha.Preference( 'EnableAdvancedCatalogingEditor' ) == 1 && CAN_user_editcatalogue_advanced_editor %]
22 <a id="useadvanced" href="/cgi-bin/koha/cataloguing/editor.pl" class="btn btn-default"><i class="fa fa-pencil"></i> Advanced editor</a>
24 <div class="btn-group">
25 <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New record <span class="caret"></span></button>
26 <ul class="dropdown-menu">
27 <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=">Default framework</a></li>
28 [% FOREACH framework IN frameworks %]
29 <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% framework.frameworktext | html %]</a></li>
33 [% IF servers.count > 0 %]
34 <div class="btn-group">
35 <button class="btn btn-default" id="z3950search"><i class="fa fa-search"></i> New from Z39.50/SRU</button>
36 <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
37 <span class="caret"></span>
39 <ul class="dropdown-menu">
40 <li class="z3950searchFw"><a href="#">Default framework</a></li>
41 [% FOREACH framework IN frameworks %]
42 <li id="[% framework.frameworkcode | html %]" class="z3950searchFw"><a href="#">[% framework.frameworktext | html %]</a></li>
46 [% END # /IF servers.count %]
48 <div class="btn-group"><button type="submit" class="btn btn-default merge-items"><i class="fa fa-compress"></i> Merge selected</button></div>
50 </div> <!-- /#toolbar -->
51 [% END # /IF CAN_user_editcatalogue_edit_catalogue %]
53 [% IF ( noitemsfound ) %]
57 [%# display the search results %]
61 [% total | html %] result(s) found in catalog,
62 <a href="#searchresult-breeding">[% breeding_count | html %] result(s) found in reservoir</a>
64 <div class="pages">[% pagination_bar | $raw %]</div>
65 <div class="searchresults">
73 [% FOREACH resultsloo IN resultsloop %]
75 <td><input type="checkbox" class="selection" id="bib[% resultsloo.biblionumber | html %]" name="biblionumber" value="[% resultsloo.biblionumber | html %]" /></td>
78 <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% resultsloo.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=resultsloo %]</a>
80 [% IF ( resultsloo.summary ) %]
81 <p>[% resultsloo.summary | html %]</p>
84 [% IF ( resultsloo.author ) %]
85 [% resultsloo.author | html %]
89 [% IF ( resultsloo.isbn ) %] - [% resultsloo.isbn | html %] [% END %]
90 [% IF ( resultsloo.publicationyear ) %] - [% resultsloo.publicationyear | html %][% END %]
91 [% IF ( resultsloo.publishercode ) %]- [% resultsloo.publishercode | html %][% END %]
92 [% IF ( resultsloo.copyrightdate ) %] - [% resultsloo.copyrightdate | html %][% END %]
93 [% IF ( resultsloo.edition ) %]Edition: [% resultsloo.edition | html %][% END %]
94 [% IF ( resultsloo.place ) %] ; [% resultsloo.place | html %][% END %]
95 [% IF ( resultsloo.pages ) %] - [% resultsloo.pages | html %][% END %]
96 [% IF ( resultsloo.item('size') ) %] ; [% resultsloo.item('size') | html %][% END %]
97 [% IF ( resultsloo.timestamp ) %] <i>(modified on [% resultsloo.timestamp | html %])</i>[% END %]
102 [% IF ( resultsloo.available_items_loop ) %]
103 <span class="available">
104 [% FOREACH items_loo IN resultsloo.available_items_loop %]
105 [% items_loo.count | html %] [% items_loo.branchname | html %]
106 [% IF ( items_loo.location ) %]<span class="shelvingloc">[% items_loo.location | html %]</span>[% END %]
107 [% IF ( items_loo.itemcallnumber ) %][% items_loo.itemcallnumber | html %][% END %]
108 [% IF ( items_loo.classification ) %]
109 <a href="/cgi-bin/koha/catalogue/search.pl?q=callnum:[% items_loo.classification |url %]">
110 [% items_loo.classification | html %]
117 <span class="unavailable">
118 [% IF ( resultsloo.onloancount ) %] Checked out ([% resultsloo.onloancount | html %]),<br /> [% END %]
119 [% IF ( resultsloo.withdrawncount ) %] Withdrawn ([% resultsloo.withdrawncount | html %]),<br /> [% END %]
120 [% IF ( resultsloo.itemlostcount ) %] Lost ([% resultsloo.itemlostcount | html %])<br />[% END %]
121 [% IF ( resultsloo.orderedcount ) %] On order ([% resultsloo.orderedcount | html %])<br/>[% END %]
122 [% IF ( resultsloo.notforloancount ) %] Not for loan ([% resultsloo.notforloancount | html %])[% END %]
127 <a class="btn btn-default btn-xs dropdown-toggle" id="cataloguesearchactions[% resultsloo.biblionumber | html %]" role="button" data-toggle="dropdown" href="#">
128 Actions <b class="caret"></b>
130 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="cataloguesearchactions[% resultsloo.biblionumber | html %]">
131 <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% resultsloo.biblionumber | uri %]" class="previewData"><i class="fa fa-eye"></i> MARC preview</a></li>
132 <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% resultsloo.biblionumber | uri %]" class="previewData"><i class="fa fa-eye"></i> Card preview</a></li>
133 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
134 <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% resultsloo.biblionumber | uri %]"><i class="fa fa-pencil"></i> Edit biblio</a></li>
136 [% IF ( CAN_user_editcatalogue_edit_items ) %]
137 <li><a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% resultsloo.biblionumber | uri %]"><i class="fa fa-plus"></i> Add/Edit items</a></li>
140 </div> <!-- /.dropup -->
143 [% END # /FOREACH resultsloo %]
145 <div class="pages">[% pagination_bar | $raw %]</div>
147 </div> <!-- /.searchresults -->
148 [% ELSE # IF total %]
150 [% IF ( error ) %]<div class="dialog alert">[% END %]<b>No results found</b>
152 Error: <span class="error">[% error | html %]</span></div>
155 [% END # /IF total %]
158 <div id="searchresult-breeding">
159 <h3>Biblios in reservoir</h3>
160 [% IF ( breeding_loop ) %]
170 [% FOREACH breeding_loo IN breeding_loop %]
173 [% breeding_loo.title | html %]
174 [% breeding_loo.author | html %]
176 <td>[% breeding_loo.isbn | html %]</td>
177 <td>[% breeding_loo.copyrightdate | html %]</td>
178 <td>[% breeding_loo.edition | html %]</td>
179 <td>[% breeding_loo.file | html %]</td>
182 <a class="btn btn-default btn-xs dropdown-toggle" id="reservoirsearchactions[% breeding_loo.id | html %]" role="button" data-toggle="dropdown" href="#">
183 Actions <b class="caret"></b>
185 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="reservoirsearchactions[% breeding_loo.id | html %]">
186 <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.id | uri %]" class="previewData"><i class="fa fa-eye"></i> MARC preview</a></li>
187 <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.id | uri %]" class="previewData"><i class="fa fa-eye"></i> Card preview</a></li>
188 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
189 <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?breedingid=[% breeding_loo.id | uri %]"><i class="fa fa-plus"></i> Add biblio</a></li>
195 [% END # /IF breeding_loo %]
199 [% END # /IF breeding_loop %]
201 [% END # /IF query %]
203 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
204 <div class="modal-dialog">
205 <div class="modal-content">
206 <div class="modal-header">
207 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
208 <h3 id="dataPreviewLabel">Preview</h3>
210 <div class="modal-body">
211 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
213 <div class="modal-footer">
214 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
216 </div> <!-- /.modal-content -->
217 </div> <!-- /.modal-dialog -->
218 </div> <!-- /#dataPreview -->
219 </div> <!-- /.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 -->
220 </div> <!-- /.row -->
222 [% MACRO jsinclude BLOCK %]
225 $(document).ready(function() {
226 //Set focus to cataloging search
227 $("input[name=q]:eq(0)").focus();
229 $("#z3950search").click(function(){
234 $(".z3950searchFw").click(function(){
235 PopupZ3950($(this).prop('id'));
238 $(".merge-items").on("click",function(e){
243 $("#useadvanced").click(function(){
244 $.cookie( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/' } );
248 $(".previewData").on("click", function(e){
250 var ltitle = $(this).text();
251 var page = $(this).attr("href");
252 $("#dataPreviewLabel").text(ltitle);
253 $("#dataPreview .modal-body").load(page + " div");
254 $('#dataPreview').modal({show:true});
256 $("#dataPreview").on("hidden.bs.modal", function(){
257 $("#dataPreviewLabel").html("");
258 $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
263 /* this function open a popup to search on z3950 server. */
264 function PopupZ3950(fw) {
265 var strQuery = GetZ3950Terms(fw);
267 window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber | html %]"+strQuery,"z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
270 /* provide Z3950 search points */
271 function GetZ3950Terms(fw){
272 var strQuery="&frameworkcode=" + fw;
273 [% FOREACH z3950_search_param IN z3950_search_params %]
274 strQuery += "&" + "[% z3950_search_param.name | uri %]" + "=" + "[% z3950_search_param.value | uri %]";
280 * This function checks if the adequate number of records are checked for merging
282 function MergeItems() {
283 var checkboxes = $("input:checkbox:checked");
284 if (checkboxes.length < 2) {
285 alert(_("At least two records must be selected for merging."));
288 $(checkboxes).each(function() {
289 params.push('biblionumber=' + $(this).val());
291 var url = '/cgi-bin/koha/cataloguing/merge.pl?' + params.join('&');
300 [% INCLUDE 'intranet-bottom.inc' %]