Bug 27846: clubs, course_reserves, errors and ill folders
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / course_reserves / course-reserves.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% USE TablesSettings %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Course reserves</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9
10 </head>
11
12 <body id="courses_course_reserves" class="course">
13
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'cat-search.inc' %]
16
17 <nav aria-label="Breadcrumb" class="breadcrumb">
18     <ol>
19         <li>
20             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21         </li>
22         <li>
23             <a href="#" aria-current="page">Course reserves</a>
24         </li>
25     </ol>
26 </nav>
27
28     <div class="main container-fluid">
29         <div class="row">
30             <div class="col-md-10 col-md-offset-1">
31
32                     [% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_delete_reserves %]
33                     <div id="toolbar">
34                         [% IF ( CAN_user_coursereserves_manage_courses ) %]
35                             <a class="btn btn-default" id="new_course" href="/cgi-bin/koha/course_reserves/course.pl"><i class="fa fa-plus"></i> New course</a>
36                         [% END %]
37                         [% IF ( CAN_user_coursereserves_delete_reserves ) %]
38                             <a class="btn btn-default" id="batch_rm" href="/cgi-bin/koha/course_reserves/batch_rm_items.pl"><i class="fa fa-minus"></i> Batch remove reserves</a>
39                         [% END %]
40                     </div><!-- /toolbar -->
41                     [% END %]
42
43                     <h1>Courses</h1>
44                     <table id="course_reserves_table">
45                         <thead>
46                             <tr>
47                                 <th>Name</th>
48                                 <th>Dept.</th>
49                                 <th>Course #</th>
50                                 <th>Section</th>
51                                 <th>Term</th>
52                                 <th>Instructors</th>
53                                 <th>Staff note</th>
54                                 <th>Public note</th>
55                                 <th># of students</th>
56                                 <th>Enabled</th>
57                             </tr>
58                         </thead>
59
60                         <tbody>
61                             [% FOREACH c IN courses %]
62                                 <tr>
63                                     <td><a href="course-details.pl?course_id=[% c.course_id | uri %]">[% c.course_name | html %]</a></td>
64                                     <td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department ) | html %]</td>
65                                     <td>[% c.course_number | html %]</td>
66                                     <td>[% c.section | html %]</td>
67                                     <td>[% AuthorisedValues.GetByCode( 'TERM' c.term ) | html %]</td>
68                                     <td>
69                                         [% FOREACH i IN c.instructors %]
70                                             <div class="instructor"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber | uri %]">[% i.firstname | html %] [% i.surname | html %]</a></div>
71                                         [% END %]
72                                     </td>
73                                     <td>[% c.staff_note | html %]</td>
74                                     <td>[% c.public_note | $raw %]</td>
75                                     <td>[% c.students_count | html %]</td>
76                                     <td>
77                                         [% IF c.enabled == 'yes' %]
78                                             Yes
79                                         [% ELSE %]
80                                             No
81                                         [% END %]
82                                     </td>
83                             [% END %]
84                         </tbody>
85                     </table>
86
87             </div>
88         </div>
89
90 [% MACRO jsinclude BLOCK %]
91     [% INCLUDE 'datatables.inc' %]
92     [% INCLUDE 'columns_settings.inc' %]
93     <script>
94         var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
95         $(document).ready(function() {
96             var ctable = KohaTable("course_reserves_table", {
97                 "sPaginationType": "full",
98                 "bAutoWidth": false
99             }, columns_settings );
100         });
101     </script>
102 [% END %]
103
104 [% INCLUDE 'intranet-bottom.inc' %]