From a2418f743ce1e14d32229b5dd8d05aeb13f9e664 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 5 Oct 2018 12:50:26 +0000 Subject: [PATCH] Bug 21497: Correctly format dates for ILL requests in OPAC This patch updates the opac ILL template to use the $KohaDates plugin for displaying dates. Also updated: - Added "title-string" sorting to allow for correct sorting of dates in the table of requests. - Corrected capitalization as per our capitalization rules. - Added self-closing / to inputs as per coding guidelines. To test, apply the patch and log in to the OPAC as a user who has multiple outstanding ILL requests. - In the table of ILL requests, the "Request placed" and "Last updated" dates should be formatted according to your system's dateformat preference. - Sorting of those columns should work correctly. - View a request and confirm that "Request placed" and "Last updated" dates in this view are also formatted correctly. Signed-off-by: Mark Tompsett Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- .../bootstrap/en/modules/opac-illrequests.tt | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt index f1f809994b..8091efa8a7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt @@ -1,8 +1,9 @@ [% USE raw %] [% USE Koha %] +[% USE KohaDates %] [% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] -[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your Interlibrary loan requests[% INCLUDE 'doc-head-close.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your interlibrary loan requests[% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] [% INCLUDE 'bodytag.inc' bodyid='opac-illrequests' bodyclass='scrollto' %] @@ -24,9 +25,9 @@ [% IF method != 'list' %]
  • Interlibrary loan requests
  • [% IF method == 'create' %] -
  • New Interlibrary loan request
  • +
  • New interlibrary loan request
  • [% ELSIF method == 'view' %] -
  • View Interlibrary loan request
  • +
  • View interlibrary loan request
  • [% END %] [% ELSE %]
  • Interlibrary loan requests
  • @@ -54,7 +55,7 @@ [% ELSE %]
    [% IF method == 'create' %] -

    New Interlibrary loan request

    +

    New interlibrary loan request

    [% IF stage == 'copyrightclearance' %] [% INCLUDE messages %]
    @@ -79,8 +80,8 @@
    - - + +
    [% ELSE %] @@ -117,8 +118,8 @@ Requested from Request type Status - Request placed - Last updated + Request placed + Last updated @@ -136,8 +137,8 @@ [% request.backend | html %] [% request.medium | html %] [% request.capabilities.$status.name | html %] - [% request.placed | html %] - [% request.updated | html %] + [% request.placed | $KohaDates %] + [% request.updated | $KohaDates %] View @@ -146,7 +147,7 @@ [% ELSIF method == 'view' %] -

    View Interlibrary loan request

    +

    View interlibrary loan request

    [% INCLUDE messages %] [% status = request.status | html %]
    @@ -181,11 +182,11 @@
  • - [% request.placed | html %] + [% request.placed | $KohaDates %]
  • - [% request.updated | html %] + [% request.updated | $KohaDates %]
  • @@ -207,13 +208,13 @@ [% END %]
  • - - + + [% IF !request.completed %] [% IF request.status == "NEW" %] Request cancellation [% END %] - + [% END %] Cancel
    @@ -234,7 +235,8 @@ //