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