Bug 14544: QA fixes - some minor bug fixes
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-course-details.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% USE AuthorisedValues %]
4 [% USE ItemTypes %]
5 [% USE Branches %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Course reserves for [% course.course_name %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% BLOCK cssinclude %]
10     <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
11 [% END %]
12
13 </head>
14 [% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
15 [% INCLUDE 'masthead.inc' %]
16
17 <div class="main">
18     <ul class="breadcrumb">
19         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
20         <li><a href="/cgi-bin/koha/opac-course-reserves.pl">Course reserves</a> <span class="divider">&rsaquo;</span></li>
21         <li><a href="#">Course reserves for <i>[% course.course_name %]</i></a></li>
22     </ul>
23
24     <div class="container-fluid">
25         <div class="row-fluid">
26             <div class="span12">
27
28                 <h2>Course reserves for <i>[% course.course_name %]</i></h2>
29                 <div class="rows">
30                     <ol>
31                         [% IF ( course.term ) %]<li><span class="label">Term:</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) %]</li>[% END %]
32                         <li><span class="label">Department:</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) %]</li>
33                         [% IF ( course.course_number ) %]<li><span class="label">Course number:</span> [% course.course_number %]</li>[% END %]
34                         [% IF ( course.section ) %]<li><span class="label">Section:</span> [% course.section %]</li>[% END %]
35                         [% IF ( course.instructors ) %]
36                             <li><span class="label">Instructors:</span>
37                                 <ul>
38                                     [% FOREACH i IN course.instructors %]
39                                         <li><div class="instructor">[% i.firstname %] [% i.surname %]</div></li>
40                                     [% END %]
41                                 </ul>
42                             </li>
43                         [% END %]
44                         [% IF ( course.public_note ) %]<li><span class="label">Notes:</span> [% course.public_note %]</li>[% END %]
45                     </ol>
46                 </div>
47
48                 [% IF ( course_reserves ) %]
49                     <table id="course-items-table" class="table table-bordered table-striped table-condensed">
50                         <thead>
51                             <tr>
52                                 <th class="anti-the">Title</th>
53                                 <th>Item type</th>
54                                 <th>Location</th>
55                                 <th>Collection</th>
56                                 <th>Call number</th>
57                                 <th>Copy number</th>
58                                 <th>Status</th>
59                                 <th class="title-string">Date due</th>
60                                 <th>Notes</th>
61                             </tr>
62                         </thead>
63
64                         <tbody>
65                             [% FOREACH cr IN course_reserves %]
66                                 <tr>
67                                     <td><a href="opac-detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></td>
68                                     <td>[% ItemTypes.GetDescription( cr.item.itype ) %]</td>
69                                     <td>[% Branches.GetName( cr.item.holdingbranch ) %] <br/> <i>[% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]</i></td>
70                                     <td>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]</td>
71                                     <td>[% cr.item.itemcallnumber %]</td>
72                                     <td>[% cr.item.copynumber %]</td>
73                                     <td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td>
74                                     <td><span title="[% cr.issue.date_due %]">[% cr.issue.date_due | $KohaDates as_due_date => 1 %]</span></td>
75                                     <td>[% cr.public_note %]</td>
76                                 </tr>
77                             [% END %]
78                         </tbody>
79                     </table>
80                 [% ELSE %]
81                     <br style="clear:both;" />
82                     <div class="alert alert-info">
83                         <p>No reserves have been selected for this course.</p>
84                     </div>
85                 [% END %]
86             </div> <!-- / .span12 -->
87         </div> <!-- / .row-fluid -->
88     </div> <!-- / .container-fluid -->
89 </div> <!-- / .main -->
90 [% INCLUDE 'opac-bottom.inc' %]
91 [% BLOCK jsinclude %]
92     [% INCLUDE 'datatables.inc' %]
93     <script type="text/javascript">
94     $(document).ready(function() {
95         $("#course-items-table").dataTable($.extend(true, {}, dataTablesDefaults, {
96             "sDom": '<"top"flp>rt<"clear">',
97             "aoColumnDefs": [
98                 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
99                 { "sType": "title-string", "aTargets" : [ "title-string" ] }
100             ]
101         }));
102     });
103     </script>
104 [% END %]