Bug 21501: Remove dead code from course reserves module
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / course_reserves / course-reserves.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% USE ColumnsSettings %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Course reserves</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9
10 [% Asset.css("css/datatables.css") | $raw %]
11 </head>
12
13 <body id="courses_course_reserves" class="course">
14
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'cat-search.inc' %]
17
18 <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></div>
19
20     <div class="main container-fluid">
21         <div class="row">
22             <div class="col-md-10 col-md-offset-1">
23
24                     [% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %]
25                     <div id="toolbar">
26                         [% IF ( CAN_user_coursereserves_manage_courses ) %]
27                             <a class="btn btn-default btn-sm" id="new_course" href="/cgi-bin/koha/course_reserves/course.pl"><i class="fa fa-plus"></i> New course</a>
28                         [% END %]
29                     </div><!-- /toolbar -->
30                     [% END %]
31
32                     <h1>Courses</h1>
33                     <table id="course_reserves_table">
34                         <thead>
35                             <tr>
36                                 <th>Name</th>
37                                 <th>Dept.</th>
38                                 <th>Course #</th>
39                                 <th>Section</th>
40                                 <th>Term</th>
41                                 <th>Instructors</th>
42                                 <th>Staff note</th>
43                                 <th>Public note</th>
44                                 <th># of Students</th>
45                                 <th>Enabled</th>
46                             </tr>
47                         </thead>
48
49                         <tbody>
50                             [% FOREACH c IN courses %]
51                                 <tr>
52                                     <td><a href="course-details.pl?course_id=[% c.course_id | uri %]">[% c.course_name | html %]</a></td>
53                                     <td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department ) | html %]</td>
54                                     <td>[% c.course_number | html %]</td>
55                                     <td>[% c.section | html %]</td>
56                                     <td>[% AuthorisedValues.GetByCode( 'TERM' c.term ) | html %]</td>
57                                     <td>
58                                         [% FOREACH i IN c.instructors %]
59                                             <div class="instructor"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber | uri %]">[% i.firstname | html %] [% i.surname | html %]</a></div>
60                                         [% END %]
61                                     </td>
62                                     <td>[% c.staff_note | html %]</td>
63                                     <td>[% c.public_note | html %]</td>
64                                     <td>[% c.students_count | html %]</td>
65                                     <td>
66                                         [% IF c.enabled == 'yes' %]
67                                             Yes
68                                         [% ELSE %]
69                                             No
70                                         [% END %]
71                                     </td>
72                             [% END %]
73                         </tbody>
74                     </table>
75
76             </div>
77         </div>
78
79 [% MACRO jsinclude BLOCK %]
80     [% INCLUDE 'datatables.inc' %]
81     [% INCLUDE 'columns_settings.inc' %]
82     <script>
83         var columns_settings = [% ColumnsSettings.GetColumns( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
84         $(document).ready(function() {
85             var ctable = KohaTable("course_reserves_table", {
86                 "sPaginationType": "four_button",
87                 "bAutoWidth": false
88             }, columns_settings );
89         });
90     </script>
91 [% END %]
92
93 [% INCLUDE 'intranet-bottom.inc' %]