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