68998c20aad82b4a421869d71bdd40d46efb8c15
[koha_ffzg] / koha-tmpl / intranet-tmpl / prog / en / modules / course_reserves / batch_add_items.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Course reserves &rsaquo; Add items</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 </head>
5 <body id="courses_add_items_step1" class="course">
6
7 [% INCLUDE 'header.inc' %]
8 [% INCLUDE 'cat-search.inc' %]
9
10 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> &rsaquo; Add reserves for <i><a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id %]">[% course.course_name %]</a></i></div>
11
12 <div class="main container-fluid">
13     <div class="row">
14         <div class="col-md-8 col-md-offset-2">
15
16         [% IF action == 'display_form' %]
17             <form method="post" action="/cgi-bin/koha/course_reserves/batch_add_items.pl">
18                 <input type="hidden" name="course_id" value="[% course.course_id %]" />
19                 <input type="hidden" name="action" value="add" />
20
21                 <fieldset class="rows">
22                     <legend>Add items: scan barcodes</legend>
23                     <ol>
24                         <li>
25                             <label class="required" for="barcodes">Item barcodes:</label>
26                             <textarea rows="20" cols="50" id="barcodes" name="barcodes" class="focus"></textarea>
27                         </li>
28                         [% IF item_level_itypes %]
29                         <li>
30                             <label class="required" for="itype">Item type:</label>
31                             <select id="itype" name="itype">
32                                 <option value="">LEAVE UNCHANGED</option>
33
34                                 [% FOREACH it IN itypes %]
35                                     [% IF course_item.itype && ( ( course.enabled == 'yes' && it.itemtype == item.itype ) || ( course.enabled == 'no' && it.itemtype == course_item.itype ) ) %]
36                                         <option value="[% it.itemtype %]" selected="selected">[% it.description %]</option>
37                                     [% ELSE %]
38                                         <option value="[% it.itemtype %]">[% it.description %]</option>
39                                     [% END %]
40                                 [% END %]
41                             </select>
42                         </li>
43                         [% END %]
44
45                         <li>
46                             <label class="required" for="ccode">Collection code:</label>
47                             <select id="ccode" name="ccode">
48                                 <option value="">LEAVE UNCHANGED</option>
49
50                                 [% FOREACH c IN ccodes %]
51                                     [% IF course_item.ccode && ( ( course.enabled == 'yes' && c.authorised_value == item.ccode ) || ( course.enabled == 'no' && c.authorised_value == course_item.ccode ) ) %]
52                                         <option value="[% c.authorised_value %]" selected="selected">[% c.lib %]</option>
53                                     [% ELSE %]
54                                         <option value="[% c.authorised_value %]">[% c.lib %]</option>
55                                     [% END %]
56                                 [% END %]
57                             </select>
58                         </li>
59
60                         <li>
61                             <label class="required" for="location">Shelving location:</label>
62                             <select id="location" name="location">
63                                 <option value="">LEAVE UNCHANGED</option>
64
65                                 [% FOREACH s IN locations %]
66                                     [% IF course_item.location && ( ( course.enabled == 'yes' && s.authorised_value == item.location ) || ( course.enabled == 'no' && s.authorised_value == course_item.location ) ) %]
67                                         <option value="[% s.authorised_value %]" selected="selected">[% s.lib %]</option>
68                                     [% ELSE %]
69                                         <option value="[% s.authorised_value %]">[% s.lib %]</option>
70                                     [% END %]
71                                 [% END %]
72                             </select>
73                         </li>
74
75                         <li>
76                             <label class="required" for="holdingbranch">Holding library:</label>
77                             <select id="holdingbranch" name="holdingbranch">
78                                 <option value="">LEAVE UNCHANGED</option>
79                                 [% FOREACH b IN Branches.all() %]
80                                     [% IF course_item.holdingbranch && ( ( course.enabled == 'yes' && b.value == item.holdingbranch ) || ( course.enabled == 'no' && b.value == course_item.holdingbranch ) ) %]
81                                         <option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option>
82                                     [% ELSE %]
83                                         <option value="[% b.branchcode %]">[% b.branchname %]</option>
84                                     [% END %]
85                                 [% END %]
86                             </select>
87                         </li>
88
89                         <li>
90                             <label for="staff_note">Staff note:</label>
91                             <textarea name="staff_note" id="staff_note">[% course_reserve.staff_note %]</textarea>
92                         </li>
93
94                         <li>
95                             <label for="public_note">Public note:</label>
96                             <textarea name="public_note" id="public_note">[% course_reserve.public_note %]</textarea>
97                         </li>
98                     </ol>
99                 </fieldset>
100
101                 <p>
102                     Any items with existing course reserves will have their <i>on reserve</i> values updated.
103                 </p>
104
105                 <fieldset class="action">
106                     <input type="submit" value="Submit" class="submit" />
107
108                     <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id %]" class="cancel">Cancel</a>
109                 </fieldset>
110             </form>
111         [% END %]
112
113         [% IF action == 'display_results' %]
114             <h1>Results</h1>
115
116             <h3>Items added</h3>
117             [% IF items_added.size > 0 %]
118                 <p>The following items were added or updated:</p>
119                 <ul>
120                     [% FOREACH i IN items_added %]
121                         <li>[% i.biblio.title %] ( [% i.barcode %] )</li>
122                     [% END %]
123                 </ul>
124             [% ELSE %]
125                 No valid item barcodes found.
126             [% END %]
127
128
129             [% IF invalid_barcodes.size > 0 %]
130                 <h3>Invalid barcodes</h3>
131                 <p>The following invalid barcodes were skipped:</p>
132                 <ul>
133                     [% FOREACH b IN invalid_barcodes %]
134                         <li>[% b %]</li>
135                     [% END %]
136                 </ul>
137             [% END %]
138
139             <p>
140                 <a class='btn btn-default' href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course_id %]">View course</a>
141             </p>
142         [% END %]
143     </div>
144 </div>
145
146 [% INCLUDE 'intranet-bottom.inc' %]