Nick Clemens
62508428cd
This patch changes course reserves to check for item notes form the course reserve and fallback to itemlevel notes if they are empty To test: 1 - Enabvle course reserves 2 - Add some items 3 - Make sure the items have notes at the item level and not at course reserves 4 - Notes don't display in staff or opac 5 - Apply patch 6 - Notes display in staff and opac 7 - Add notes at course reserves level 8 - These override the item level notes Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
109 lines
5.5 KiB
Text
109 lines
5.5 KiB
Text
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% USE AuthorisedValues %]
|
|
[% USE ItemTypes %]
|
|
[% USE Branches %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Course reserves for [% course.course_name %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %]
|
|
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
|
|
[% END %]
|
|
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
<ul class="breadcrumb">
|
|
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
|
|
<li><a href="/cgi-bin/koha/opac-course-reserves.pl">Course reserves</a> <span class="divider">›</span></li>
|
|
<li><a href="#">Course reserves for <i>[% course.course_name %]</i></a></li>
|
|
</ul>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row-fluid">
|
|
<div class="span12">
|
|
|
|
<h2>Course reserves for <i>[% course.course_name %]</i></h2>
|
|
<div class="rows">
|
|
<ol>
|
|
[% IF ( course.term ) %]<li><span class="label">Term:</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) %]</li>[% END %]
|
|
<li><span class="label">Department:</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) %]</li>
|
|
[% IF ( course.course_number ) %]<li><span class="label">Course number:</span> [% course.course_number %]</li>[% END %]
|
|
[% IF ( course.section ) %]<li><span class="label">Section:</span> [% course.section %]</li>[% END %]
|
|
[% IF ( course.instructors ) %]
|
|
<li><span class="label">Instructors:</span>
|
|
<ul>
|
|
[% FOREACH i IN course.instructors %]
|
|
<li><div class="instructor">[% i.firstname %] [% i.surname %]</div></li>
|
|
[% END %]
|
|
</ul>
|
|
</li>
|
|
[% END %]
|
|
[% IF ( course.public_note ) %]<li><span class="label">Notes:</span> [% course.public_note %]</li>[% END %]
|
|
</ol>
|
|
</div>
|
|
|
|
[% IF ( course_reserves ) %]
|
|
<table id="course-items-table" class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th class="anti-the">Title</th>
|
|
<th>Item type</th>
|
|
<th>Location</th>
|
|
<th>Collection</th>
|
|
<th>Call number</th>
|
|
<th>Copy number</th>
|
|
<th>Status</th>
|
|
<th class="title-string">Date due</th>
|
|
<th>Notes</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
[% FOREACH cr IN course_reserves %]
|
|
<tr>
|
|
<td><a href="opac-detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></td>
|
|
<td>[% ItemTypes.GetDescription( cr.item.itype ) %]</td>
|
|
<td>[% Branches.GetName( cr.item.holdingbranch ) %] <br/> <i>[% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]</i></td>
|
|
<td>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]</td>
|
|
<td>[% cr.item.itemcallnumber %]</td>
|
|
<td>[% cr.item.copynumber %]</td>
|
|
<td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td>
|
|
<td><span title="[% cr.issue.date_due %]">[% cr.issue.date_due | $KohaDates as_due_date => 1 %]</span></td>
|
|
<td>[% IF ( cr.public_note ) %]
|
|
[% cr.public_note %]
|
|
[% ELSIF ( cr.item.itemnotes ) %]
|
|
[% cr.item.itemnotes %]
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
<br style="clear:both;" />
|
|
<div class="alert alert-info">
|
|
<p>No reserves have been selected for this course.</p>
|
|
</div>
|
|
[% END %]
|
|
</div> <!-- / .span12 -->
|
|
</div> <!-- / .row-fluid -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$("#course-items-table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"sDom": '<"top"flp>rt<"clear">',
|
|
"aoColumnDefs": [
|
|
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
|
|
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
|
|
]
|
|
}));
|
|
});
|
|
</script>
|
|
[% END %]
|