3 [% USE AuthorisedValues %]
6 [% USE ColumnsSettings %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Course reserves › Course details for [% course.course_name | html %]</title>
10 [% INCLUDE 'doc-head-close.inc' %]
22 <body id="courses_course_details" class="course">
24 [% INCLUDE 'header.inc' %]
25 [% INCLUDE 'cat-search.inc' %]
27 <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> › Course details for <i>[% course.course_name | html %]</i></div>
29 <div class="main container-fluid">
31 <div class="col-md-10 col-md-offset-1">
33 [% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %]
35 [% IF CAN_user_coursereserves_add_reserves %]
36 <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>
37 <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>
39 [% IF ( CAN_user_coursereserves_manage_courses ) %]
40 <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>
42 [% IF ( CAN_user_coursereserves_manage_courses ) %]
43 <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>
45 </div><!-- /toolbar -->
50 <li><span class="label">Course name</span> [% course.course_name | html %]</li>
51 <li><span class="label">Term</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) | html %]</li>
52 <li><span class="label">Department</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) | html %]</li>
53 <li><span class="label">Course number</span> [% course.course_number | html %]</li>
54 <li><span class="label">Section</span> [% course.section | html %]</li>
56 <span class="label">Instructors</span>
57 <div id="instructors">
58 [% FOREACH i IN course.instructors %]
59 <div class="instructor_line">
60 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber | uri %]">[% i.firstname | html %] [% i.surname | html %]</a>
65 <li><span class="label">Staff note</span> [% course.staff_note | html %]</li>
66 <li><span class="label">Public note</span> [% course.public_note | $raw %]</li>
67 <li><span class="label">Student count</span> [% course.students_count | html %]</li>
68 <li><span class="label">Status</span> [% IF course.enabled == 'yes' %]Active[% ELSE %]Inactive[% END %]</li>
72 [% IF course_reserves %]
74 <table id="course_reserves_table">
77 <th class="antithe">Title</th>
81 [% IF item_level_itypes %]<th>Item type</th>[% END %]
85 <th>Holding library</th>
89 <th class="NoSort">Other course reserves</th>
91 [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
92 <th class="NoSort">Actions</th>
98 [% FOREACH cr IN course_reserves %]
100 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=cr.biblio %]</a></td>
101 <td>[% cr.biblio.author | html %]</td>
102 <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>
103 <td>[% cr.item.itemcallnumber | html %]</td>
104 [% IF item_level_itypes %]
106 [% IF cr.course_item.itype_enabled %]
107 [% IF cr.course_item.enabled == 'yes' %]
108 <strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype ) | html %]</strong>
109 ([% ItemTypes.GetDescription( cr.course_item.itype_storage ) | html %])
111 [% ItemTypes.GetDescription( cr.course_item.itype ) | html %]
112 (<strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype) | html %]</strong>)
116 [% IF cr.item.itype %]
117 ([% ItemTypes.GetDescription( cr.item.itype ) | html %])
123 [% IF cr.course_item.ccode_enabled %]
124 [% IF cr.course_item.enabled == 'yes' %]
125 <strong>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %]</strong>
126 [% IF cr.item.ccode %]
127 ([% AuthorisedValues.GetByCode( 'CCODE', cr.course_item.ccode_storage ) | html %])
130 [% AuthorisedValues.GetByCode( 'CCODE', cr.course_item.ccode ) | html %]
131 [% IF cr.item.ccode %]
132 (<strong>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %]</strong>)
137 [% IF cr.item.ccode %]
138 ([% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %])
143 [% IF cr.course_item.location_enabled %]
144 [% IF cr.course_item.enabled == 'yes' %]
145 <strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong>
146 [% IF cr.item.permanent_location %]
147 ([% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location_storage ) | html %])
150 [% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location ) | html %]
151 [% IF cr.item.permanent_location %]
152 (<strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong>)
157 [% IF cr.item.permanent_location %]
158 ([% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %])
163 [% IF cr.course_item.homebranch_enabled %]
164 [% IF cr.course_item.enabled == 'yes' %]
165 <strong>[% Branches.GetName( cr.item.homebranch ) | html %]</strong>
166 [% IF cr.item.homebranch %]
167 ([% Branches.GetName( cr.course_item.homebranch_storage ) | html %])
170 [% Branches.GetName( cr.course_item.homebranch ) | html %]
171 [% IF cr.item.homebranch %]
172 (<strong>[% Branches.GetName( cr.item.homebranch ) | html %]</strong>)
177 [% IF cr.item.homebranch %]
178 ([% Branches.GetName( cr.item.homebranch ) | html %])
183 [% IF cr.course_item.holdingbranch_enabled %]
184 [% IF cr.course_item.enabled == 'yes' %]
185 <strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong>
186 [% IF cr.item.holdingbranch %]
187 ([% Branches.GetName( cr.course_item.holdingbranch_storage ) | html %])
190 [% Branches.GetName( cr.course_item.holdingbranch ) | html %]
191 [% IF cr.item.holdingbranch %]
192 (<strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong>)
197 [% IF cr.item.holdingbranch %]
198 ([% Branches.GetName( cr.item.holdingbranch ) | html %])
202 <td>[% IF (cr.staff_note) %]
203 [% cr.staff_note | html %]
204 [% ELSIF (cr.item.itemnotes_nonpublic) %]
205 [% cr.item.itemnotes_nonpublic | html %]
208 <td>[% IF (cr.public_note) %]
209 [% cr.public_note | $raw %]
210 [% ELSIF (cr.item.itemnotes) %]
211 [% cr.item.itemnotes | $raw %]
216 [% IF (cr.item.uri) %]
217 <a href="[% cr.item.uri | url %]">Item URI</a>
218 [% ELSIF (cr.biblioitem.url) %]
219 <a href="[% cr.biblioitem.url | url %]">Record URL</a>
224 [% FOREACH c IN cr.courses %]
225 [% UNLESS cr.course_id == c.course_id %]
227 <a href="course-details.pl?course_id=[% c.course_id | uri %]">
228 [% c.course_name | html %]
229 [% IF c.section %] [% c.section | html %] [% END %]
230 [% IF c.term %] [% AuthorisedValues.GetByCode( 'TERM', c.term ) | html %] [% END %]
239 [% IF cr.item.onloan %]
247 [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
249 [% IF CAN_user_coursereserves_add_reserves %]
250 <a class="btn btn-default btn-xs" href="add_items.pl?course_id=[% course.course_id | html %]&itemnumber=[% cr.item.itemnumber | html %]&action=lookup&return=[% course.course_id | html %]&is_edit=1"><i class="fa fa-pencil"></i> Edit</a>
253 [% IF CAN_user_coursereserves_delete_reserves %]
254 <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 %]">
255 <i class="fa fa-trash"></i> Remove</a>
268 [% MACRO jsinclude BLOCK %]
269 [% INCLUDE 'datatables.inc' %]
270 [% INCLUDE 'columns_settings.inc' %]
272 var columns_settings = [% ColumnsSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
273 $(document).ready(function(){
274 var rtable = KohaTable("course_reserves_table", {
275 "sPaginationType": "full",
278 { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
279 { 'sType': "anti-the", 'aTargets' : [ 'antithe'] }
281 }, columns_settings );
283 $(".delete_item").click(function(){
284 return confirmDelete(_("Are you sure you want to remove this item from the course?"));
287 $("#delete_course").click(function(){
288 [% SET count = course_reserves.size || 0 %]
290 return confirmDelete(_("Are you sure you want to delete this course? There is %s attached item.").format([% count | html %]) );
291 [% ELSIF count > 1 %]
292 return confirmDelete(_("Are you sure you want to delete this course? There are %s attached items.").format([% count | html %]) );
294 return confirmDelete(_("Are you sure you want to delete this course?"));
297 $(".disabled").tooltip().on("click", function(e){
299 if( $(this).hasClass("checkedout") ){
300 alert(_("This item cannot be removed. It is checked out"));
307 [% INCLUDE 'intranet-bottom.inc' %]