From 93554a99c43d0f4524db9a9870b910606f792313 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 23 Jan 2013 12:25:39 -0500 Subject: [PATCH] Bug 9463 [Revised] Use DataTables on patron sent notices page Replace the tablesorter plugin with the DataTables plugin on the patron sent notices page. This patch adds default sorting by time (descending). This patch depends on the one for Bug 9887, which introduces a new DataTables plugin to allow sorting on data embedded in a 's "title" attribute. This allows sorting to be done on an unformatted datetime. To test, open the sent notices page for a patron who has multiple sent notices. Confirm that table sorting works correctly with various date format settings. Revision corrects an error which occurs when there are no notices: Instead of displaying an empty table with a message the table is not displayed and a standard dialog message is displayed. In order to prevent page-specific CSS and JS from conflicting with the standard "message" class the page-specific classes have been changed from "message*" to "notice*" Test this change by viewing a page with existing notices and clicking the titles to show/hide the notice contents. Signed-off-by: Kyle M Hall --- .../prog/en/modules/members/notices.tt | 42 +++++++++++--------- 1 files changed, 23 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt index 1d7ec31..f3727f7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt @@ -2,19 +2,24 @@ [% INCLUDE 'doc-head-open.inc' %] Sent notices for [% INCLUDE 'patron-title.inc' %] [% INCLUDE 'doc-head-close.inc' %] - + + +[% INCLUDE 'datatables-strings.inc' %] + @@ -39,7 +44,7 @@ [% INCLUDE 'members-toolbar.inc' %]

Sent notices for [% INCLUDE 'patron-title.inc' %]

- +[% IF ( QUEUED_MESSAGES ) %] @@ -49,13 +54,12 @@ -[% IF ( QUEUED_MESSAGES ) %] [% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %] @@ -73,14 +77,14 @@ [% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted [% ELSE %][% QUEUED_MESSAGE.status %][% END %] - + [% END %] - [% ELSE %] - - [% END %]
Time
- [% QUEUED_MESSAGE.subject %] -

+ [% QUEUED_MESSAGE.subject %] +

[% QUEUED_MESSAGE.content FILTER html_line_break %]

[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %][% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]
There is no record of any messages that have been sent to this patron.
+[% ELSE %] +
There is no record of any messages that have been sent to this patron.
+[% END %] -- 1.7.2.5