Bug 12904: Force browser to load new javascript files after upgrade
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / course_reserves / course-reserves.tt
1 [% USE AuthorisedValues %]
2 [% SET footerjs = 1 %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Course reserves</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
8 </head>
9
10 <body id="courses_course_reserves" class="course">
11
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'cat-search.inc' %]
14
15 <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>
16
17 <div id="doc2" class="yui-t7">
18     <div id="bd">
19         <div id="yui-main">
20             <div class="yui-b">
21                 <div class="yui-g">
22                     [% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %]
23                     <div id="toolbar">
24                         <ul class="toolbar">
25                             [% IF ( CAN_user_coursereserves_manage_courses ) %]
26                             <li><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></li>
27                             [% END %]
28                         </ul>
29                     </div><!-- /toolbar -->
30                     [% END %]
31
32                     <!--
33                     <div id="search-toolbar">
34                         <script type="text/javascript">
35                         //<![CDATA[
36                             function submitSearchForm(p_oEvent){
37                                 $('#search_courses_form').submit();
38                             }
39
40                             $(document).ready(function(){
41                                 newCourseButton = new YAHOO.widget.Button("search_courses");
42                                 newCourseButton.on("click", submitSearchForm );
43                             });
44                         //]]>
45                         </script>
46                         <ul class="toolbar">
47                             <li><form id="search_courses_form"><input type="text" name="search_on" id="search_on"></form></li>
48                             <li><a id="search_courses">Search courses</a></li>
49                         </ul>
50                     </div>
51                     -->
52
53                     <h1>Courses</h1>
54                     <table id="course_reserves_table">
55                         <thead>
56                             <tr>
57                                 <th>Name</th>
58                                 <th>Dept.</th>
59                                 <th>Course #</th>
60                                 <th>Section</th>
61                                 <th>Term</th>
62                                 <th>Instructors</th>
63                                 <th>Staff note</th>
64                                 <th>Public note</th>
65                                 <th># of Students</th>
66                                 <th>Enabled</th>
67                             </tr>
68                         </thead>
69
70                         <tbody>
71                             [% FOREACH c IN courses %]
72                                 <tr>
73                                     <td><a href="course-details.pl?course_id=[% c.course_id %]">[% c.course_name %]</a></td>
74                                     <td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department ) %]</td>
75                                     <td>[% c.course_number %]</td>
76                                     <td>[% c.section %]</td>
77                                     <td>[% AuthorisedValues.GetByCode( 'TERM' c.term ) %]</td>
78                                     <td>
79                                         [% FOREACH i IN c.instructors %]
80                                             <div class="instructor"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber %]">[% i.firstname %] [% i.surname %]</a></div>
81                                         [% END %]
82                                     </td>
83                                     <td>[% c.staff_note %]</td>
84                                     <td>[% c.public_note %]</td>
85                                     <td>[% c.students_count %]</td>
86                                     <td>
87                                         [% IF c.enabled == 'yes' %]
88                                             Yes
89                                         [% ELSE %]
90                                             No
91                                         [% END %]
92                                     </td>
93                             [% END %]
94                         </tbody>
95                     </table>
96                 </div>
97             </div>
98         </div>
99     </div>
100 </div>
101
102 [% MACRO jsinclude BLOCK %]
103     [% INCLUDE 'datatables.inc' %]
104     <script type="text/javascript" id="js">
105         $(document).ready(function() {
106             $("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
107                 "sPaginationType": "four_button"
108             }));
109         });
110     </script>
111 [% END %]
112
113 [% INCLUDE 'intranet-bottom.inc' %]