b1887b69c8611f068b8a2a42616d34583c696e7c
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / course_reserves / course-reserves.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Course reserves</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8
9 [% Asset.css("css/datatables.css") | $raw %]
10 </head>
11
12 <body id="courses_course_reserves" class="course">
13
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'cat-search.inc' %]
16
17 <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>
18
19     <div class="main container-fluid">
20         <div class="row">
21             <div class="col-md-8 col-md-offset-2">
22
23                     [% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %]
24                     <div id="toolbar">
25                         [% IF ( CAN_user_coursereserves_manage_courses ) %]
26                             <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>
27                         [% END %]
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 | html %]">[% c.course_name | html %]</a></td>
73                                     <td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department ) | html %]</td>
74                                     <td>[% c.course_number | html %]</td>
75                                     <td>[% c.section | html %]</td>
76                                     <td>[% AuthorisedValues.GetByCode( 'TERM' c.term ) | html %]</td>
77                                     <td>
78                                         [% FOREACH i IN c.instructors %]
79                                             <div class="instructor"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber | html %]">[% i.firstname | html %] [% i.surname | html %]</a></div>
80                                         [% END %]
81                                     </td>
82                                     <td>[% c.staff_note | html %]</td>
83                                     <td>[% c.public_note | html %]</td>
84                                     <td>[% c.students_count | html %]</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' %]