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