19700c6e7de521a96998f6089a27945f3bb8f458
[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 [% USE TablesSettings %]
9 [% PROCESS 'i18n.inc' %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Course reserves for [% course.course_name | html %] &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% BLOCK cssinclude %]
14     [% Asset.css("css/datatables.css") | $raw %]
15 [% END %]
16
17 </head>
18 [% INCLUDE 'bodytag.inc' bodyid='opac-course-details' %]
19 [% INCLUDE 'masthead.inc' %]
20
21 <div class="main">
22     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
23         <ol class="breadcrumb">
24             <li class="breadcrumb-item">
25                 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
26             </li>
27             <li class="breadcrumb-item">
28                 <a href="/cgi-bin/koha/opac-course-reserves.pl">Course reserves</a>
29             </li>
30             <li class="breadcrumb-item active">
31                 <a href="#" aria-current="page">Course reserves for &nbsp;<em>[% course.course_name | html %]</em></a>
32             </li>
33         </ol>
34     </nav> <!-- /#breadcrumbs -->
35
36     <div class="container-fluid">
37         <div class="row">
38             <div class="col">
39                 <div id="course_reserves" class="maincontent">
40
41                     <h1>Course reserves for <em>[% course.course_name | html %]</em></h1>
42                     <div class="rows">
43                         <ol>
44                             [% IF ( course.term ) %]<li><span class="label">[% tp('Semester', 'Term:') | html %]</span> [% AuthorisedValues.GetByCode( 'TERM', course.term, 1 ) | html %]</li>[% END %]
45                             <li><span class="label">Department:</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department, 1 ) | html %]</li>
46                             [% IF ( course.course_number ) %]<li><span class="label">Course number:</span> [% course.course_number | html %]</li>[% END %]
47                             [% IF ( course.section ) %]<li><span class="label">Section:</span> [% course.section | html %]</li>[% END %]
48                             [% IF ( course.instructors ) %]
49                                 <li><span class="label">Instructors:</span>
50                                     <ul>
51                                         [% FOREACH i IN course.instructors %]
52                                             <li><div class="instructor">[% i.firstname | html %] [% i.surname | html %]</div></li>
53                                         [% END %]
54                                     </ul>
55                                 </li>
56                             [% END %]
57                             [% IF ( course.public_note ) %]<li><span class="label">Notes:</span> [% course.public_note | $raw %]</li>[% END %]
58                         </ol>
59                     </div>
60
61                     [% IF ( course_reserves ) %]
62                         <table id="course-items-table" class="table table-bordered table-striped table-condensed">
63                         <caption class="sr-only">Courses</caption>
64                             <thead>
65                                 <tr>
66                                     <th class="anti-the">Title</th>
67                                     <th>Author</th>
68                                     <th>Item type</th>
69                                     <th>Location</th>
70                                     <th>Collection</th>
71                                     <th>Call number</th>
72                                     <th>Copy number</th>
73                                     <th>Status</th>
74                                     <th>Date due</th>
75                                     <th>Notes</th>
76                                     <th>Link</th>
77                                 </tr>
78                             </thead>
79
80                             <tbody>
81                                 [% FOREACH cr IN course_reserves %]
82                                     <tr>
83                                         <td><a href="opac-detail.pl?biblionumber=[% cr.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title-head.inc' biblio=cr.biblio %]</a></td>
84                                         <td>[% cr.biblio.author | html %]</td>
85                                         <td>[% ItemTypes.GetDescription( cr.item.itype ) | html %]</td>
86                                         <td>[% Branches.GetName( cr.item.holdingbranch ) | html %] <br/> <em>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => cr.item.location, opac => 1 ) | html %]</em></td>
87                                         <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode, opac => 1 ) | html %]</td>
88                                         <td>[% cr.item.itemcallnumber | html %]</td>
89                                         <td>[% cr.item.copynumber | html %]</td>
90                                         <td>
91                                             [% IF cr.item %]
92                                                 [% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue show_recall_link=Koha.Preference('UseRecalls') %]
93                                             [% END %]
94                                         </td>
95                                         <td data-order="[% cr.issue.date_due | html %]">[% cr.issue.date_due | $KohaDates  as_due_date => 1 %]</td>
96                                         <td>[% IF ( cr.public_note ) %]
97                                                 [% cr.public_note | $raw %]
98                                             [% ELSIF ( cr.item.itemnotes ) %]
99                                                 [% cr.item.itemnotes | $raw %]
100                                             [% END %]
101                                         </td>
102                                         <td>[% IF (cr.item.uri) %]
103                                                 <a href="[% cr.item.uri | url %]">Item URI</a>
104                                             [% ELSIF (cr.biblioitem.url) %]
105                                                 <a href="[% cr.biblioitem.url | url %]">Record URL</a>
106                                             [% END %]
107                                         </td>
108                                     </tr>
109                                 [% END %]
110                             </tbody>
111                         </table>
112                     [% ELSE %]
113                         <br style="clear:both;" />
114                         <div class="alert alert-info">
115                             <p>No reserves have been selected for this course.</p>
116                         </div>
117                     [% END %]
118                 </div> <!-- / #course_reserves -->
119             </div> <!-- / .col -->
120         </div> <!-- / .row -->
121     </div> <!-- / .container-fluid -->
122 </div> <!-- / .main -->
123 [% INCLUDE 'opac-bottom.inc' %]
124 [% BLOCK jsinclude %]
125     [% INCLUDE 'datatables.inc' %]
126     [% INCLUDE 'columns_settings.inc' %]
127     <script>
128         $(document).ready(function() {
129             columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course-items-table', 'json' ) | $raw %];
130             KohaTable("#course-items-table", {
131                 "dom": '<"top"<"table_controls"f>>t',
132                 "sorting": [[ 1, "asc" ]],
133                 "autoWidth": false,
134                 "language": {
135                     "search": "_INPUT_",
136                     "searchPlaceholder": _("Search course reserves")
137                 }
138             }, columns_settings );
139         });
140     </script>
141 [% END %]