Bugzilla – Attachment 99192 Details for
Bug 24455
Add ability to apply Koha formatting to dates from Javascript
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
test tz
test-tz.patch (text/plain), 2.07 KB, created by
Jonathan Druart
on 2020-02-18 15:49:45 UTC
(
hide
)
Description:
test tz
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-18 15:49:45 UTC
Size:
2.07 KB
patch
obsolete
>From 0e18c97949a4c3d0a2da45242d87838ec96579e7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 18 Feb 2020 16:49:12 +0100 >Subject: [PATCH] test tz > >https://bugs.koha-community.org/show_bug.cgi?id=24455 >--- > koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 4 ++++ > mainpage.pl | 3 +++ > 2 files changed, 7 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index f6a213523e..5b32b53f69 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -212,6 +212,7 @@ > </div> <!-- /.container-fluid --> > > [% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'calendar.inc' %] > <script type="text/javascript"> > //<![CDATA[ > var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This cannot be undone."); >@@ -219,6 +220,9 @@ > $(".news_delete").on("click", function(){ > return confirmDelete(MSG_CONFIRM_DELETE); > }); >+ var dt = "[% dt %]"; >+ console.log(dt); >+ console.log(ISO_to_syspref(dt, 1)); > }); > //]]> > </script> >diff --git a/mainpage.pl b/mainpage.pl >index 49f46fc272..bd3dae3d78 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -75,6 +75,8 @@ my $pending_article_requests = Koha::ArticleRequests->search_limited( > } > )->count; > >+use Koha::DateUtils qw( dt_from_string output_pref ); >+my $dt = dt_from_string; > $template->param( > pendingcomments => $pendingcomments, > pendingtags => $pendingtags, >@@ -82,6 +84,7 @@ $template->param( > pending_borrower_modifications => $pending_borrower_modifications, > pending_discharge_requests => $pending_discharge_requests, > pending_article_requests => $pending_article_requests, >+ dt => output_pref({dt => $dt, dateformat => 'rfc3339', }), > ); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >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 24455
:
97567
|
97568
|
97569
|
97574
|
97575
|
97576
|
97577
|
97578
|
98625
|
99192
|
99195
|
99198
|
99869
|
99870
|
99871
|
99872
|
99873
|
99874
|
99875
|
100119
|
100120
|
100121
|
100122
|
100123
|
100124
|
100125
|
101708
|
101709
|
101710
|
101711
|
101712
|
101713
|
101714
|
101715