Bug 21409: Add column configuration to course reserves
This patch adds columns configuration and print/export options to two
tables: The table listing courses and the table listing titles reserved
for a course.
To test you should have more than one course and multiple title reserved
for at least one course.
- Apply the patch and go to Course reserves
- In the table of courses, confirm that all DataTables controls work
correctly: paging, filter, column visibility, export, etc.
- View a course with multiple titles reserved. Test all DataTables
controls on this table too.
- Go to Administration -> Columns settings
- Change the settings for the courses and reserves table and confirm
that these changes are applied correctly.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
a32c92c601
commit
cea8a72708
|
|
@ -201,6 +201,61 @@ modules:
|
|||
-
|
||||
columnname: stocknumber
|
||||
|
||||
coursereserves:
|
||||
courses:
|
||||
course_reserves_table:
|
||||
-
|
||||
columnname: name
|
||||
-
|
||||
columnname: department
|
||||
-
|
||||
columnname: course_no
|
||||
-
|
||||
columnname: section
|
||||
-
|
||||
columnname: term
|
||||
-
|
||||
columnname: instructors
|
||||
-
|
||||
columnname: staff_note
|
||||
-
|
||||
columnname: public_note
|
||||
-
|
||||
columnname: no_of_students
|
||||
-
|
||||
columnname: enabled
|
||||
|
||||
reserves:
|
||||
course_reserves_table:
|
||||
-
|
||||
columnname: title
|
||||
-
|
||||
columnname: author
|
||||
-
|
||||
columnname: barcode
|
||||
-
|
||||
columnname: call_number
|
||||
-
|
||||
columnname: item_type
|
||||
-
|
||||
columnname: collection
|
||||
-
|
||||
columnname: location
|
||||
-
|
||||
columnname: library
|
||||
-
|
||||
columnname: staff_note
|
||||
-
|
||||
columnname: public_note
|
||||
-
|
||||
columnname: link
|
||||
-
|
||||
columnname: other_course_reserves
|
||||
-
|
||||
columnname: actions
|
||||
cannot_be_toggled: 1
|
||||
cannot_be_modified: 1
|
||||
|
||||
members:
|
||||
fines:
|
||||
account-fines:
|
||||
|
|
|
|||
|
|
@ -140,6 +140,12 @@
|
|||
[% PROCESS pagelist module=modules.circ modulename="circ" %]
|
||||
</div>
|
||||
|
||||
<h3><a href="#coursereserves">Course reserves</a></h3>
|
||||
<div id="coursereserves">
|
||||
<h4>Course reserves tables</h4>
|
||||
[% PROCESS pagelist module=modules.coursereserves modulename="coursereserves" %]
|
||||
</div>
|
||||
|
||||
<h3><a href="#members">Patrons</a></h3>
|
||||
<div id="members">
|
||||
<h4>Patrons tables</h4>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
[% USE AuthorisedValues %]
|
||||
[% USE ItemTypes %]
|
||||
[% USE Branches %]
|
||||
[% USE ColumnsSettings %]
|
||||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Course reserves › Course details for [% course.course_name | html %]</title>
|
||||
|
|
@ -20,7 +21,7 @@
|
|||
|
||||
<div class="main container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
|
||||
[% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %]
|
||||
<div id="toolbar">
|
||||
|
|
@ -53,8 +54,8 @@
|
|||
</div>
|
||||
|
||||
[% IF course_reserves %]
|
||||
<h1>Reserves</h1>
|
||||
<table id="course_reserves_table">
|
||||
<caption>Reserves</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="antithe">Title</th>
|
||||
|
|
@ -202,15 +203,18 @@
|
|||
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
[% INCLUDE 'datatables.inc' %]
|
||||
<script type="text/javascript">
|
||||
[% INCLUDE 'columns_settings.inc' %]
|
||||
<script>
|
||||
var columns_settings = [% ColumnsSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
|
||||
$(document).ready(function(){
|
||||
$("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
||||
var rtable = KohaTable("course_reserves_table", {
|
||||
"sPaginationType": "four_button",
|
||||
"bAutoWidth": false,
|
||||
"aoColumnDefs": [
|
||||
{ 'bSortable': false, 'aTargets': [ 'NoSort' ] },
|
||||
{ 'sType': "anti-the", 'aTargets' : [ 'antithe'] }
|
||||
]
|
||||
}));
|
||||
}, columns_settings );
|
||||
|
||||
$(".delete_item").click(function(){
|
||||
return confirmDelete(_("Are you sure you want to remove this item from the course?"));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[% USE raw %]
|
||||
[% USE Asset %]
|
||||
[% USE AuthorisedValues %]
|
||||
[% USE ColumnsSettings %]
|
||||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Course reserves</title>
|
||||
|
|
@ -18,7 +19,7 @@
|
|||
|
||||
<div class="main container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
|
||||
[% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %]
|
||||
<div id="toolbar">
|
||||
|
|
@ -98,11 +99,14 @@
|
|||
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
[% INCLUDE 'datatables.inc' %]
|
||||
<script type="text/javascript" id="js">
|
||||
[% INCLUDE 'columns_settings.inc' %]
|
||||
<script>
|
||||
var columns_settings = [% ColumnsSettings.GetColumns( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
|
||||
$(document).ready(function() {
|
||||
$("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
||||
"sPaginationType": "four_button"
|
||||
}));
|
||||
var ctable = KohaTable("course_reserves_table", {
|
||||
"sPaginationType": "four_button",
|
||||
"bAutoWidth": false
|
||||
}, columns_settings );
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue