2 [% PROCESS 'i18n.inc' %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% FILTER collapse %]
6 [% t("Attach an item to") | html %] [% INCLUDE 'biblio-title-head.inc' %] ›
7 [% t("Cataloging") | html %] ›
10 [% INCLUDE 'doc-head-close.inc' %]
12 <body id="catalog_moveitem" class="catalog">
13 [% WRAPPER 'header.inc' %]
14 [% INCLUDE 'cat-search.inc' %]
17 [% WRAPPER 'sub-header.inc' %]
18 [% WRAPPER breadcrumbs %]
19 [% WRAPPER breadcrumb_item %]
20 <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
22 [% WRAPPER breadcrumb_item %]
23 [% INCLUDE 'biblio-title.inc' link = 1 %]
25 [% WRAPPER breadcrumb_item bc_active= 1 %]
26 <span>Attach an item</span>
28 [% END #/ WRAPPER breadcrumbs %]
29 [% END #/ WRAPPER sub-header.inc %]
31 <div class="main container-fluid">
33 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
35 <h1>Attach an item [% IF ( biblio.title ) %] to [% INCLUDE 'biblio-title.inc' %][% END %]</h1>
37 [% IF Koha.Preference('IntranetBiblioDefaultView') == 'marc' %]
38 <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="post">
39 [% ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'labeled_marc' %]
40 <form action="/cgi-bin/koha/catalogue/labeledMARCdetail.pl" method="post">
41 [% ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'isbd' %]
42 <form action="/cgi-bin/koha/catalogue/ISBDdetail.pl" method="post">
44 <form action="/cgi-bin/koha/catalogue/detail.pl" method="post">
49 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
50 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
52 <form method="get" action="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber | html %]">
53 <button type="submit" class="new"><i class="fa fa-fw fa-plus"></i> Try again with a different barcode</button>
54 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
59 <div class="dialog alert">
61 [% IF ( errornonewitem ) %]ERROR: Unable to create the new item.<p>
67 [% IF ( errornoitem ) %]ERROR: Unable to get the item.<p>
76 [% IF from_biblio.items.count == 0 && CAN_user_editcatalogue_edit_catalogue %]
77 <div class="dialog alert" id="del-bib-alert">
78 <div id="del-bib-action">
79 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.
80 <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-can"></i> Delete record
83 <p id="del-bib-result">
84 <span id="del-bib-success" style="display:none"><i class="fa fa-check success"></i> Record deleted</span>
85 <span id="del-bib-failure" style="display:none"><i class="fa-solid fa-triangle-exclamation"></i> Attempt to delete record failed.</span>
90 <div class="dialog message">The item has successfully been attached to [% INCLUDE 'biblio-title.inc' link = 1 %].
93 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
94 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
96 <form method="get" action="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber | html %]"/>
97 <button type="submit" class="new"><i class="fa fa-fw fa-plus"></i> Attach another item</button>
98 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
104 [% IF ( missingparameter ) %]
105 <form method="post" action="/cgi-bin/koha/cataloguing/moveitem.pl">
106 [% IF ( missingbiblionumber ) %]
107 <fieldset id="biblionumber_fieldset">
108 <label for="biblionumber">Select the biblionumber to attach the item to</label>
109 <div class="hint">Enter biblionumber:</div>
110 <input type="text" name="biblionumber" id="biblionumber" class="focus" size="14" />
112 <fieldset class="action">
113 <input type="submit" class="btn btn-primary" value="Submit" />
116 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" />
119 [% IF ( missingbarcode ) %]
120 <fieldset id="barcode_fieldset">
121 <label for="barcode">Enter the barcode of the item to attach:</label>
122 <p class="hint">The item you select will be moved to the target record.</p>
123 <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
125 <fieldset class="action">
126 <input type="submit" class="btn btn-primary" value="Submit" />
129 <input type="hidden" name="barcode" id="barcode" value="[% barcode | html %]" />
140 [% MACRO jsinclude BLOCK %]
142 $("#delete-biblio-btn").on("click", function(){
143 if ( confirm(_("Are you sure you want to delete this record?")) ) {
144 $("#del-bib-spn").show();
145 let biblionumber = $(this).data('biblionumber');
147 url: '/api/v1/biblios/' + biblionumber,
149 success: function(result) {
150 $("#del-bib-action").hide();
151 $('#del-bib-success').show();
152 $("#del-bib-alert").attr("class","dialog message")
154 error: function(result) {
155 $("#delete-biblio-btn").hide();
156 $('#del-bib-failure').show();
164 [% INCLUDE 'intranet-bottom.inc' %]