3 [% USE AuthorisedValues %]
6 [% USE TablesSettings %]
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 <em>[% course.course_name | html %]</em></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_delete_reserves && course_reserves %]
40 <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>
42 [% IF ( CAN_user_coursereserves_manage_courses ) %]
43 <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>
45 [% IF ( CAN_user_coursereserves_manage_courses ) %]
46 <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>
48 </div><!-- /toolbar -->
53 <li><span class="label">Course name</span> [% course.course_name | html %]</li>
54 <li><span class="label">Term</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) | html %]</li>
55 <li><span class="label">Department</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) | html %]</li>
56 <li><span class="label">Course number</span> [% course.course_number | html %]</li>
57 <li><span class="label">Section</span> [% course.section | html %]</li>
59 <span class="label">Instructors</span>
60 <div id="instructors">
61 [% FOREACH i IN course.instructors %]
62 <div class="instructor_line">
63 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber | uri %]">[% i.firstname | html %] [% i.surname | html %]</a>
68 <li><span class="label">Staff note</span> [% course.staff_note | html %]</li>
69 <li><span class="label">Public note</span> [% course.public_note | $raw %]</li>
70 <li><span class="label">Student count</span> [% course.students_count | html %]</li>
71 <li><span class="label">Status</span> [% IF course.enabled == 'yes' %]Active[% ELSE %]Inactive[% END %]</li>
75 [% IF course_reserves %]
77 <table id="course_reserves_table">
80 <th class="anti-the">Title</th>
84 [% IF item_level_itypes %]<th>Item type</th>[% END %]
88 <th>Holding library</th>
92 <th class="NoSort">Other course reserves</th>
94 [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
95 <th class="NoSort">Actions</th>
101 [% FOREACH cr IN course_reserves %]
103 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=cr.biblio %]</a></td>
104 <td>[% cr.biblio.author | html %]</td>
105 <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>
106 <td>[% cr.item.itemcallnumber | html %]</td>
107 [% IF item_level_itypes %]
109 [% IF cr.course_item.itype_enabled %]
110 [% IF cr.course_item.enabled == 'yes' %]
111 <strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype ) | html %]</strong>
112 ([% ItemTypes.GetDescription( cr.course_item.itype_storage ) | html %])
114 [% ItemTypes.GetDescription( cr.course_item.itype ) | html %]
115 (<strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype) | html %]</strong>)
119 [% IF cr.item.itype %]
120 ([% ItemTypes.GetDescription( cr.item.itype ) | html %])
126 [% IF cr.course_item.ccode_enabled %]
127 [% IF cr.course_item.enabled == 'yes' %]
128 <strong>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorized_value => cr.item.ccode ) | html %]</strong>
129 [% IF cr.item.ccode %]
130 ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', cr.course_item.ccode_storage ) | html %])
133 [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', cr.course_item.ccode ) | html %]
134 [% IF cr.item.ccode %]
135 (<strong>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', cr.item.ccode ) | html %]</strong>)
140 [% IF cr.item.ccode %]
141 ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', cr.item.ccode ) | html %])
146 [% IF cr.course_item.location_enabled %]
147 [% IF cr.course_item.enabled == 'yes' %]
148 <strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong>
149 [% IF cr.item.permanent_location %]
150 ([% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location_storage ) | html %])
153 [% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location ) | html %]
154 [% IF cr.item.permanent_location %]
155 (<strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong>)
160 [% IF cr.item.permanent_location %]
161 ([% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %])
166 [% IF cr.course_item.homebranch_enabled %]
167 [% IF cr.course_item.enabled == 'yes' %]
168 <strong>[% Branches.GetName( cr.item.homebranch ) | html %]</strong>
169 [% IF cr.item.homebranch %]
170 ([% Branches.GetName( cr.course_item.homebranch_storage ) | html %])
173 [% Branches.GetName( cr.course_item.homebranch ) | html %]
174 [% IF cr.item.homebranch %]
175 (<strong>[% Branches.GetName( cr.item.homebranch ) | html %]</strong>)
180 [% IF cr.item.homebranch %]
181 ([% Branches.GetName( cr.item.homebranch ) | html %])
186 [% IF cr.course_item.holdingbranch_enabled %]
187 [% IF cr.course_item.enabled == 'yes' %]
188 <strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong>
189 [% IF cr.item.holdingbranch %]
190 ([% Branches.GetName( cr.course_item.holdingbranch_storage ) | html %])
193 [% Branches.GetName( cr.course_item.holdingbranch ) | html %]
194 [% IF cr.item.holdingbranch %]
195 (<strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong>)
200 [% IF cr.item.holdingbranch %]
201 ([% Branches.GetName( cr.item.holdingbranch ) | html %])
205 <td>[% IF (cr.staff_note) %]
206 [% cr.staff_note | html %]
207 [% ELSIF (cr.item.itemnotes_nonpublic) %]
208 [% cr.item.itemnotes_nonpublic | html %]
211 <td>[% IF (cr.public_note) %]
212 [% cr.public_note | $raw %]
213 [% ELSIF (cr.item.itemnotes) %]
214 [% cr.item.itemnotes | $raw %]
219 [% IF (cr.item.uri) %]
220 <a href="[% cr.item.uri | url %]">Item URI</a>
221 [% ELSIF (cr.biblioitem.url) %]
222 <a href="[% cr.biblioitem.url | url %]">Record URL</a>
227 [% FOREACH c IN cr.courses %]
228 [% UNLESS cr.course_id == c.course_id %]
230 <a href="course-details.pl?course_id=[% c.course_id | uri %]">
231 [% c.course_name | html %]
232 [% IF c.section %] [% c.section | html %] [% END %]
233 [% IF c.term %] [% AuthorisedValues.GetByCode( 'TERM', c.term ) | html %] [% END %]
242 [% IF cr.item.onloan %]
250 [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
252 [% IF CAN_user_coursereserves_add_reserves %]
253 <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>
256 [% IF CAN_user_coursereserves_delete_reserves %]
257 <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 %]">
258 <i class="fa fa-trash"></i> Remove</a>
271 [% MACRO jsinclude BLOCK %]
272 [% INCLUDE 'datatables.inc' %]
273 [% INCLUDE 'columns_settings.inc' %]
275 var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
276 $(document).ready(function(){
277 var rtable = KohaTable("course_reserves_table", {
278 "sPaginationType": "full",
280 }, columns_settings );
282 $(".delete_item").click(function(){
283 return confirmDelete(_("Are you sure you want to remove this item from the course?"));
286 $("#rm_items").click(function(){
287 return confirmDelete(_("Are you sure you want to remove all items from the course?"));
290 $("#delete_course").click(function(){
291 [% SET count = course_reserves.size || 0 %]
293 return confirmDelete(_("Are you sure you want to delete this course? There is %s attached item.").format([% count | html %]) );
294 [% ELSIF count > 1 %]
295 return confirmDelete(_("Are you sure you want to delete this course? There are %s attached items.").format([% count | html %]) );
297 return confirmDelete(_("Are you sure you want to delete this course?"));
300 $(".disabled").tooltip().on("click", function(e){
302 if( $(this).hasClass("checkedout") ){
303 alert(_("This item cannot be removed. It is checked out"));
310 [% INCLUDE 'intranet-bottom.inc' %]