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