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 %]
88 <th class="NoSort">Other course reserves</th>
90 [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
91 <th class="NoSort">Actions</th>
97 [% FOREACH cr IN course_reserves %]
99 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=cr.biblio %]</a></td>
100 <td>[% cr.biblio.author | html %]</td>
101 <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>
102 <td>[% cr.item.itemcallnumber | html %]</td>
103 [% IF item_level_itypes %]
105 [% IF cr.course_item.itype_enabled %]
106 [% IF cr.course_item.enabled == 'yes' %]
107 <strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype ) | html %]</strong>
108 ([% ItemTypes.GetDescription( cr.course_item.itype_storage ) | html %])
110 [% ItemTypes.GetDescription( cr.course_item.itype ) | html %]
111 (<strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype) | html %]</strong>)
115 [% IF cr.item.itype %]
116 ([% ItemTypes.GetDescription( cr.item.itype ) | html %])
122 [% IF cr.course_item.ccode_enabled %]
123 [% IF cr.course_item.enabled == 'yes' %]
124 <strong>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %]</strong>
125 [% IF cr.item.ccode %]
126 ([% AuthorisedValues.GetByCode( 'CCODE', cr.course_item.ccode_storage ) | html %])
129 [% AuthorisedValues.GetByCode( 'CCODE', cr.course_item.ccode ) | html %]
130 [% IF cr.item.ccode %]
131 (<strong>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %]</strong>)
136 [% IF cr.item.ccode %]
137 ([% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %])
142 [% IF cr.course_item.location_enabled %]
143 [% IF cr.course_item.enabled == 'yes' %]
144 <strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong>
145 [% IF cr.item.permanent_location %]
146 ([% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location_storage ) | html %])
149 [% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location ) | html %]
150 [% IF cr.item.permanent_location %]
151 (<strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong>)
156 [% IF cr.item.permanent_location %]
157 ([% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %])
162 [% IF cr.course_item.holdingbranch_enabled %]
163 [% IF cr.course_item.enabled == 'yes' %]
164 <strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong>
165 [% IF cr.item.holdingbranch %]
166 ([% Branches.GetName( cr.course_item.holdingbranch_storage ) | html %])
169 [% Branches.GetName( cr.course_item.holdingbranch ) | html %]
170 [% IF cr.item.holdingbranch %]
171 (<strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong>)
176 [% IF cr.item.holdingbranch %]
177 ([% Branches.GetName( cr.item.holdingbranch ) | html %])
181 <td>[% IF (cr.staff_note) %]
182 [% cr.staff_note | html %]
183 [% ELSIF (cr.item.itemnotes_nonpublic) %]
184 [% cr.item.itemnotes_nonpublic | html %]
187 <td>[% IF (cr.public_note) %]
188 [% cr.public_note | $raw %]
189 [% ELSIF (cr.item.itemnotes) %]
190 [% cr.item.itemnotes | $raw %]
195 [% IF (cr.item.uri) %]
196 <a href="[% cr.item.uri | url %]">Item URI</a>
197 [% ELSIF (cr.biblioitem.url) %]
198 <a href="[% cr.biblioitem.url | url %]">Record URL</a>
203 [% FOREACH c IN cr.courses %]
204 [% UNLESS cr.course_id == c.course_id %]
206 <a href="course-details.pl?course_id=[% c.course_id | uri %]">
207 [% c.course_name | html %]
208 [% IF c.section %] [% c.section | html %] [% END %]
209 [% IF c.term %] [% AuthorisedValues.GetByCode( 'TERM', c.term ) | html %] [% END %]
218 [% IF cr.item.onloan %]
226 [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
228 [% IF CAN_user_coursereserves_add_reserves %]
229 <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>
232 [% IF CAN_user_coursereserves_delete_reserves %]
233 <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 %]">
234 <i class="fa fa-trash"></i> Remove</a>
247 [% MACRO jsinclude BLOCK %]
248 [% INCLUDE 'datatables.inc' %]
249 [% INCLUDE 'columns_settings.inc' %]
251 var columns_settings = [% ColumnsSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
252 $(document).ready(function(){
253 var rtable = KohaTable("course_reserves_table", {
254 "sPaginationType": "full",
257 { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
258 { 'sType': "anti-the", 'aTargets' : [ 'antithe'] }
260 }, columns_settings );
262 $(".delete_item").click(function(){
263 return confirmDelete(_("Are you sure you want to remove this item from the course?"));
266 $("#delete_course").click(function(){
267 [% SET count = course_reserves.size || 0 %]
269 return confirmDelete(_("Are you sure you want to delete this course? There is %s attached item.").format([% count | html %]) );
270 [% ELSIF count > 1 %]
271 return confirmDelete(_("Are you sure you want to delete this course? There are %s attached items.").format([% count | html %]) );
273 return confirmDelete(_("Are you sure you want to delete this course?"));
276 $(".disabled").tooltip().on("click", function(e){
278 if( $(this).hasClass("checkedout") ){
279 alert(_("This item cannot be removed. It is checked out"));
286 [% INCLUDE 'intranet-bottom.inc' %]