1 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Course reserves › Add items</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 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> › Add reserves for <em><a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | html %]">[% course.course_name | html %]</a></em></div>
18 <div class="main container-fluid">
20 <div class="col-md-8 col-md-offset-2">
21 [% IF action == 'invalid_course' %]
22 <div id="invalid-course-error" class="dialog alert">Invalid course!</div>
25 [% IF action == 'display_form' %]
26 <form method="post" action="/cgi-bin/koha/course_reserves/batch_add_items.pl">
27 <input type="hidden" name="course_id" value="[% course.course_id | html %]" />
28 <input type="hidden" name="action" value="add" />
30 <fieldset class="rows">
31 <legend>Add items: scan barcodes</legend>
34 <label class="required" for="barcodes">Item barcodes:</label>
35 <textarea rows="20" cols="50" id="barcodes" name="barcodes" class="focus"></textarea>
37 [% IF item_level_itypes %]
39 <label class="required" for="itype">Item type:</label>
40 <input type="checkbox" class="field-toggle" data-pulldown="itype" value="1" name="itype_enabled" id="itype_enabled" />
41 <select id="itype" name="itype" disabled="disabled">
42 <option value=""></option>
44 [% FOREACH it IN ItemTypes.Get() %]
45 <option value="[% it.itemtype | html %]">[% it.description | html %]</option>
52 <label class="required" for="ccode">Collection:</label>
53 <input type="checkbox" class="field-toggle" data-pulldown="ccode" value="1" name="ccode_enabled" id="ccode_enabled" />
54 <select id="ccode" name="ccode" disabled="disabled">
55 <option value=""></option>
56 [% FOREACH c IN AuthorisedValues.Get('CCODE') %]
57 <option value="[% c.authorised_value | html %]">[% c.lib | html %]</option>
63 <label class="required" for="location">Shelving location:</label>
64 <input type="checkbox" class="field-toggle" data-pulldown="location" value="1" name="location_enabled" id="location_enabled" />
65 <select id="location" name="location" disabled="disabled">
66 <option value=""></option>
67 [% FOREACH s IN AuthorisedValues.Get('LOC') %]
68 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
74 <label class="required" for="homebranch">Home library:</label>
75 <input type="checkbox" value="1" class="field-toggle" data-pulldown="homebranch" name="homebranch_enabled" id="homebranch_enabled" />
76 <select id="homebranch" name="homebranch" disabled="disabled">
77 <option value=""></option>
78 [% FOREACH b IN Branches.all() %]
79 <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
85 <label class="required" for="holdingbranch">Holding library:</label>
86 <input type="checkbox" value="1" class="field-toggle" data-pulldown="holdingbranch" name="holdingbranch_enabled" id="holdingbranch_enabled" />
87 <select id="holdingbranch" name="holdingbranch" disabled="disabled">
88 <option value=""></option>
89 [% FOREACH b IN Branches.all() %]
90 <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
96 <label for="staff_note">Staff note:</label>
97 <textarea name="staff_note" id="staff_note">[% course_reserve.staff_note | html %]</textarea>
101 <label for="public_note">Public note:</label>
102 <textarea name="public_note" id="public_note">[% course_reserve.public_note | html %]</textarea>
108 Any items with existing course reserves will have their <em>on reserve</em> values updated.
111 <fieldset class="action">
112 <input type="submit" value="Submit" class="submit" />
114 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | uri %]" class="cancel">Cancel</a>
119 [% IF action == 'display_results' %]
123 [% IF items_added.size > 0 %]
124 <p>The following items were added or updated:</p>
126 [% FOREACH i IN items_added %]
127 <li>[% i.biblio.title | html %] ( [% i.barcode | html %] )</li>
131 No valid item barcodes found.
135 [% IF invalid_barcodes.size > 0 %]
136 <h3>Invalid barcodes</h3>
137 <p>The following invalid barcodes were skipped:</p>
139 [% FOREACH b IN invalid_barcodes %]
140 <li>[% b | html %]</li>
146 <a class='btn btn-default' href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course_id | html %]">View course</a>
152 [% MACRO jsinclude BLOCK %]
155 $(document).ready(function(){
156 $('.field-toggle').change(function() {
158 $('#' + $(this).data('pulldown') ).removeAttr('disabled');
160 $('#' + $(this).data('pulldown') ).val('');
161 $('#' + $(this).data('pulldown') ).attr('disabled', 'disabled');
169 [% INCLUDE 'intranet-bottom.inc' %]