|
Lines 1-3
Link Here
|
|
|
1 |
[% SET footerjs = 1 %] |
| 1 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
[% INCLUDE 'doc-head-open.inc' %] |
| 2 |
<title>Koha › Cataloging › Attach an item to [% bibliotitle | html %]</title> |
3 |
<title>Koha › Cataloging › Attach an item to [% bibliotitle | html %]</title> |
| 3 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
[% INCLUDE 'doc-head-close.inc' %] |
|
Lines 51-56
Link Here
|
| 51 |
|
52 |
|
| 52 |
[% ELSE %] |
53 |
[% ELSE %] |
| 53 |
[% IF ( success ) %] |
54 |
[% IF ( success ) %] |
|
|
55 |
[% IF from_biblio.items.count == 0 %] |
| 56 |
<div class="dialog alert"> |
| 57 |
The record <em>[% from_biblio.title | html %]</em> has [% from_biblio.items.count | html %] attached items. |
| 58 |
<p> |
| 59 |
<button id="delete-biblio-btn" data-biblionumber="[% from_biblio.id | html %]"><i id="del-bib-spn" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i><i class="fa fa-fw fa-trash"></i> Delete record |
| 60 |
</button> |
| 61 |
<span id="del-bib-success" style="display:none">Record deleted</span> |
| 62 |
<span id="del-bib-failure" style="display:none">Attempt to delete record failed.</span> |
| 63 |
</p> |
| 64 |
</div> |
| 65 |
<br/> |
| 66 |
[% END %] |
| 67 |
|
| 54 |
<div class="dialog message">The item has successfully been attached to [% INCLUDE 'biblio-default-view.inc' %]<i>[% bibliotitle | html %]</i></a>. |
68 |
<div class="dialog message">The item has successfully been attached to [% INCLUDE 'biblio-default-view.inc' %]<i>[% bibliotitle | html %]</i></a>. |
| 55 |
<p> |
69 |
<p> |
| 56 |
[% INCLUDE actions %] |
70 |
[% INCLUDE actions %] |
|
Lines 62-67
Link Here
|
| 62 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
76 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
| 63 |
</form> |
77 |
</form> |
| 64 |
</p> |
78 |
</p> |
|
|
79 |
|
| 65 |
</div> |
80 |
</div> |
| 66 |
[% ELSE %] |
81 |
[% ELSE %] |
| 67 |
[% IF ( missingparameter ) %] |
82 |
[% IF ( missingparameter ) %] |
|
Lines 97-100
Link Here
|
| 97 |
</div> |
112 |
</div> |
| 98 |
</div> |
113 |
</div> |
| 99 |
|
114 |
|
|
|
115 |
[% MACRO jsinclude BLOCK %] |
| 116 |
<script type="text/javascript"> |
| 117 |
$("#delete-biblio-btn").on("click", function(){ |
| 118 |
if ( confirm(_("Are you sure you want to delete this record?")) ) { |
| 119 |
let btn = $(this); |
| 120 |
$("#del-bib-spn").show(); |
| 121 |
let biblionumber = $(this).data('biblionumber'); |
| 122 |
$.ajax({ |
| 123 |
url: '/api/v1/biblios/' + biblionumber, |
| 124 |
type: 'DELETE', |
| 125 |
success: function(result) { |
| 126 |
btn.hide(); |
| 127 |
$('#del-bib-success').show(); |
| 128 |
}, |
| 129 |
error: function(result) { |
| 130 |
btn.hide(); |
| 131 |
$('#del-bib-failure').show(); |
| 132 |
} |
| 133 |
}); |
| 134 |
} |
| 135 |
}); |
| 136 |
</script> |
| 137 |
[% END %] |
| 138 |
|
| 100 |
[% INCLUDE 'intranet-bottom.inc' %] |
139 |
[% INCLUDE 'intranet-bottom.inc' %] |
| 101 |
- |
|
|