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