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' %]
23 <body id="courses_course_details" class="course">
25 [% INCLUDE 'header.inc' %]
26 [% INCLUDE 'cat-search.inc' %]
28 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
31 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
34 <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
37 <a href="#" aria-current="page">
38 Course details for <em>[% course.course_name | html %]</em>
44 <div class="main container-fluid">
46 <div class="col-md-10 col-md-offset-1">
48 [% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %]
50 [% IF CAN_user_coursereserves_add_reserves %]
51 <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>
52 <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>
54 [% IF CAN_user_coursereserves_delete_reserves && course_reserves %]
55 <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>
57 [% IF ( CAN_user_coursereserves_manage_courses ) %]
58 <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>
60 [% IF ( CAN_user_coursereserves_manage_courses ) %]
61 <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>
63 </div><!-- /toolbar -->
68 <li><span class="label">Course name</span> [% course.course_name | html %]</li>
69 <li><span class="label">[% tp('Semester', 'Term') | html %]</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) | html %]</li>
70 <li><span class="label">Department</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) | html %]</li>
71 <li><span class="label">Course number</span> [% course.course_number | html %]</li>
72 <li><span class="label">Section</span> [% course.section | html %]</li>
74 <span class="label">Instructors</span>
75 <div id="instructors">
76 [% FOREACH i IN course.instructors %]
77 <div class="instructor_line">
78 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber | uri %]">[% i.firstname | html %] [% i.surname | html %]</a>
83 <li><span class="label">Staff note</span> [% course.staff_note | html %]</li>
84 <li><span class="label">Public note</span> [% course.public_note | $raw %]</li>
85 <li><span class="label">Student count</span> [% course.students_count | html %]</li>
86 <li><span class="label">Status</span> [% IF course.enabled == 'yes' %]Active[% ELSE %]Inactive[% END %]</li>
90 [% IF course_reserves %]
92 <table id="course_reserves_table">
95 <th class="anti-the">Title</th>
99 [% IF item_level_itypes %]<th>Item type</th>[% END %]
102 <th>Home library</th>
103 <th>Holding library</th>
107 <th class="NoSort">Other course reserves</th>
109 [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
110 <th class="NoSort noExport">Actions</th>
116 [% FOREACH cr IN course_reserves %]
118 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=cr.biblio %]</a></td>
119 <td>[% cr.biblio.author | html %]</td>
122 <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>
123 <td>[% cr.item.itemcallnumber | html %]</td>
124 [% IF item_level_itypes %]
126 [% IF cr.course_item.itype_enabled %]
127 [% IF cr.course_item.enabled == 'yes' %]
128 <strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype ) | html %]</strong>
129 ([% ItemTypes.GetDescription( cr.course_item.itype_storage ) | html %])
131 [% ItemTypes.GetDescription( cr.course_item.itype ) | html %]
132 (<strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype) | html %]</strong>)
136 [% IF cr.item.itype %]
137 ([% ItemTypes.GetDescription( cr.item.itype ) | html %])
143 [% IF cr.course_item.ccode_enabled %]
144 [% IF cr.course_item.enabled == 'yes' %]
145 <strong>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode ) | html %]</strong>
146 [% IF cr.item.ccode %]
147 ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.course_item.ccode_storage ) | html %])
150 [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.course_item.ccode ) | html %]
151 [% IF cr.item.ccode %]
152 (<strong>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode ) | html %]</strong>)
157 [% IF cr.item.ccode %]
158 ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode ) | html %])
163 [% IF cr.course_item.location_enabled %]
164 [% IF cr.course_item.enabled == 'yes' %]
165 <strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong>
166 [% IF cr.item.permanent_location %]
167 ([% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location_storage ) | html %])
170 [% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location ) | html %]
171 [% IF cr.item.permanent_location %]
172 (<strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong>)
177 [% IF cr.item.permanent_location %]
178 ([% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %])
183 [% IF cr.course_item.homebranch_enabled %]
184 [% IF cr.course_item.enabled == 'yes' %]
185 <strong>[% Branches.GetName( cr.item.homebranch ) | html %]</strong>
186 [% IF cr.item.homebranch %]
187 ([% Branches.GetName( cr.course_item.homebranch_storage ) | html %])
190 [% Branches.GetName( cr.course_item.homebranch ) | html %]
191 [% IF cr.item.homebranch %]
192 (<strong>[% Branches.GetName( cr.item.homebranch ) | html %]</strong>)
197 [% IF cr.item.homebranch %]
198 ([% Branches.GetName( cr.item.homebranch ) | html %])
203 [% IF cr.course_item.holdingbranch_enabled %]
204 [% IF cr.course_item.enabled == 'yes' %]
205 <strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong>
206 [% IF cr.item.holdingbranch %]
207 ([% Branches.GetName( cr.course_item.holdingbranch_storage ) | html %])
210 [% Branches.GetName( cr.course_item.holdingbranch ) | html %]
211 [% IF cr.item.holdingbranch %]
212 (<strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong>)
217 [% IF cr.item.holdingbranch %]
218 ([% Branches.GetName( cr.item.holdingbranch ) | html %])
222 [% ELSE # record-level course reserve %]
223 [% IF ( item_level_itypes ) %]
228 <em>Information not available for record-level course reserve</em>
232 <td>[% IF (cr.staff_note) %]
233 [% cr.staff_note | html %]
234 [% ELSIF (cr.item.itemnotes_nonpublic) %]
235 [% cr.item.itemnotes_nonpublic | html %]
238 <td>[% IF (cr.public_note) %]
239 [% cr.public_note | $raw %]
240 [% ELSIF (cr.item.itemnotes) %]
241 [% cr.item.itemnotes | $raw %]
246 [% IF (cr.item.uri) %]
247 <a href="[% cr.item.uri | url %]">Item URI</a>
248 [% ELSIF (cr.biblioitem.url) %]
249 <a href="[% cr.biblioitem.url | url %]">Record URL</a>
254 [% FOREACH c IN cr.courses %]
255 [% UNLESS cr.course_id == c.course_id %]
257 <a href="course-details.pl?course_id=[% c.course_id | uri %]">
258 [% c.course_name | html %]
259 [% IF c.section %] [% c.section | html %] [% END %]
260 [% IF c.term %] [% AuthorisedValues.GetByCode( 'TERM', c.term ) | html %] [% END %]
269 [% IF cr.item.onloan %]
277 [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
279 [% IF CAN_user_coursereserves_add_reserves %]
280 <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>
283 [% IF CAN_user_coursereserves_delete_reserves %]
284 <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 %]">
285 <i class="fa fa-trash"></i> Remove</a>
298 [% MACRO jsinclude BLOCK %]
299 [% INCLUDE 'datatables.inc' %]
300 [% INCLUDE 'columns_settings.inc' %]
302 var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
303 $(document).ready(function(){
304 var rtable = KohaTable("course_reserves_table", {
305 "sPaginationType": "full",
307 }, columns_settings );
309 $(".delete_item").click(function(){
310 return confirmDelete(_("Are you sure you want to remove this item from the course?"));
313 $("#rm_items").click(function(){
314 return confirmDelete(_("Are you sure you want to remove all items from the course?"));
317 $("#delete_course").click(function(){
318 [% SET count = course_reserves.size || 0 %]
320 return confirmDelete(_("Are you sure you want to delete this course? There is %s attached item.").format([% count | html %]) );
321 [% ELSIF count > 1 %]
322 return confirmDelete(_("Are you sure you want to delete this course? There are %s attached items.").format([% count | html %]) );
324 return confirmDelete(_("Are you sure you want to delete this course?"));
327 $(".disabled").tooltip().on("click", function(e){
329 if( $(this).hasClass("checkedout") ){
330 alert(_("This item cannot be removed. It is checked out"));
337 [% INCLUDE 'intranet-bottom.inc' %]