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