Bugzilla – Attachment 80650 Details for
Bug 21497
Dates should be correctly formatted for ILL requests in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21497: Correctly format dates for ILL requests in OPAC
Bug-21497-Correctly-format-dates-for-ILL-requests-.patch (text/plain), 8.28 KB, created by
Mark Tompsett
on 2018-10-16 00:48:34 UTC
(
hide
)
Description:
Bug 21497: Correctly format dates for ILL requests in OPAC
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-10-16 00:48:34 UTC
Size:
8.28 KB
patch
obsolete
>From e5feb57f52890ad3d7b6d1d43572ab30e5a13020 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <mtompset@hotmail.com> >--- > .../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' %] >-<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your Interlibrary loan requests</title>[% INCLUDE 'doc-head-close.inc' %] >+<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your interlibrary loan requests</title>[% INCLUDE 'doc-head-close.inc' %] > [% BLOCK cssinclude %][% END %] > </head> > [% INCLUDE 'bodytag.inc' bodyid='opac-illrequests' bodyclass='scrollto' %] >@@ -24,9 +25,9 @@ > [% IF method != 'list' %] > <li><a href="/cgi-bin/koha/opac-illrequests.pl">Interlibrary loan requests</a> <span class="divider">›</span></li> > [% IF method == 'create' %] >- <li>New Interlibrary loan request</li> >+ <li>New interlibrary loan request</li> > [% ELSIF method == 'view' %] >- <li>View Interlibrary loan request</li> >+ <li>View interlibrary loan request</li> > [% END %] > [% ELSE %] > <li>Interlibrary loan requests</li> >@@ -54,7 +55,7 @@ > [% ELSE %] > <div id="illrequests" class="maincontent"> > [% IF method == 'create' %] >- <h2>New Interlibrary loan request</h2> >+ <h2>New interlibrary loan request</h2> > [% IF stage == 'copyrightclearance' %] > [% INCLUDE messages %] > <div> >@@ -79,8 +80,8 @@ > </select> > </fieldset> > <fieldset class="action"> >- <input type="hidden" name="method" value="create"> >- <input type="submit" name="create_select_backend" value="Next"> >+ <input type="hidden" name="method" value="create" /> >+ <input type="submit" name="create_select_backend" value="Next" /> > </fieldset> > </form> > [% ELSE %] >@@ -116,8 +117,8 @@ > <th>Requested from</th> > <th>Request type</th> > <th>Status</th> >- <th>Request placed</th> >- <th>Last updated</th> >+ <th class="title-string">Request placed</th> >+ <th class="title-string">Last updated</th> > <th></th> > </tr> > </thead> >@@ -134,8 +135,8 @@ > <td>[% request.backend | html %]</td> > <td>[% request.medium | html %]</td> > <td>[% request.capabilities.$status.name | html %]</td> >- <td>[% request.placed | html %]</td> >- <td>[% request.updated | html %]</td> >+ <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td> >+ <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td> > <td> > <a href="/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=[% request.id | html %]" class="btn btn-default btn-small pull-right">View</a> > </td> >@@ -144,7 +145,7 @@ > </tbody> > </table> > [% ELSIF method == 'view' %] >- <h2>View Interlibrary loan request</h2> >+ <h2>View interlibrary loan request</h2> > [% INCLUDE messages %] > [% status = request.status | html %] > <form method="post" action="?method=update" id="illrequestupdate-form" novalidate="novalidate"> >@@ -175,11 +176,11 @@ > </li> > <li> > <label for="placed">Request placed:</label> >- [% request.placed | html %] >+ [% request.placed | $KohaDates %] > </li> > <li> > <label for="updated">Last updated:</label> >- [% request.updated | html %] >+ [% request.updated | $KohaDates %] > </li> > <li> > <label for="notesopac">Notes:</label> >@@ -201,13 +202,13 @@ > [% END %] > </div> > <fieldset class="action illrequest-actions"> >- <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]"> >- <input type="hidden" name="method" value="update"> >+ <input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" /> >+ <input type="hidden" name="method" value="update" /> > [% IF !request.completed %] > [% IF request.status == "NEW" %] > <a class="cancel-illrequest btn btn-danger" href="/cgi-bin/koha/opac-illrequests.pl?method=cancreq&illrequest_id=[% request.illrequest_id | html %]">Request cancellation</a> > [% END %] >- <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications"> >+ <input type="submit" class="update-illrequest btn btn-default" value="Submit modifications" /> > [% END %] > <span class="cancel"><a href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a></span> > </fieldset> >@@ -228,7 +229,8 @@ > //<![CDATA[ > $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, { > "columnDefs": [ >- { "targets": [ -1 ], "sortable": false, "searchable": false } >+ { "targets": [ -1 ], "sortable": false, "searchable": false }, >+ { "type": "title-string", "targets" : [ "title-string" ] } > ], > "order": [[ 3, "desc" ]], > "deferRender": true >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21497
:
80076
|
80650
|
80734