Bug 26234: Teach our KohaTable constructor the specific th classes
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-course-reserves.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE AuthorisedValues %]
5 [% USE TablesSettings %]
6
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Courses</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% BLOCK cssinclude %]
11     [% Asset.css("css/datatables.css") | $raw %]
12 [% END %]
13
14 </head>
15 [% INCLUDE 'bodytag.inc' bodyid='opac-course-reserves' %]
16 [% INCLUDE 'masthead.inc' %]
17
18 <div class="main">
19     <ul class="breadcrumb">
20         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
21         <li><a href="#">Course reserves</a></li>
22     </ul>
23
24     <div class="container-fluid">
25         <div class="row-fluid">
26             <div class="span12">
27                 <div id="courses" class="maincontent">
28                     <h1>Courses</h1>
29
30                     <table id="course_reserves_table" class="table table-bordered table-striped table-condensed">
31                         <thead>
32                             <tr>
33                                 <th>Name</th>
34                                 <th>Dept.</th>
35                                 <th>Course #</th>
36                                 <th>Section</th>
37                                 <th>Term</th>
38                                 <th>Instructors</th>
39                                 <th>Notes</th>
40                             </tr>
41                         </thead>
42
43                         <tbody>
44                             [% FOREACH c IN courses %]
45                                 <tr>
46                                     <td><a href="opac-course-details.pl?course_id=[% c.course_id | uri %]">[% c.course_name | html %]</a></td>
47                                     <td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department, 1 ) | html %]</td>
48                                     <td>[% c.course_number | html %]</td>
49                                     <td>[% c.section | html %]</td>
50                                     <td>[% AuthorisedValues.GetByCode( 'TERM' c.term, 1 ) | html %]</td>
51                                     <td>
52                                       [% FOREACH i IN c.instructors %]
53                                           <div class="instructor"><span class="inst_surname">[% i.surname | html %]</span>[% IF i.firstname %]<span class="instr_separator">, </span><span class="instr_firstname">[% i.firstname | html %]</span>[% END %]</div>
54                                       [% END %]
55                                     </td>
56                                     <td>[% c.public_note | $raw %]</td>
57                             [% END %]
58                         </tbody>
59                     </table>
60                 </div> <!-- / #courses -->
61             </div> <!-- / .span12 -->
62         </div> <!-- / .row-fluid -->
63     </div> <!-- / .container-fluid -->
64 </div> <!-- / .main -->
65 [% INCLUDE 'opac-bottom.inc' %]
66 [% BLOCK jsinclude %]
67     [% INCLUDE 'datatables.inc' %]
68     [% INCLUDE 'columns_settings.inc' %]
69     <script>
70
71     $(document).ready(function() {
72         columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course_reserves_table', 'json' ) | $raw %]
73
74         KohaTable("#course_reserves_table", {
75             "dom": '<"top"flp>rt<"clear">',
76             "sorting": [[ 1, "asc" ]],
77             "autoWidth": false,
78             "asColumnDefs": [
79                 { "aTargets": [ 1 ], "sType": "nsb-nse" },
80             ]
81         }, columns_settings );
82     });
83
84     </script>
85 [% END %]