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