Bug 13941: [2/2] Fix <body> tags missing id/class
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / course_reserves / course-details.tt
1 [% USE AuthorisedValues %]
2 [% USE ItemTypes %]
3 [% USE Branches %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Course reserves &rsaquo; Course details for [% course.course_name %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7
8 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
9 [% INCLUDE 'datatables.inc' %]
10 <script type="text/javascript">
11 //<![CDATA[
12     $(document).ready(function(){
13         $("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
14             "sPaginationType": "four_button",
15             "aoColumnDefs": [
16                 { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
17                 { 'sType': "anti-the", 'aTargets' : [ 'antithe'] }
18             ]
19         }));
20
21         $("a.delete_item").click(function(){
22             return confirm( _("Are you sure you want to remove this item from the course?"));
23         });
24
25         $("#delete_course").click(function(){
26             return confirm( _("Are you sure you want to delete this course?") );
27         });
28     });
29
30 //]]>
31 </script>
32
33 </head>
34
35 <body id="courses_course_details" class="course">
36
37 [% INCLUDE 'header.inc' %]
38 [% INCLUDE 'cat-search.inc' %]
39
40 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> &rsaquo; Course details for <i>[% course.course_name %]</i></div>
41
42 <div id="doc2" class="yui-t7">
43     <div id="bd">
44         <div id="yui-main">
45             [% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %]
46             <div id="toolbar">
47                 <ul class="toolbar">
48                     [% IF CAN_user_coursereserves_add_reserves %]<li><a class="btn btn-small" id="add_items" href="/cgi-bin/koha/course_reserves/add_items.pl?course_id=[% course.course_id %]"><i class="icon-plus"></i> Add reserves</a></li>[% END %]
49                     [% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a class="btn btn-small" id="edit_course" href="/cgi-bin/koha/course_reserves/course.pl?course_id=[% course.course_id %]"><i class="icon-pencil"></i> Edit course</a></li>[% END %]
50                     [% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a class="btn btn-small" id="delete_course" href="/cgi-bin/koha/course_reserves/mod_course.pl?course_id=[% course.course_id %]&amp;action=del"><i class="icon-remove"></i> Delete course</a></li>[% END %]
51                 </ul>
52             </div><!-- /toolbar -->
53             [% END %]
54
55             <div class="rows">
56               <ol>
57                 <li><span class="label">Course name</span> [% course.course_name %]</li>
58                 <li><span class="label">Term</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) %]</li>
59                 <li><span class="label">Department</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) %]</li>
60                 <li><span class="label">Course number</span> [% course.course_number %]</li>
61                 <li><span class="label">Section</span> [% course.section %]</li>
62                 <li><span class="label">Instructors</span> [% FOREACH i IN course.instructors %]<div class="instructor"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber %]">[% i.firstname %] [% i.surname %]</a></div>[% END %]</li>
63                 <li><span class="label">Staff note</span> [% course.staff_note %]</li>
64                 <li><span class="label">Public note</span> [% course.public_note %]</li>
65                 <li><span class="label">Student count</span> [% course.students_count %]</li>
66                 <li><span class="label">Status</span> [% IF course.enabled == 'yes' %]Active[% ELSE %]Inactive[% END %]</li>
67               </ol>
68             </div>
69
70             [% IF course_reserves %]
71             <table id="course_reserves_table">
72                 <caption>Reserves</caption>
73                 <thead>
74                     <tr>
75                         <th class="antithe">Title</th>
76                         <th>Barcode</th>
77                         <th>Call number</th>
78                         [% IF item_level_itypes %]<th>Item type</th>[% END %]
79                         <th>Collection</th>
80                         <th>Location</th>
81                         <th>Library</th>
82                         <th>Staff note</th>
83                         <th>Public note</th>
84                         [% IF CAN_user_coursereserves_add_reserves %]<th class="NoSort">&nbsp;<!-- Edit --></th>[% END %]
85                         [% IF CAN_user_coursereserves_delete_reserves %]<th class="NoSort">&nbsp;<!-- Remove --></th>[% END %]
86                         <th class="NoSort">Other course reserves</th>
87                     </tr>
88                 </thead>
89
90                 <tbody>
91                     [% FOREACH cr IN course_reserves %]
92                         <tr>
93                             <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></td>
94                             <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% cr.item.itemnumber %]&amp;biblionumber=[% cr.item.biblionumber %]&amp;bi=[% cr.item.biblioitemnumber %]">[% cr.item.barcode %]</a></td>
95                             <td>[% cr.item.itemcallnumber %]</td>
96                             [% IF item_level_itypes %]
97                             <td>
98                                 [% IF cr.course_item.itype %]
99                                     [% IF cr.course_item.enabled == 'yes' %]
100                                         [% ItemTypes.GetDescription( cr.item.itype ) %]
101                                     [% ELSE %]
102                                         [% ItemTypes.GetDescription( cr.course_item.itype ) %]
103                                     [% END %]
104                                 [% ELSE %]
105                                      <i>Unchanged</i>
106                                      [% IF cr.item.itype %]
107                                          ([% ItemTypes.GetDescription( cr.item.itype ) %])
108                                      [% END %]
109                                 [% END %]
110                             </td>
111                             [% END %]
112                             <td>
113                                  [% IF cr.course_item.ccode %]
114                                      [% IF cr.course_item.enabled == 'yes' %]
115                                           [% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]
116                                      [% ELSE %]
117                                          [% AuthorisedValues.GetByCode( 'CCODE', cr.course_item.ccode ) %]
118                                      [% END %]
119                                  [% ELSE %]
120                                      <i>Unchanged</i>
121                                      [% IF cr.item.ccode %]
122                                          ([% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %])
123                                      [% END %]
124                                  [% END %]
125                             </td>
126                             <td>
127                                 [% IF cr.course_item.location %]
128                                      [% IF cr.course_item.enabled == 'yes' %]
129                                          [% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]
130                                     [% ELSE %]
131                                         [% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location ) %]
132                                     [% END %]
133                                 [% ELSE %]
134                                     <i>Unchanged</i>
135                                     [% IF cr.item.location %]
136                                         ([% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %])
137                                     [% END %]
138                                 [% END %]
139                             </td>
140                             <td>
141                                 [% IF cr.course_item.holdingbranch %]
142                                     [% IF cr.course_item.enabled == 'yes' %]
143                                         [% Branches.GetName( cr.item.holdingbranch ) %]
144                                     [% ELSE %]
145                                         [% Branches.GetName( cr.course_item.holdingbranch ) %]
146                                     [% END %]
147                                 [% ELSE %]
148                                     <i>Unchanged</i>
149                                     [% IF cr.item.holdingbranch %]
150                                         ([% Branches.GetName( cr.item.holdingbranch ) %])
151                                     [% END %]
152                                 [% END %]
153                             </td>
154                             <td>[% cr.staff_note %]</td>
155                             <td>[% cr.public_note %]</td>
156
157                             [% IF CAN_user_coursereserves_add_reserves %]
158                                 <td><a href="add_items.pl?course_id=[% course.course_id %]&amp;barcode=[% cr.item.barcode %]&amp;action=lookup&amp;return=[% course.course_id %]">Edit</a></td>
159                             [% END %]
160
161                             [% IF CAN_user_coursereserves_delete_reserves %]
162                                 <td>
163                                     [% IF cr.item.onloan %]
164                                         Checked out
165                                     [% ELSIF cr.item.itemlost %]
166                                         Item lost
167                                     [% ELSE %]
168                                         <a href="course-details.pl?course_id=[% course.course_id %]&amp;action=del_reserve&amp;cr_id=[% cr.cr_id %]" class="delete_item" >Remove</a>
169                                     [% END %]
170
171                                 </td>
172                             [% END %]
173
174                             <td>
175                                 [% FOREACH c IN cr.courses %]
176                                     [% UNLESS cr.course_id == c.course_id %]
177                                         <p>
178                                             <a href="course-details.pl?course_id=[% c.course_id %]">
179                                                 [% c.course_name %]
180                                                 [% IF c.section %] [% c.section %] [% END %]
181                                                 [% IF c.term %] [% AuthorisedValues.GetByCode( 'TERM', c.term ) %] [% END %]
182                                             </a>
183                                         </p>
184                                     [% END %]
185                                 [% END %]
186                             </td>
187                         </tr>
188                     [% END %]
189                 </tbody>
190             </table>
191             [% END %]
192         </div>
193     </div>
194
195 [% INCLUDE 'intranet-bottom.inc' %]