2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Cataloging › Attach an item to [% INCLUDE 'biblio-title-head.inc' %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
6 <body id="catalog_moveitem" class="catalog">
7 [% INCLUDE 'header.inc' %]
8 [% INCLUDE 'cat-search.inc' %]
9 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › [% INCLUDE 'biblio-title.inc' link = 1 %] › Attach an item</div>
11 <div class="main container-fluid">
13 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
16 [% IF ( BiblioDefaultViewmarc ) %]
17 <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="post">
18 [% ELSIF ( BiblioDefaultViewlabeled_marc ) %]
19 <form action="/cgi-bin/koha/catalogue/labeledMARCdetail.pl" method="post">
20 [% ELSIF ( BiblioDefaultViewisbd ) %]
21 <form action="/cgi-bin/koha/catalogue/ISBDdetail.pl" method="post">
23 <form action="/cgi-bin/koha/catalogue/detail.pl" method="post">
28 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
29 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
31 <form method="get" action="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber | html %]">
32 <button type="submit" class="new"><i class="fa fa-fw fa-plus"></i> Try again with a different barcode</button>
33 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
38 <div class="dialog alert">
40 [% IF ( errornonewitem ) %]ERROR: Unable to create the new item.<p>
46 [% IF ( errornoitem ) %]ERROR: Unable to get the item.<p>
55 [% IF from_biblio.items.count == 0 && CAN_user_editcatalogue_edit_catalogue %]
56 <div class="dialog alert" id="del-bib-alert">
57 <div id="del-bib-action">
58 The record <em><a class="title" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% from_biblio.id | html %]">[% from_biblio.title | html %]</a></em> has [% from_biblio.items.count | html %] attached items.
59 <p><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
62 <p id="del-bib-result">
63 <span id="del-bib-success" style="display:none"><i class="fa fa-check success"></i> Record deleted</span>
64 <span id="del-bib-failure" style="display:none"><i class="fa fa-warning"></i> Attempt to delete record failed.</span>
69 <div class="dialog message">The item has successfully been attached to [% INCLUDE 'biblio-title.inc' link = 1 %].
72 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
73 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
75 <form method="get" action="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber | html %]"/>
76 <button type="submit" class="new"><i class="fa fa-fw fa-plus"></i> Attach another item</button>
77 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
83 [% IF ( missingparameter ) %]
84 <form method="post" action="/cgi-bin/koha/cataloguing/moveitem.pl">
85 [% IF ( missingbiblionumber ) %]
86 <fieldset id="biblionumber_fieldset">
87 <label for="biblionumber">Select the biblionumber to attach the item to</label>
88 <div class="hint">Enter biblionumber:</div>
89 <input type="text" name="biblionumber" id="biblionumber" class="focus" size="14" />
90 <fieldset class="action"><input type="submit" value="Submit" /></fieldset>
93 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" />
96 [% IF ( missingbarcode ) %]
97 <h3>Attach an item [% IF ( biblio.title ) %] to [% INCLUDE 'biblio-title.inc' %][% END %]</h3>
98 <fieldset id="barcode_fieldset">
99 <label for="barcode">Enter the barcode of the item to attach:</label>
100 <p class="hint">The item you select will be moved to the target record.</p>
101 <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
102 <fieldset class="action"><input type="submit" value="Submit" /></fieldset>
105 <input type="hidden" name="barcode" id="barcode" value="[% barcode | html %]" />
116 [% MACRO jsinclude BLOCK %]
118 $("#delete-biblio-btn").on("click", function(){
119 if ( confirm(_("Are you sure you want to delete this record?")) ) {
120 $("#del-bib-spn").show();
121 let biblionumber = $(this).data('biblionumber');
123 url: '/api/v1/biblios/' + biblionumber,
125 success: function(result) {
126 $("#del-bib-action").hide();
127 $('#del-bib-success').show();
128 $("#del-bib-alert").attr("class","dialog message")
130 error: function(result) {
131 $("#delete-biblio-btn").hide();
132 $('#del-bib-failure').show();
140 [% INCLUDE 'intranet-bottom.inc' %]