Bugzilla – Attachment 103551 Details for
Bug 24718
Introduce hour-based holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24718: Get templates working with HourBasedHolds
Bug-24718-Get-templates-working-with-HourBasedHold.patch (text/plain), 7.55 KB, created by
David Nind
on 2020-04-23 10:04:00 UTC
(
hide
)
Description:
Bug 24718: Get templates working with HourBasedHolds
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-04-23 10:04:00 UTC
Size:
7.55 KB
patch
obsolete
>From f690b491b20d1d7eda0a180d15b7b70df4ecde3e Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 3 Feb 2020 21:03:51 +0000 >Subject: [PATCH] Bug 24718: Get templates working with HourBasedHolds > >Sponsored-by: Waikato Institute of Technology > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../prog/en/includes/waiting_holds.inc | 16 ++++++++++-- > .../prog/en/modules/circ/pendingreserves.tt | 7 +++++- > .../prog/en/modules/circ/view_holdsqueue.tt | 8 +++++- > .../prog/en/modules/members/holdshistory.tt | 12 ++++++++- > svc/holds | 29 +++++++++++++++++----- > 5 files changed, 61 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc >index e445ace165..337ff7b961 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc >@@ -19,8 +19,20 @@ > <tbody> > [% FOREACH reserveloo IN reserveloop %] > <tr> >- <td><span title="[% reserveloo.waitingdate | html %]">[% reserveloo.waitingdate | $KohaDates %]</span></td> >- <td><span title="[% reserveloo.reservedate | html %]">[% reserveloo.reservedate | $KohaDates %]</span></td> >+ <td><span title="[% reserveloo.waitingdate | html %]"> >+ [% IF Koha.Preference('HourBasedHolds') %] >+ [% reserveloo.waitingdate | $KohaDates with_hours = 1 %] >+ [% ELSE %] >+ [% reserveloo.waitingdate | $KohaDates %] >+ [% END %] >+ </span></td> >+ <td><span title="[% reserveloo.reservedate | html %]"> >+ [% IF Koha.Preference('HourBasedHolds') %] >+ [% reserveloo.reservedate | $KohaDates with_hours = 1 %] >+ [% ELSE %] >+ [% reserveloo.reservedate | $KohaDates %] >+ [% END %] >+ </span></td> > <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %] > [% INCLUDE 'biblio-title.inc' biblio=reserveloo.biblio %] > </a> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index 1510f81ed9..6cef08a45e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -143,7 +143,12 @@ > [% END %] > </td> > <td> >- <span title="[% reserveloo.reservedate | html %]">[% reserveloo.reservedate | $KohaDates %] in [% Branches.GetName ( reserveloo.branch ) | html %]</span> >+ <span title="[% reserveloo.reservedate | html %]"> >+ [% IF Koha.Preference('HourBasedHolds') %] >+ [% reserveloo.reservedate | $KohaDates with_hours = 1 %] >+ [% ELSE %] >+ [% reserveloo.reservedate | $KohaDates %] >+ [% END %] in [% Branches.GetName ( reserveloo.branch ) | html %]</span> > </td> > <td> > <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >index 63bc6263de..1ccf396452 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >@@ -169,7 +169,13 @@ > [% END %] > </td> > <td class="hq-sendto">[% Branches.GetName( itemsloo.pickbranch ) | html %]</td> >- <td class="hq-date"><span title="[% itemsloo.reservedate | html %]">[% itemsloo.reservedate | $KohaDates %]</span></td> >+ <td class="hq-date"><span title="[% itemsloo.reservedate | html %]"> >+ [% IF Koha.Preference('HourBasedHolds') %] >+ [% itemsloo.reservedate | $KohaDates with_hours = 1 %] >+ [% ELSE %] >+ [% itemsloo.reservedate | $KohaDates %] >+ [% END %] >+ </span></td> > <td class="hq-notes">[% itemsloo.notes | html %]</td> > </tr> > [% END %]</tbody> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >index 9510750cbe..eb3d33b1ef 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >@@ -61,10 +61,20 @@ > <td>[% hold.biblio.author | html %]</td> > <td>[% hold.item.barcode | html %]</td> > <td>[% Branches.GetName( hold.branchcode ) | html %]</td> >- <td><span title="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</span></td> >+ <td><span title="[% hold.reservedate | html %]"> >+ [% IF Koha.Preference('HourBasedHolds') %] >+ [% hold.reservedate | $KohaDates with_hours = 1 %] >+ [% ELSE %] >+ [% hold.reservedate | $KohaDates with_hours %] >+ [% END %] >+ </span></td> > <td> > [% IF hold.expirationdate %] >+ [% IF Koha.Preference('HourBasedHolds') %] >+ <span title="[% hold.expirationdate | html %]">[% hold.expirationdate | $KohaDates with_hours = 1 %]</span> >+ [% ELSE %] > <span title="[% hold.expirationdate | html %]">[% hold.expirationdate | $KohaDates %]</span> >+ [% END %] > [% ELSE %] > <span title="0000-00-00"></span> > [% END %] >diff --git a/svc/holds b/svc/holds >index af1b033063..45351d157f 100755 >--- a/svc/holds >+++ b/svc/holds >@@ -108,19 +108,36 @@ while ( my $h = $holds_rs->next() ) { > waiting_here => $h->branch()->branchcode() eq $branch, > priority => $h->priority(), > itemtype_limit => $itemtype_limit, >- reservedate_formatted => $h->reservedate() ? output_pref( >- { dt => dt_from_string( $h->reservedate() ), dateonly => 1 } >- ) >- : q{}, >+ subtitle => GetRecordValue( >+ 'subtitle', >+ GetMarcBiblio({ biblionumber => $biblionumber }), >+ GetFrameworkCode($biblionumber) >+ ), > suspend_until_formatted => $h->suspend_until() ? output_pref( > { dt => dt_from_string( $h->suspend_until() ), dateonly => 1 } > ) > : q{}, >- expirationdate_formatted => $h->expirationdate() ? output_pref( >+ }; >+ >+ if ( C4::Context->preference('HourBasedHolds') ){ >+ $hold->{reservedate_formatted} = $h->reservedate() ? output_pref( >+ { dt => dt_from_string( $h->reservedate() ) } >+ ) >+ : q{}, >+ $hold->{expirationdate_formatted} = $h->expirationdate() ? output_pref( >+ { dt => dt_from_string( $h->expirationdate() ) } >+ ) >+ : q{}, >+ } else { >+ $hold->{reservedate_formatted} = $h->reservedate() ? output_pref( >+ { dt => dt_from_string( $h->reservedate() ), dateonly => 1 } >+ ) >+ : q{}, >+ $hold->{expirationdate_formatted} = $h->expirationdate() ? output_pref( > { dt => dt_from_string( $h->expirationdate() ), dateonly => 1 } > ) > : q{}, >- }; >+ } > > $hold->{transfered} = 0; > $hold->{not_transfered} = 0; >-- >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 24718
:
99540
|
99541
|
99542
|
99543
|
99544
|
99545
|
99548
|
103521
|
103522
|
103549
|
103550
|
103551
|
103552
|
103553
|
103554
|
103555
|
106270
|
106271
|
106272
|
106273
|
106274
|
106275
|
110084
|
110085
|
110086
|
110087
|
110088
|
110089
|
110090
|
110091
|
110098
|
110137
|
110161
|
110303
|
126559
|
126560
|
126561
|
126562
|
126563
|
126564
|
148293
|
148294
|
148295
|
148296
|
148297
|
148298
|
162474
|
162475
|
162476
|
162477
|
162478
|
162479