From 13c7a73e3e4c55d2da4a21307a591bd830798e4d Mon Sep 17 00:00:00 2001 From: Adrien Saurat Date: Mon, 19 Mar 2012 16:02:15 +0100 Subject: [PATCH] Bug 7744: use of TT date filters on basket pages TT date filters added on basket.pl and neworderempty.pl --- acqui/basket.pl | 10 ++++------ acqui/neworderempty.pl | 5 ++--- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 5 +++-- .../prog/en/modules/acqui/neworderempty.tt | 5 +++-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index 7864fee..4386125 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -29,7 +29,6 @@ use CGI; use C4::Acquisition; use C4::Budgets; use C4::Bookseller qw( GetBookSellerFromId); -use C4::Dates qw/format_date/; use C4::Debug; use C4::Biblio; use C4::Members qw/GetMember/; #needed for permissions checking for changing basketgroup of a basket @@ -126,10 +125,10 @@ if ( $op eq 'delete_confirm' ) { basketbooksellernote => $basket->{booksellernote}, basketcontractno => $basket->{contractnumber}, basketcontractname => $contract->{contractname}, - creationdate => format_date( $basket->{creationdate} ), + creationdate => $basket->{creationdate}, authorisedby => $basket->{authorisedby}, authorisedbyname => $basket->{authorisedbyname}, - closedate => format_date( $basket->{closedate} ), + closedate => $basket->{closedate}, active => $bookseller->{'active'}, booksellerid => $bookseller->{'id'}, name => $bookseller->{'name'}, @@ -364,14 +363,13 @@ my $total_est_gste; basketbooksellernote => $basket->{booksellernote}, basketcontractno => $basket->{contractnumber}, basketcontractname => $contract->{contractname}, - creationdate => C4::Dates->new($basket->{creationdate},'iso')->output, + creationdate => $basket->{creationdate}, authorisedby => $basket->{authorisedby}, authorisedbyname => $basket->{authorisedbyname}, - closedate => C4::Dates->new($basket->{closedate},'iso')->output, + closedate => $basket->{closedate}, active => $bookseller->{'active'}, booksellerid => $bookseller->{'id'}, name => $bookseller->{'name'}, - entrydate => C4::Dates->new($results[0]->{'entrydate'},'iso')->output, books_loop => \@books_loop, cancelledorders_loop => \@cancelledorders, gist_rate => sprintf( "%.2f", $gist * 100 ) . '%', diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 7fee382..b3468e8 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -75,7 +75,6 @@ use C4::Input; use C4::Auth; use C4::Budgets; use C4::Input; -use C4::Dates; use C4::Bookseller qw/ GetBookSellerFromId /; use C4::Acquisition; @@ -340,10 +339,10 @@ $template->param( basketbooksellernote => $basket->{booksellernote}, basketcontractno => $basket->{contractnumber}, basketcontractname => $contract->{contractname}, - creationdate => C4::Dates->new($basket->{creationdate},'iso')->output, + creationdate => $basket->{creationdate}, authorisedby => $basket->{'authorisedby'}, authorisedbyname => $basket->{'authorisedbyname'}, - closedate => C4::Dates->new($basket->{'closedate'},'iso')->output, + closedate => $basket->{'closedate'}, # order details suggestionid => $suggestion->{suggestionid}, surnamesuggestedby => $suggestion->{surnamesuggestedby}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 88578b2..90e583a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -1,3 +1,4 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %] [% INCLUDE 'doc-head-close.inc' %] @@ -178,8 +179,8 @@
  • Contract name: [% basketcontractname %]
  • [% END %] [% IF ( authorisedbyname ) %]
  • Managed by: [% authorisedbyname %]
  • [% END %] - [% IF ( creationdate ) %]
  • Opened on: [% creationdate %]
  • [% END %] - [% IF ( closedate ) %]
  • Closed on: [% closedate %]
  • [% END %] + [% IF ( creationdate ) %]
  • Opened on: [% creationdate | $KohaDates %]
  • [% END %] + [% IF ( closedate ) %]
  • Closed on: [% closedate | $KohaDates %]
  • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index e6464f2..c68dde9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -1,3 +1,4 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Basket [% basketno %] › [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -180,10 +181,10 @@ $(document).ready(function()
  • Contract name: [% basketcontractname %]
  • [% END %] [% IF ( authorisedbyname ) %]
  • Managed by: [% authorisedbyname %]
  • [% END %] - [% IF ( creationdate ) %]
  • Open on: [% creationdate %]
  • [% END %] + [% IF ( creationdate ) %]
  • Open on: [% creationdate | $KohaDates %]
  • [% END %] [% IF ( closedate ) %]
    -
  • Closed on: [% closedate %]
  • +
  • Closed on: [% closedate | $KohaDates %]
  • [% IF ( basketgroups ) %]
  • Basketgroup: