Browse Source

Bug 23547: Add column configuration to course reserves table in the OPAC

This patch adds opac-course-reserves to the column config tool
TEST PLAN:
1. Have some course reserves and go look at opac-course-reserves.pl
2. See all the unconfigurable columns
3. Apply patch
4. Browse to column config > OPAC > course_reserves_table
5. Try hiding each column and make sure the correct column is hidden on opac-course-reserves.pl

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Lucas Gass 3 years ago
committed by Martin Renvoize
parent
commit
6179fcce8c
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 16
      admin/columns_settings.yml
  2. 17
      koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt

16
admin/columns_settings.yml

@ -1115,6 +1115,22 @@ modules:
-
columnname: item_coursereserves
course_reserves_table:
-
columnname: coursename
-
columnname: department
-
columnname: course_number
-
columnname: section
-
columnname: term
-
columnname: instructor
-
columnname: notes
subscriptionst:
-
columnname: serial_serialseq

17
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt

@ -2,6 +2,7 @@
[% USE Asset %]
[% USE Koha %]
[% USE AuthorisedValues %]
[% USE ColumnsSettings %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Courses</title>
@ -63,11 +64,23 @@
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]
<script>
$(document).ready(function() {
$("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
columns_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'course_reserves_table', 'json' ) | $raw %]
KohaTable("#course_reserves_table", {
"dom": '<"top"flp>rt<"clear">',
}));
"sorting": [[ 1, "asc" ]],
"autoWidth": false,
"asColumnDefs": [
{ "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
{ "aTargets": [ 1 ], "sType": "nsb-nse" },
]
}, columns_settings );
});
</script>
[% END %]

Loading…
Cancel
Save