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