Bug 18276: Remove GetBiblioFromItemNumber - Course reserves
[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>Author</th>
54                                 <th>Item type</th>
55                                 <th>Location</th>
56                                 <th>Collection</th>
57                                 <th>Call number</th>
58                                 <th>Copy number</th>
59                                 <th>Status</th>
60                                 <th class="title-string">Date due</th>
61                                 <th>Notes</th>
62                                 <th>Link</th>
63                             </tr>
64                         </thead>
65
66                         <tbody>
67                             [% FOREACH cr IN course_reserves %]
68                                 <tr>
69                                     <td><a href="opac-detail.pl?biblionumber=[% cr.biblio.biblionumber %]">[% cr.biblio.title %]</a></td>
70                                     <td>[% cr.biblio.author %]</td>
71                                     <td>[% ItemTypes.GetDescription( cr.item.itype ) %]</td>
72                                     <td>[% Branches.GetName( cr.item.holdingbranch ) %] <br/> <i>[% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]</i></td>
73                                     <td>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]</td>
74                                     <td>[% cr.item.itemcallnumber %]</td>
75                                     <td>[% cr.item.copynumber %]</td>
76                                     <td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td>
77                                     <td><span title="[% cr.issue.date_due %]">[% cr.issue.date_due | $KohaDates as_due_date => 1 %]</span></td>
78                                     <td>[% IF ( cr.public_note ) %]
79                                             [% cr.public_note %]
80                                         [% ELSIF ( cr.item.itemnotes ) %]
81                                             [% cr.item.itemnotes %]
82                                         [% END %]
83                                     </td>
84                                     <td>[% IF (cr.item.uri) %]
85                                             <a href="[% cr.item.uri %]">Item URI</a>
86                                         [% ELSIF (cr.biblioitem.url) %]
87                                             <a href="[% cr.biblioitem.url %]">Record URL</a>
88                                         [% END %]
89                                     </td>
90                                 </tr>
91                             [% END %]
92                         </tbody>
93                     </table>
94                 [% ELSE %]
95                     <br style="clear:both;" />
96                     <div class="alert alert-info">
97                         <p>No reserves have been selected for this course.</p>
98                     </div>
99                 [% END %]
100             </div> <!-- / .span12 -->
101         </div> <!-- / .row-fluid -->
102     </div> <!-- / .container-fluid -->
103 </div> <!-- / .main -->
104 [% INCLUDE 'opac-bottom.inc' %]
105 [% BLOCK jsinclude %]
106     [% INCLUDE 'datatables.inc' %]
107     <script type="text/javascript">
108     $(document).ready(function() {
109         $("#course-items-table").dataTable($.extend(true, {}, dataTablesDefaults, {
110             "sDom": '<"top"flp>rt<"clear">',
111             "aoColumnDefs": [
112                 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
113                 { "sType": "title-string", "aTargets" : [ "title-string" ] }
114             ]
115         }));
116     });
117     </script>
118 [% END %]