From e5feb57f52890ad3d7b6d1d43572ab30e5a13020 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 --- .../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 c44f4199a1..c4e7194d02 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 %] @@ -116,8 +117,8 @@ Requested from Request type Status - Request placed - Last updated + Request placed + Last updated @@ -134,8 +135,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 @@ -144,7 +145,7 @@ [% ELSIF method == 'view' %] -

    View Interlibrary loan request

    +

    View interlibrary loan request

    [% INCLUDE messages %] [% status = request.status | html %]
    @@ -175,11 +176,11 @@
  • - [% request.placed | html %] + [% request.placed | $KohaDates %]
  • - [% request.updated | html %] + [% request.updated | $KohaDates %]
  • @@ -201,13 +202,13 @@ [% END %]
  • - - + + [% IF !request.completed %] [% IF request.status == "NEW" %] Request cancellation [% END %] - + [% END %] Cancel
    @@ -228,7 +229,8 @@ //