Line 0
Link Here
|
|
|
1 |
[% USE raw %] |
2 |
[% SET footerjs = 1 %] |
3 |
[% USE Asset %] |
4 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
<title>Koha › Cataloging › Draft records</title> |
6 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
<style type="text/css"> |
8 |
#jobpanel,#jobstatus,#jobfailed { display : none; } |
9 |
span.change-status { font-style:italic; color:#666; display:none; } |
10 |
</style> |
11 |
[% Asset.css("css/datatables.css") %] |
12 |
</head> |
13 |
<body class="cat"> |
14 |
[% INCLUDE 'header.inc' %] |
15 |
|
16 |
<div id="breadcrumbs"> |
17 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
18 |
<a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › View draft records |
19 |
</div> |
20 |
|
21 |
<div class="main container-fluid"> |
22 |
<div class="row"> |
23 |
<div class="col-md-10 col-md-offset-1"> |
24 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
25 |
<div id="toolbar" class="btn-toolbar"> |
26 |
[% IF Koha.Preference( 'EnableAdvancedCatalogingEditor' ) == 1 %] |
27 |
<a id="useadvanced" href="/cgi-bin/koha/cataloguing/editor.pl" class="btn btn-default btn-sm"><i class="fa fa-pencil"></i> Advanced editor</a> |
28 |
[% END %] |
29 |
<div class="btn-group"> |
30 |
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New record <span class="caret"></span></button> |
31 |
<ul class="dropdown-menu"> |
32 |
<li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=">Default framework</a></li> |
33 |
[% FOREACH framework IN frameworks %] |
34 |
<li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% framework.frameworkcode %]">[% framework.frameworktext %]</a></li> |
35 |
[% END %] |
36 |
</ul> |
37 |
</div> |
38 |
[% IF servers.count > 0 %] |
39 |
<div class="btn-group"> |
40 |
<button class="btn btn-default btn-sm" id="z3950search"><i class="fa fa-search"></i> New from Z39.50/SRU</button> |
41 |
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"> |
42 |
<span class="caret"></span> |
43 |
</button> |
44 |
<ul class="dropdown-menu"> |
45 |
<li id="" class="z3950searchFw"><a href="#">Default framework</a></li> |
46 |
[% FOREACH framework IN frameworks %] |
47 |
<li id="[% framework.frameworkcode %]" class="z3950searchFw"><a href="#">[% framework.frameworktext %]</a></li> |
48 |
[% END %] |
49 |
</ul> |
50 |
</div> |
51 |
[% END %] |
52 |
<a class="btn btn-default btn-sm" href="/cgi-bin/koha/cataloguing/draftrecords.pl"><i class="fa fa-eye" aria-hidden="true"></i> View draft records</a></button> |
53 |
[% IF ( total ) %] |
54 |
<div class="btn-group"><button type="submit" class="btn btn-default btn-sm merge-items"><i class="fa fa-compress"></i> Merge selected</button></div> |
55 |
[% END %] |
56 |
</div> |
57 |
[% END %] |
58 |
<h1>View draft records</h1> |
59 |
<div id="draftrecords"> |
60 |
<p> To edit or save these draft records click the 'Edit' link beside the appropriate record. |
61 |
<form action="/cgi-bin/koha/cataloguing/draftrecords.pl" method="post"> |
62 |
<input type="hidden" name="op" id="delete_all_drafts" value='delete_all'/> |
63 |
<button type="submit">Delete all drafts from reservoir</button> |
64 |
</form> |
65 |
</p> |
66 |
<table id="records-table"> |
67 |
<thead> |
68 |
<tr> |
69 |
<th>#</th> |
70 |
<th>Citation</th> |
71 |
<th>Status</th> |
72 |
<th>Edit record</th> |
73 |
<th>Delete record</th> |
74 |
</tr> |
75 |
</thead> |
76 |
</table> |
77 |
</div> |
78 |
</div> |
79 |
</div> |
80 |
</div> |
81 |
</body> |
82 |
[% MACRO jsinclude BLOCK %] |
83 |
[% Asset.js("js/tools-menu.js") %] |
84 |
[% Asset.js("js/background-job-progressbar.js") %] |
85 |
[% INCLUDE 'datatables.inc' %] |
86 |
<script type="text/javascript"> |
87 |
$(document).ready(function(){ |
88 |
$("#records-table").dataTable($.extend(true, {}, dataTablesDefaults, { |
89 |
"bSort": true, |
90 |
"order": [0, "desc"], |
91 |
"bAutoWidth": false, |
92 |
"bFilter": false, |
93 |
"bProcessing": true, |
94 |
"bServerSide": true, |
95 |
"sAjaxSource": 'batch_records_ajax.pl', |
96 |
"sPaginationType": "full_numbers", |
97 |
"sDom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">', |
98 |
"aoColumns": [ |
99 |
{ "mDataProp": "import_record_id" }, |
100 |
{ "mDataProp": "citation" }, |
101 |
{ "mDataProp": "status" }, |
102 |
{ "mDataProp": "catalog_link" }, |
103 |
{ "mDataProp": "delete_link" } |
104 |
], |
105 |
"fnServerData": function ( sSource, aoData, fnCallback ) { |
106 |
aoData.push( { "name": "import_batch_id", "value": 1 } ); |
107 |
$.ajax({ |
108 |
'dataType': 'json', |
109 |
'type': 'POST', |
110 |
'url': sSource, |
111 |
'data': aoData, |
112 |
'success': function(json){ |
113 |
fnCallback(json); |
114 |
} |
115 |
}); |
116 |
}, |
117 |
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { |
118 |
[% IF ( record_type == 'auth' ) %] |
119 |
var record_details_url = "/cgi-bin/koha/authorities/detail.pl?authid="; |
120 |
[% ELSE %] |
121 |
var record_details_url = "/cgi-bin/koha/catalogue/detail.pl?biblionumber="; |
122 |
[% END %] |
123 |
$('td:eq(1)', nRow).html( |
124 |
'<a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=' + aData['import_record_id'] + '&viewas=html" class="previewMARC">' + aData['citation'] + '</a>' |
125 |
); |
126 |
$('td:eq(2)', nRow).html( |
127 |
aData['status'] == 'staged' ? _("Draft") : |
128 |
aData['status'] |
129 |
); |
130 |
if (aData['catalog_link']){ |
131 |
$('td:eq(3)', nRow).html( |
132 |
'<a href="' + aData['catalog_link'] + '">' + "Edit" + '</a>' |
133 |
); |
134 |
} |
135 |
if (aData['delete_link']){ |
136 |
$('td:eq(4)', nRow).html( |
137 |
'<a href="' + aData['delete_link'] + '">' + "Delete" + '</a>' |
138 |
); |
139 |
} |
140 |
}, |
141 |
})); |
142 |
}); |
143 |
</script> |
144 |
[% END %] |
145 |
[% INCLUDE 'intranet-bottom.inc' %] |