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