From e9163adf3f7bbd4ca0ae7721b272ab2493e4d5ff Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Nov 2019 18:41:28 +0000 Subject: [PATCH] Bug 24093: Sorting indicators broken on list contents view This patch updates the table markup for the lists contents view so that the table sort state is correctly indicated by arrows in the table headers. The markup changes allow the standard DataTables CSS to apply to this table even though it is not a DataTable. To test, apply the patch, go to Lists, and view any list with multiple titles attached. - The list should be sorted by default according to the list's settings, and the arrow in the header row should correctly reflect the sorting column and direction. - Test re-sorting the table by each of the different sortable columns, confirming each time that the sorting arrows are correct. Signed-off-by: Maryse Simard Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- .../prog/en/modules/virtualshelves/shelves.tt | 50 +++++++++---------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 57f5e24eb1..72420dd08c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -159,44 +159,42 @@ [% END %] - +
+ [% IF ( itemsloop ) %][% END %] [% UNLESS ( item_level_itypes ) %][% END %] - - - + [% IF sortfield == 'dateadded' %] + - + [% FOREACH itemsloo IN itemsloop %] [% IF itemsloop %] -- 2.39.5
 Item type + [% IF sortfield == 'title' %] + + [% ELSE %] + + [% END %] Title - [% IF sortfield == 'title' %] - [% direction | html %] sort - [% ELSE %] - - [% END %] + [% IF sortfield == 'author' %] + + [% ELSE %] + + [% END %] Author - [% IF sortfield == 'author' %] - [% direction | html %] sort - [% ELSE %] - - [% END %] - + + [% ELSE %] + + [% END %] Date added - [% IF sortfield == 'dateadded' %] - [% direction | html %] sort - [% ELSE %] - - [% END %] + [% IF sortfield == 'itemcallnumber' %] + + [% ELSE %] + + [% END %] Call number - [% IF sortfield == 'itemcallnumber' %] - [% direction | html %] sort - [% ELSE %] - - [% END %]