Kyle M Hall
9e5fcb0d5d
A librarian with no course reserves permissions cannot view course reserves from the staff intranet, yet can from the OPAC. This doesn't make much sense. Librarians should not require any course reserves permissions to view courses and reserves from the staff intranet. Test Plan: 1) Log into staff intranet as a librarian with no course reserves permissions 2) Note you cannot view course reserves 3) Apply this patch 4) Note you can now view course reserves 5) Verify you cannot modify courses or course reserves Signed-off-by: Owen Leonard <oleonard@myacpl.org> Bug 11866 [Follow-up] Staff side course reserves too restrictive This follow-up patch adds a check for the "UseCourseReserves" system preference to the display of the Course reserves menu item in the header. To test, view the "More" menu with the "UseCourseReserves" system preference on and off. The menu item should appear and disappear accordingly. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
196 lines
11 KiB
Text
196 lines
11 KiB
Text
[% USE AuthorisedValues %]
|
|
[% USE ItemTypes %]
|
|
[% USE Branches %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Course reserves › Course details for [% course.course_name %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
|
|
[% INCLUDE 'datatables-strings.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function(){
|
|
$("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"sPaginationType": "four_button",
|
|
"aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
|
|
"iDisplayLength": 20,
|
|
"aoColumnDefs": [
|
|
{ 'bSortable': false, 'aTargets': [ 'NoSort' ] }
|
|
]
|
|
}));
|
|
|
|
$("a.delete_item").click(function(){
|
|
return confirm( _("Are you sure you want to remove this item from the course?"));
|
|
});
|
|
|
|
$("#delete_course").click(function(){
|
|
return confirm( _("Are you sure you want to delete this course?") );
|
|
});
|
|
});
|
|
|
|
//]]>
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> › Course details for <i>[% course.course_name %]</i></div>
|
|
|
|
<div id="doc2" class="yui-t7">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div id="toolbar">
|
|
<ul class="toolbar">
|
|
[% IF CAN_user_coursereserves_add_reserves %]<li><a class="btn" id="add_items" href="/cgi-bin/koha/course_reserves/add_items.pl?course_id=[% course.course_id %]"><i class="icon-plus"></i> Add reserves</a></li>[% END %]
|
|
[% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a class="btn" id="edit_course" href="/cgi-bin/koha/course_reserves/course.pl?course_id=[% course.course_id %]"><i class="icon-pencil"></i> Edit course</a></li>[% END %]
|
|
[% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a class="btn" id="delete_course" href="/cgi-bin/koha/course_reserves/mod_course.pl?course_id=[% course.course_id %]&action=del"><i class="icon-remove"></i> Delete course</a></li>[% END %]
|
|
</ul>
|
|
</div><!-- /toolbar -->
|
|
|
|
<div class="rows">
|
|
<ol>
|
|
<li><span class="label">Course name</span> [% course.course_name %]</li>
|
|
<li><span class="label">Term</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) %]</li>
|
|
<li><span class="label">Department</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) %]</li>
|
|
<li><span class="label">Course number</span> [% course.course_number %]</li>
|
|
<li><span class="label">Section</span> [% course.section %]</li>
|
|
<li><span class="label">Instructors</span> [% FOREACH i IN course.instructors %]<div class="instructor"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber %]">[% i.firstname %] [% i.surname %]</a></div>[% END %]</li>
|
|
<li><span class="label">Staff note</span> [% course.staff_note %]</li>
|
|
<li><span class="label">Public note</span> [% course.public_note %]</li>
|
|
<li><span class="label">Student count</span> [% course.students_count %]</li>
|
|
<li><span class="label">Status</span> [% IF course.enabled == 'yes' %]Active[% ELSE %]Inactive[% END %]</li>
|
|
</ol>
|
|
</div>
|
|
|
|
[% IF course_reserves %]
|
|
<table id="course_reserves_table">
|
|
<caption>Reserves</caption>
|
|
<thead>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Barcode</th>
|
|
<th>Call number</th>
|
|
[% IF item_level_itypes %]<th>Item type</th>[% END %]
|
|
<th>Collection</th>
|
|
<th>Location</th>
|
|
<th>Library</th>
|
|
<th>Staff note</th>
|
|
<th>Public note</th>
|
|
[% IF CAN_user_coursereserves_add_reserves %]<th class="NoSort"> <!-- Edit --></th>[% END %]
|
|
[% IF CAN_user_coursereserves_delete_reserves %]<th class="NoSort"> <!-- Remove --></th>[% END %]
|
|
<th class="NoSort">Other course reserves</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
[% FOREACH cr IN course_reserves %]
|
|
<tr>
|
|
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></td>
|
|
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% cr.item.itemnumber %]&biblionumber=[% cr.item.biblionumber %]&bi=[% cr.item.biblioitemnumber %]">[% cr.item.barcode %]</a></td>
|
|
<td>[% cr.item.itemcallnumber %]</td>
|
|
[% IF item_level_itypes %]
|
|
<td>
|
|
[% IF cr.course_item.itype %]
|
|
[% IF cr.course_item.enabled == 'yes' %]
|
|
[% ItemTypes.GetDescription( cr.item.itype ) %]
|
|
[% ELSE %]
|
|
[% ItemTypes.GetDescription( cr.course_item.itype ) %]
|
|
[% END %]
|
|
[% ELSE %]
|
|
<i>Unchanged</i>
|
|
[% IF cr.item.itype %]
|
|
([% ItemTypes.GetDescription( cr.item.itype ) %])
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
<td>
|
|
[% IF cr.course_item.ccode %]
|
|
[% IF cr.course_item.enabled == 'yes' %]
|
|
[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]
|
|
[% ELSE %]
|
|
[% AuthorisedValues.GetByCode( 'CCODE', cr.course_item.ccode ) %]
|
|
[% END %]
|
|
[% ELSE %]
|
|
<i>Unchanged</i>
|
|
[% IF cr.item.ccode %]
|
|
([% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %])
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF cr.course_item.location %]
|
|
[% IF cr.course_item.enabled == 'yes' %]
|
|
[% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]
|
|
[% ELSE %]
|
|
[% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location ) %]
|
|
[% END %]
|
|
[% ELSE %]
|
|
<i>Unchanged</i>
|
|
[% IF cr.item.location %]
|
|
([% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %])
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF cr.course_item.holdingbranch %]
|
|
[% IF cr.course_item.enabled == 'yes' %]
|
|
[% Branches.GetName( cr.item.holdingbranch ) %]
|
|
[% ELSE %]
|
|
[% Branches.GetName( cr.course_item.holdingbranch ) %]
|
|
[% END %]
|
|
[% ELSE %]
|
|
<i>Unchanged</i>
|
|
[% IF cr.item.holdingbranch %]
|
|
([% Branches.GetName( cr.item.holdingbranch ) %])
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
<td>[% cr.staff_note %]</td>
|
|
<td>[% cr.public_note %]</td>
|
|
|
|
[% IF CAN_user_coursereserves_add_reserves %]
|
|
<td><a href="add_items.pl?course_id=[% course.course_id %]&barcode=[% cr.item.barcode %]&action=lookup">Edit</a></td>
|
|
[% END %]
|
|
|
|
[% IF CAN_user_coursereserves_delete_reserves %]
|
|
<td>
|
|
[% IF cr.item.onloan %]
|
|
On Loan
|
|
[% ELSIF cr.item.itemlost %]
|
|
Item Lost
|
|
[% ELSE %]
|
|
<a href="course-details.pl?course_id=[% course.course_id %]&action=del_reserve&cr_id=[% cr.cr_id %]" class="delete_item" >Remove</a>
|
|
[% END %]
|
|
|
|
</td>
|
|
[% END %]
|
|
|
|
<td>
|
|
[% FOREACH course IN cr.courses %]
|
|
[% UNLESS cr.course_id == course.course_id %]
|
|
<p>
|
|
<a href="course-details.pl?course_id=[% course.course_id %]">
|
|
[% course.course_name %]
|
|
[% IF course.section %] [% course.section %] [% END %]
|
|
[% IF course.term %] [% AuthorisedValues.GetByCode( 'TERM', course.term ) %] [% END %]
|
|
</a>
|
|
</p>
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|