1 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Add items › Course reserves › Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
11 <body id="courses_add_items_step1" class="course">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'cat-search.inc' %]
16 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
19 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22 <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
25 <a href="#" aria-current="page">
26 Add reserves for <em>[% course.course_name | html %]</em>
32 <div class="main container-fluid">
34 <div class="col-md-8 col-md-offset-2">
35 [% IF action == 'invalid_course' %]
36 <div id="invalid-course-error" class="dialog alert">Invalid course!</div>
39 [% IF action == 'display_form' %]
40 <form method="post" action="/cgi-bin/koha/course_reserves/batch_add_items.pl">
41 <input type="hidden" name="course_id" value="[% course.course_id | html %]" />
42 <input type="hidden" name="action" value="add" />
44 <fieldset class="rows">
45 <legend>Add items: scan barcodes</legend>
48 <label class="required" for="barcodes">Item barcodes:</label>
49 <textarea rows="20" cols="50" id="barcodes" name="barcodes" class="focus"></textarea>
51 [% IF item_level_itypes %]
53 <label class="required" for="itype">Item type:</label>
54 <input type="checkbox" class="field-toggle" data-pulldown="itype" value="1" name="itype_enabled" id="itype_enabled" />
55 <select id="itype" name="itype" disabled="disabled">
56 <option value=""></option>
58 [% FOREACH it IN ItemTypes.Get() %]
59 <option value="[% it.itemtype | html %]">[% it.description | html %]</option>
66 <label class="required" for="ccode">Collection:</label>
67 <input type="checkbox" class="field-toggle" data-pulldown="ccode" value="1" name="ccode_enabled" id="ccode_enabled" />
68 <select id="ccode" name="ccode" disabled="disabled">
69 <option value=""></option>
70 [% FOREACH c IN AuthorisedValues.Get('CCODE') %]
71 <option value="[% c.authorised_value | html %]">[% c.lib | html %]</option>
77 <label class="required" for="location">Shelving location:</label>
78 <input type="checkbox" class="field-toggle" data-pulldown="location" value="1" name="location_enabled" id="location_enabled" />
79 <select id="location" name="location" disabled="disabled">
80 <option value=""></option>
81 [% FOREACH s IN AuthorisedValues.Get('LOC') %]
82 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
88 <label class="required" for="homebranch">Home library:</label>
89 <input type="checkbox" value="1" class="field-toggle" data-pulldown="homebranch" name="homebranch_enabled" id="homebranch_enabled" />
90 <select id="homebranch" name="homebranch" disabled="disabled">
91 <option value=""></option>
92 [% FOREACH b IN Branches.all() %]
93 <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
99 <label class="required" for="holdingbranch">Holding library:</label>
100 <input type="checkbox" value="1" class="field-toggle" data-pulldown="holdingbranch" name="holdingbranch_enabled" id="holdingbranch_enabled" />
101 <select id="holdingbranch" name="holdingbranch" disabled="disabled">
102 <option value=""></option>
103 [% FOREACH b IN Branches.all() %]
104 <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
110 <label for="item_staff_note">Staff note:</label>
111 <textarea name="item_staff_note" id="item_staff_note">[% course_reserve.staff_note | html %]</textarea>
115 <label for="item_public_note">Public note:</label>
116 <textarea name="item_public_note" id="item_public_note">[% course_reserve.public_note | html %]</textarea>
122 Checking the box next to the field label will enable changes to that field. Leave boxes unchecked to make no change.<br>
123 Any items with existing course reserves will have their <em>on reserve</em> values updated.
126 <fieldset class="rows">
127 <legend>Or use biblionumbers of bibliographic records</legend>
130 <label class="required" for="biblionumbers">Biblionumbers:</label>
131 <textarea rows="20" cols="50" id="biblionumbers" name="biblionumbers"></textarea>
135 <label for="biblio_staff_note">Staff note:</label>
136 <textarea name="biblio_staff_note" id="biblio_staff_note">[% course_reserve.staff_note | html %]</textarea>
140 <label for="biblio_public_note">Public note:</label>
141 <textarea name="biblio_public_note" id="biblio_public_note">[% course_reserve.public_note | html %]</textarea>
146 <fieldset class="action">
147 <input type="submit" value="Submit" class="submit" />
149 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | uri %]" class="cancel">Cancel</a>
154 [% IF action == 'display_results' %]
159 [% IF items_added.size > 0 %]
160 <p>The following items were added or updated:</p>
162 [% FOREACH i IN items_added %]
163 <li>[% i.biblio.title | html %] ( [% i.barcode | html %] )</li>
167 No valid item barcodes found.
171 [% IF invalid_barcodes.size > 0 %]
172 <h3>Invalid barcodes</h3>
173 <p>The following invalid barcodes were skipped:</p>
175 [% FOREACH b IN invalid_barcodes %]
176 <li>[% b | html %]</li>
180 [% ELSIF biblionumbers %]
181 <h3>Bibliographic records added</h3>
182 [% IF biblios_added.size > 0 %]
183 <p>The following bibliographic records were added or updated:</p>
185 [% FOREACH b IN biblios_added %]
186 <li>[% b.title | html %] ( [% b.biblionumber | html %] )</li>
190 No valid biblionumbers found.
194 [% IF invalid_biblionumbers.size > 0 %]
195 <h3>Invalid biblionumbers</h3>
196 <p>The following invalid biblionumbers were skipped:</p>
198 [% FOREACH b IN invalid_biblionumbers %]
199 <li>[% b | html %]</li>
206 <a class='btn btn-default' href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course_id | html %]">View course</a>
212 [% MACRO jsinclude BLOCK %]
215 $(document).ready(function(){
216 $('.field-toggle').change(function() {
218 $('#' + $(this).data('pulldown') ).removeAttr('disabled');
220 $('#' + $(this).data('pulldown') ).val('');
221 $('#' + $(this).data('pulldown') ).attr('disabled', 'disabled');
224 $("input[type='submit']").click(function(e){
225 if ( $("#biblionumbers").val().length > 0 && $("#barcodes").val().length > 0 ) {
227 alert(__("Please enter only barcodes, or only biblionumbers."));
235 [% INCLUDE 'intranet-bottom.inc' %]