Browse Source

Bug 24701: Add column config to course_items_table

This patch adds course_items_table to the column config tool
TEST PLAN:
1. Have some course reserves
2. Add some items to that course reserve and browse to opac-course-details
2. See all the unconfigurable columns
3. Apply patch
4. Browse to column config > OPAC > opac-course-details
5. Try hiding each column and make sure the correct column is hidden on opac-course-details.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
2db51d681f
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 24
      admin/columns_settings.yml
  2. 13
      koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt

24
admin/columns_settings.yml

@ -1143,6 +1143,30 @@ modules:
-
columnname: serial_notes
course-items-table:
-
columnname: title
-
columnname: author
-
columnname: itemtype
-
columnname: location
-
columnname: collection
-
columnname: callnumber
-
columnname: copynumber
-
columnname: status
-
columnname: datedue
-
columnname: notes
-
columnname: link
serials:
subscription-detail:
orders:

13
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt

@ -5,6 +5,7 @@
[% USE AuthorisedValues %]
[% USE ItemTypes %]
[% USE Branches %]
[% USE ColumnsSettings %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Course reserves for [% course.course_name | html %]</title>
[% INCLUDE 'doc-head-close.inc' %]
@ -106,15 +107,19 @@
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]
<script>
$(document).ready(function() {
$("#course-items-table").dataTable($.extend(true, {}, dataTablesDefaults, {
columns_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'course-items-table', 'json' ) | $raw %];
KohaTable("#course-items-table", {
"dom": '<"top"flp>rt<"clear">',
"columnDefs": [
"sorting": [[ 1, "asc" ]],
"autoWidth": false,
"asColumnDefs": [
{ "type": "anti-the", "targets" : [ "anti-the" ] },
{ "type": "title-string", "targets" : [ "title-string" ] }
{ "type": "title-string", "targets" : [ "title-string" ] },
]
}));
}, columns_settings );
});
</script>
[% END %]

Loading…
Cancel
Save