@@ -, +, @@
- Go to Tools -> Notices & slips
- Confirm that there is a table toolbar with a filter, a "Column
visibility" button, and "Excel," "CSV," "Copy," and "Print" buttons.
- Confirm that showing and hiding columns via the button is working
correctly.
- Confirm that only the first four columns are sortable.
- Expand the "Tools" section.
- Find "id=lettert."
- Make some selections to configure default settings of the reports
table.
- Return to reports and confirm that these defaults are applied.
---
admin/columns_settings.yml | 18 ++++++++++++++++++
.../prog/en/modules/admin/columns_settings.tt | 6 ++++++
.../intranet-tmpl/prog/en/modules/tools/letter.tt | 4 ++++
koha-tmpl/intranet-tmpl/prog/js/letter.js | 19 ++++++++++++-------
4 files changed, 40 insertions(+), 7 deletions(-)
--- a/admin/columns_settings.yml
+++ a/admin/columns_settings.yml
@@ -618,3 +618,21 @@ modules:
columnname: ordered
-
columnname: spent
+
+ tools:
+ notices:
+ lettert:
+ -
+ columnname: library
+ -
+ columnname: module
+ -
+ columnname: code
+ -
+ columnname: name
+ -
+ columnname: copy_notice
+ -
+ columnname: actions
+ cannot_be_toggled: 1
+ cannot_be_modified: 1
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt
@@ -146,6 +146,12 @@
[% PROCESS pagelist module=modules.members modulename="members" %]
+
OPAC tables
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
@@ -2,6 +2,7 @@
[% USE Asset %]
[% USE Koha %]
[% USE Branches %]
+[% USE ColumnsSettings %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
Koha › Tools › Notices[% IF ( add_form or copy_form ) %][% IF ( modify ) %] › Modify notice[% ELSE %] › Add notice[% END %][% END %][% IF ( add_validate or copy_validate) %] › Notice added[% END %][% IF ( delete_confirm ) %] › Confirm deletion[% END %]
@@ -460,6 +461,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'columns_settings.inc' %]
[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %]
[% Asset.js("lib/jquery/plugins/jquery.insertatcaret.js") | $raw %]
[% Asset.js("js/letter.js") | $raw %]
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/js/letter.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/letter.js
@@ -1,5 +1,5 @@
/* Variables defined in letter.tt: */
-/* global _ module add_form copy_form dataTablesDefaults no_op_set MSG_EMPTY_TITLE_AND_CONTENT MSG_EMPTY_TEMPLATES code MSG_CODE_EXISTS MSG_CODE_EXISTS_FOR_LIBRARY MSG_DT_LOADING_RECORDS interface theme */
+/* global _ module add_form copy_form no_op_set MSG_EMPTY_TITLE_AND_CONTENT MSG_EMPTY_TEMPLATES code MSG_CODE_EXISTS MSG_CODE_EXISTS_FOR_LIBRARY MSG_DT_LOADING_RECORDS interface theme KohaTable columns_settings */
var modal_loading = "
"+ MSG_DT_LOADING_RECORDS +"
";
@@ -35,13 +35,18 @@ $(document).ready(function() {
$('#toolbar').fixFloat();
}
- $("#lettert:has(tbody tr)").dataTable($.extend(true, {}, dataTablesDefaults, {
- "sDom": 't',
- "aoColumnDefs": [
- { "bSortable": false, "bSearchable": false, 'aTargets': [ 'nosort' ] }
+ var ntable = KohaTable("lettert", {
+ "autoWidth": false,
+ "paging": false,
+ "aaSorting": [[ 3, "asc" ]],
+ "columnDefs": [
+ { "bSortable": false, "aTargets": [ "nosort" ] },
+ { "sType": "title-string", "aTargets" : [ "title-string"] }
],
- "bPaginate": false
- }));
+ "oLanguage": {
+ "sZeroRecords": MSG_NO_NOTICE_FOUND
+ },
+ }, columns_settings);
if( no_op_set ){
$('#branch').change(function() {
--