From 2ba9b0e8a6a1dd39e4bc59cbcee0250ef3903ff1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 9 Nov 2017 12:04:29 -0300 Subject: [PATCH] Bug 7317: Simplify column headers It will help translators (remove TT tags from po files) and simplify the code. We do not need this translate_column that is used only once. It also removes sorting option on the last column (actions) --- .../prog/en/modules/ill/ill-requests.tt | 55 ++++++++-------------- 1 file changed, 20 insertions(+), 35 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index 2fcb424c82..b0bbdcb412 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -2,21 +2,6 @@ [% USE Koha %] [% USE KohaDates %] -[% columns = [ 'metadata_Author', 'metadata_Title', 'borrowername', 'biblio_id', 'library', 'status', 'updated', 'illrequest_id', 'action' ] %] - -[% BLOCK translate_column %] -[%- SWITCH column -%] -[%- CASE 'metadata_Author' -%]Author -[%- CASE 'metadata_Title' -%]Title -[%- CASE 'borrowername' -%]Patron -[%- CASE 'biblio_id' -%]Biblio ID -[%- CASE 'library' -%]Library -[%- CASE 'status' -%]Status -[%- CASE 'updated' -%]Updated on -[%- CASE 'illrequest_id' -%]Request number -[%- END -%] -[% END %] - [% INCLUDE 'doc-head-open.inc' %] Koha › ILL requests › [% INCLUDE 'doc-head-close.inc' %] @@ -67,9 +52,6 @@ 'action' ]; - // Extra fields that we need to tack on to the end - var extra = [ 'action' ]; - // Remove any fields we're ignoring var removeIgnore = function(dataObj) { dataObj.forEach(function(thisRow) { @@ -250,13 +232,6 @@ expandExpand(row); }); - // Append any extra columns we need to tag on - if (extra.length > 0) { - extra.forEach(function(thisExtra) { - allCols[thisExtra] = 1; - }); - } - // Assemble an array of column definitions for passing // to datatables var colData = []; @@ -283,7 +258,7 @@ $('#ill-requests').DataTable($.extend(true, {}, dataTablesDefaults, { 'aoColumnDefs': [ // Last column shouldn't be sortable or searchable { - 'aTargets': [ 'action' ], + 'aTargets': [ 'actions' ], 'bSortable': false, 'bSearchable': false }, @@ -365,16 +340,20 @@ [% ELSIF query_type == 'generic_confirm' %]

Place request with partner libraries

[% IF error %] -
[% IF error == 'no_target_email' %] - No target email addresses found. Either select at least - one partner or check your ILL partner library records. +
+ No target email addresses found. Either select at least + one partner or check your ILL partner library records. +
[% ELSIF error == 'no_library_email' %] - Your library has no usable email address. Please set it. +
+ Your library has no usable email address. Please set it. +
[% ELSIF error == 'unkown_error' %] - Unknown error processing your request. Contact your administrator. +
+ Unknown error processing your request. Contact your administrator. +
[% END %] -
[% END %] [% IF whole.value.partners %] @@ -617,9 +596,15 @@ - [% FOR column IN columns %] - - [% END %] + + + + + + + + + -- 2.11.0
[% PROCESS translate_column column=column %]AuthorTitlePatronBiblio IDLibraryStatusUpdated onRequest number