Main Koha release repository
https://koha-community.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
169 lines
7.8 KiB
169 lines
7.8 KiB
[% USE AuthorisedValues %]
|
|
[% USE Branches %]
|
|
[% USE ItemTypes %]
|
|
|
|
[% SET footerjs = 1 %]
|
|
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Course reserves › Add items</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
<body id="courses_add_items_step1" class="course">
|
|
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<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>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-md-8 col-md-offset-2">
|
|
[% IF action == 'invalid_course' %]
|
|
<div id="invalid-course-error" class="dialog alert">Invalid course!</div>
|
|
[% END %]
|
|
|
|
[% IF action == 'display_form' %]
|
|
<form method="post" action="/cgi-bin/koha/course_reserves/batch_add_items.pl">
|
|
<input type="hidden" name="course_id" value="[% course.course_id | html %]" />
|
|
<input type="hidden" name="action" value="add" />
|
|
|
|
<fieldset class="rows">
|
|
<legend>Add items: scan barcodes</legend>
|
|
<ol>
|
|
<li>
|
|
<label class="required" for="barcodes">Item barcodes:</label>
|
|
<textarea rows="20" cols="50" id="barcodes" name="barcodes" class="focus"></textarea>
|
|
</li>
|
|
[% IF item_level_itypes %]
|
|
<li>
|
|
<label class="required" for="itype">Item type:</label>
|
|
<input type="checkbox" class="field-toggle" data-pulldown="itype" value="1" name="itype_enabled" id="itype_enabled" />
|
|
<select id="itype" name="itype" disabled="disabled">
|
|
<option value=""></option>
|
|
|
|
[% FOREACH it IN ItemTypes.Get() %]
|
|
<option value="[% it.itemtype | html %]">[% it.description | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
[% END %]
|
|
|
|
<li>
|
|
<label class="required" for="ccode">Collection:</label>
|
|
<input type="checkbox" class="field-toggle" data-pulldown="ccode" value="1" name="ccode_enabled" id="ccode_enabled" />
|
|
<select id="ccode" name="ccode" disabled="disabled">
|
|
<option value=""></option>
|
|
[% FOREACH c IN AuthorisedValues.Get('CCODE') %]
|
|
<option value="[% c.authorised_value | html %]">[% c.lib | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<label class="required" for="location">Shelving location:</label>
|
|
<input type="checkbox" class="field-toggle" data-pulldown="location" value="1" name="location_enabled" id="location_enabled" />
|
|
<select id="location" name="location" disabled="disabled">
|
|
<option value=""></option>
|
|
[% FOREACH s IN AuthorisedValues.Get('LOC') %]
|
|
<option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<label class="required" for="homebranch">Home library:</label>
|
|
<input type="checkbox" value="1" class="field-toggle" data-pulldown="homebranch" name="homebranch_enabled" id="homebranch_enabled" />
|
|
<select id="homebranch" name="homebranch" disabled="disabled">
|
|
<option value=""></option>
|
|
[% FOREACH b IN Branches.all() %]
|
|
<option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<label class="required" for="holdingbranch">Holding library:</label>
|
|
<input type="checkbox" value="1" class="field-toggle" data-pulldown="holdingbranch" name="holdingbranch_enabled" id="holdingbranch_enabled" />
|
|
<select id="holdingbranch" name="holdingbranch" disabled="disabled">
|
|
<option value=""></option>
|
|
[% FOREACH b IN Branches.all() %]
|
|
<option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="staff_note">Staff note:</label>
|
|
<textarea name="staff_note" id="staff_note">[% course_reserve.staff_note | html %]</textarea>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="public_note">Public note:</label>
|
|
<textarea name="public_note" id="public_note">[% course_reserve.public_note | html %]</textarea>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<p>
|
|
Any items with existing course reserves will have their <em>on reserve</em> values updated.
|
|
</p>
|
|
|
|
<fieldset class="action">
|
|
<input type="submit" value="Submit" class="submit" />
|
|
|
|
<a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | uri %]" class="cancel">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF action == 'display_results' %]
|
|
<h1>Results</h1>
|
|
|
|
<h3>Items added</h3>
|
|
[% IF items_added.size > 0 %]
|
|
<p>The following items were added or updated:</p>
|
|
<ul>
|
|
[% FOREACH i IN items_added %]
|
|
<li>[% i.biblio.title | html %] ( [% i.barcode | html %] )</li>
|
|
[% END %]
|
|
</ul>
|
|
[% ELSE %]
|
|
No valid item barcodes found.
|
|
[% END %]
|
|
|
|
|
|
[% IF invalid_barcodes.size > 0 %]
|
|
<h3>Invalid barcodes</h3>
|
|
<p>The following invalid barcodes were skipped:</p>
|
|
<ul>
|
|
[% FOREACH b IN invalid_barcodes %]
|
|
<li>[% b | html %]</li>
|
|
[% END %]
|
|
</ul>
|
|
[% END %]
|
|
|
|
<p>
|
|
<a class='btn btn-default' href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course_id | html %]">View course</a>
|
|
</p>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
<script>
|
|
//<![CDATA[
|
|
$(document).ready(function(){
|
|
$('.field-toggle').change(function() {
|
|
if( this.checked ) {
|
|
$('#' + $(this).data('pulldown') ).removeAttr('disabled');
|
|
} else {
|
|
$('#' + $(this).data('pulldown') ).val('');
|
|
$('#' + $(this).data('pulldown') ).attr('disabled', 'disabled');
|
|
}
|
|
});
|
|
});
|
|
//]]>
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|
|
|