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