3 [% USE AuthorisedValues %]
6 [% USE TablesSettings %]
7 [% PROCESS 'i18n.inc' %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Course details for [% course.course_name | html %] › Course reserves › Koha</title>
11 [% INCLUDE 'doc-head-close.inc' %]
21 background-color: #f3f3f3;
23 box-shadow: 0px 1px 1px 0px rgba(50, 50, 50, 0.2);
26 margin: -3px 0 0 -3px;
34 <body id="courses_course_details" class="course">
36 [% WRAPPER 'header.inc' %]
37 [% INCLUDE 'cat-search.inc' %]
40 [% WRAPPER 'sub-header.inc' %]
41 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
44 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
47 <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
50 <a href="#" aria-current="page">
51 Course details for <em>[% course.course_name | html %]</em>
58 <div class="main container-fluid">
60 <div class="col-md-10 col-md-offset-1">
64 [% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %]
66 [% IF CAN_user_coursereserves_add_reserves %]
67 <a class="btn btn-default" id="add_items" href="/cgi-bin/koha/course_reserves/add_items.pl?course_id=[% course.course_id | html %]"><i class="fa fa-plus"></i> Add reserves</a>
68 <a class="btn btn-default" id="add_items" href="/cgi-bin/koha/course_reserves/batch_add_items.pl?course_id=[% course.course_id | html %]"><i class="fa fa-plus"></i> Batch add reserves</a>
70 [% IF CAN_user_coursereserves_delete_reserves && course_reserves %]
71 <a class="btn btn-default" id="rm_items" href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | html %]&action=rm_all"><i class="fa fa-minus"></i> Remove all reserves</a>
73 [% IF ( CAN_user_coursereserves_manage_courses ) %]
74 <a class="btn btn-default" id="edit_course" href="/cgi-bin/koha/course_reserves/course.pl?course_id=[% course.course_id | html %]"><i class="fa fa-pencil"></i> Edit course</a>
76 [% IF ( CAN_user_coursereserves_manage_courses ) %]
77 <a class="btn btn-default" id="delete_course" href="/cgi-bin/koha/course_reserves/mod_course.pl?course_id=[% course.course_id | html %]&action=del"><i class="fa fa-trash"></i> Delete course</a>
79 </div><!-- /toolbar -->
82 <div class="page-section">
86 <li><span class="label">Course name</span> [% course.course_name | html %]</li>
87 <li><span class="label">[% tp('Semester', 'Term') | html %]</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) | html %]</li>
88 <li><span class="label">Department</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) | html %]</li>
89 <li><span class="label">Course number</span> [% course.course_number | html %]</li>
90 <li><span class="label">Section</span> [% course.section | html %]</li>
92 <span class="label">Instructors</span>
93 <div id="instructors">
94 [% FOREACH i IN course.instructors %]
95 <div class="instructor_line">
96 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber | uri %]">[% i.firstname | html %] [% i.surname | html %]</a>
101 <li><span class="label">Staff note</span> [% course.staff_note | html %]</li>
102 <li><span class="label">Public note</span> [% course.public_note | $raw %]</li>
103 <li><span class="label">Student count</span> [% course.students_count | html %]</li>
104 <li><span class="label">Status</span> [% IF course.enabled == 'yes' %]Active[% ELSE %]Inactive[% END %]</li>
107 </div> <!-- /.page-section -->
109 [% IF course_reserves %]
110 <div class="page-section">
111 <table id="course_reserves_table">
114 <th class="anti-the">Title</th>
118 [% IF item_level_itypes %]<th>Item type</th>[% END %]
121 <th>Home library</th>
122 <th>Holding library</th>
126 <th class="NoSort">Other course reserves</th>
128 [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
129 <th class="NoSort noExport">Actions</th>
135 [% FOREACH cr IN course_reserves %]
137 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=cr.biblio %]</a></td>
138 <td>[% cr.biblio.author | html %]</td>
141 <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% cr.item.itemnumber | uri %]&biblionumber=[% cr.biblio.biblionumber | uri %]&bi=[% cr.biblioitem.biblioitemnumber | uri %]">[% cr.item.barcode | html %]</a></td>
145 <td>[% cr.item.itemcallnumber | html %]</td>
146 [% IF item_level_itypes %]
148 [% IF cr.course_item.itype_enabled %]
149 [% IF cr.course_item.enabled == 'yes' %]
150 <strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype ) | html %]</strong>
151 ([% ItemTypes.GetDescription( cr.course_item.itype_storage ) | html %])
153 [% ItemTypes.GetDescription( cr.course_item.itype ) | html %]
154 (<strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype) | html %]</strong>)
158 [% IF cr.item.itype %]
159 ([% ItemTypes.GetDescription( cr.item.itype ) | html %])
165 [% IF cr.course_item.ccode_enabled %]
166 [% IF cr.course_item.enabled == 'yes' %]
167 <strong>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode ) | html %]</strong>
168 [% IF cr.item.ccode %]
169 ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.course_item.ccode_storage ) | html %])
172 [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.course_item.ccode ) | html %]
173 [% IF cr.item.ccode %]
174 (<strong>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode ) | html %]</strong>)
179 [% IF cr.item.ccode %]
180 ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode ) | html %])
185 [% IF cr.course_item.location_enabled %]
186 [% IF cr.course_item.enabled == 'yes' %]
187 <strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong>
188 [% IF cr.item.permanent_location %]
189 ([% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location_storage ) | html %])
192 [% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location ) | html %]
193 [% IF cr.item.permanent_location %]
194 (<strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong>)
199 [% IF cr.item.permanent_location %]
200 ([% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %])
205 [% IF cr.course_item.homebranch_enabled %]
206 [% IF cr.course_item.enabled == 'yes' %]
207 <strong>[% Branches.GetName( cr.item.homebranch ) | html %]</strong>
208 [% IF cr.item.homebranch %]
209 ([% Branches.GetName( cr.course_item.homebranch_storage ) | html %])
212 [% Branches.GetName( cr.course_item.homebranch ) | html %]
213 [% IF cr.item.homebranch %]
214 (<strong>[% Branches.GetName( cr.item.homebranch ) | html %]</strong>)
219 [% IF cr.item.homebranch %]
220 ([% Branches.GetName( cr.item.homebranch ) | html %])
225 [% IF cr.course_item.holdingbranch_enabled %]
226 [% IF cr.course_item.enabled == 'yes' %]
227 <strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong>
228 [% IF cr.item.holdingbranch %]
229 ([% Branches.GetName( cr.course_item.holdingbranch_storage ) | html %])
232 [% Branches.GetName( cr.course_item.holdingbranch ) | html %]
233 [% IF cr.item.holdingbranch %]
234 (<strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong>)
239 [% IF cr.item.holdingbranch %]
240 ([% Branches.GetName( cr.item.holdingbranch ) | html %])
244 [% ELSE # record-level course reserve %]
246 <div class="biblio-level-info">Item information is not available for record-level course reserve</div>
248 <td><!-- Call number --></td>
249 <td><!-- Item type --></td>
250 <td><!-- Collection --></td>
251 <td><!-- Location --></td>
252 <td><!-- Home library --></td>
253 <td><!-- Holding library --></td>
256 <td>[% IF (cr.staff_note) %]
257 [% cr.staff_note | html %]
258 [% ELSIF (cr.item.itemnotes_nonpublic) %]
259 [% cr.item.itemnotes_nonpublic | html %]
262 <td>[% IF (cr.public_note) %]
263 [% cr.public_note | $raw %]
264 [% ELSIF (cr.item.itemnotes) %]
265 [% cr.item.itemnotes | $raw %]
270 [% IF (cr.item.uri) %]
271 <a href="[% cr.item.uri | url %]">Item URI</a>
272 [% ELSIF (cr.biblioitem.url) %]
273 <a href="[% cr.biblioitem.url | url %]">Record URL</a>
278 [% FOREACH c IN cr.courses %]
279 [% UNLESS cr.course_id == c.course_id %]
281 <a href="course-details.pl?course_id=[% c.course_id | uri %]">
282 [% c.course_name | html %]
283 [% IF c.section %] [% c.section | html %] [% END %]
284 [% IF c.term %] [% AuthorisedValues.GetByCode( 'TERM', c.term ) | html %] [% END %]
293 [% IF cr.item.onloan %]
294 <span>Checked out</span>
296 <span>Available</span>
301 [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
303 [% IF CAN_user_coursereserves_add_reserves %]
304 <a class="btn btn-default btn-xs" href="add_items.pl?course_id=[% course.course_id | html %]&itemnumber=[% cr.item.itemnumber | html %]&biblionumber=[% cr.biblio.biblionumber | html %]&action=lookup&return=[% course.course_id | html %]&is_edit=1"><i class="fa fa-pencil"></i> Edit</a>
307 [% IF CAN_user_coursereserves_delete_reserves %]
308 <a class="btn btn-default btn-xs delete_item" href="course-details.pl?course_id=[% course.course_id | html %]&action=del_reserve&cr_id=[% cr.cr_id | html %]">
309 <i class="fa fa-trash"></i> Remove</a>
318 </div> <!-- /.page-section -->
323 [% MACRO jsinclude BLOCK %]
324 [% INCLUDE 'datatables.inc' %]
325 [% INCLUDE 'columns_settings.inc' %]
327 var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
328 $(document).ready(function(){
329 var rtable = KohaTable("course_reserves_table", {
330 "sPaginationType": "full",
334 $(".delete_item").click(function(){
335 return confirmDelete(_("Are you sure you want to remove this item from the course?"));
338 $("#rm_items").click(function(){
339 return confirmDelete(_("Are you sure you want to remove all items from the course?"));
342 $("#delete_course").click(function(){
343 [% SET count = course_reserves.size || 0 %]
345 return confirmDelete(_("Are you sure you want to delete this course? There is %s attached item.").format([% count | html %]) );
346 [% ELSIF count > 1 %]
347 return confirmDelete(_("Are you sure you want to delete this course? There are %s attached items.").format([% count | html %]) );
349 return confirmDelete(_("Are you sure you want to delete this course?"));
352 $(".disabled").tooltip().on("click", function(e){
354 if( $(this).hasClass("checkedout") ){
355 alert(_("This item cannot be removed. It is checked out"));
362 [% INCLUDE 'intranet-bottom.inc' %]