From e339dfdea4e40b31eae414442542ca64a5005d00 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 12 Oct 2017 16:00:49 -0300 Subject: [PATCH] Bug 19287: Refactor the template to avoid c/p code The two tabs were using the same code. The only change I found is the subject of the mailto link, I am not sure it is relevant to have two different subjects (?) There was also a phone number info displayed on only one table. --- .../prog/en/modules/circ/waitingreserves.tt | 241 ++++++++------------- 1 file changed, 94 insertions(+), 147 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt index f4da1e14bd..a0bc10f13a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -82,94 +82,47 @@
- [% IF ( reserveloop ) %] - - - - - - - - - - - - - [% FOREACH reserveloo IN reserveloop %] - - - - - - - - - - - - [% END %] -
Available sinceTitlePatronHome branchCurrent locationCall numberCopy numberEnumerationAction
[% reserveloo.waitingdate | $KohaDates %][% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %] - [% reserveloo.title |html %] [% FOREACH subtitl IN reserveloo.subtitle %] [% subtitl.subfield %][% END %] - - [% UNLESS ( item_level_itypes ) %][% IF ( reserveloo.itemtype ) %]  ([% reserveloo.itemtype %])[% END %][% END %] -
Barcode: [% reserveloo.barcode %] -
[% reserveloo.borrowername %], [% reserveloo.borrowerfirstname %] - [% IF ( reserveloo.borrowerphone ) %]
[% reserveloo.borrowerphone %][% END %] - [% IF ( reserveloo.borrowermail ) %]
- [% reserveloo.borrowermail %][% END %] -
[% Branches.GetName( reserveloo.homebranch ) %][% Branches.GetName( reserveloo.holdingbranch ) %][% reserveloo.itemcallnumber %][% reserveloo.copynumber %][% reserveloo.enumchron %] -
- - - - - - - [% IF ( reserveloo.dotransfer ) %] - - [% ELSE %] - - [% END %] -
- [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') != 'no' %] -
- - - - - [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes' %] - - - [% ELSIF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes_and_notify' %] - - - [% END %] -
+ [% PROCESS display_holds_waiting_table holds => reserveloop, tab => 'holdswaiting' %] + +
+ [% IF ( ReservesMaxPickUpDelay ) %]

Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay %] days.

[% END %] + [% IF overloop %] +
+ + + + [% IF TransferWhenCancelAllWaitingHolds %] + + [% ELSE %] + [% END %] -
- [% ELSE %] -
No holds found.
- [% END %] + + + [% UNLESS TransferWhenCancelAllWaitingHolds %] + Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds sypref) + [% END %] + [% END %] + [% PROCESS display_holds_waiting_table holds => overloop, tab => 'holdsover' %] +
-
- [% IF ( ReservesMaxPickUpDelay ) %]

Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay %] days.

[% END %] - [% IF ( overloop ) %] -
- - - - [% IF TransferWhenCancelAllWaitingHolds %] - - [% ELSE %] - - [% END %] -
- [% UNLESS TransferWhenCancelAllWaitingHolds %] - Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds sypref) - [% END %] + [% END %] - - + + +[% IF Koha.Preference('CircSidebar') %] + +
+ [% INCLUDE 'circ-nav.inc' %] +
+[% END %] + +[% INCLUDE 'intranet-bottom.inc' %] + +[% BLOCK display_holds_waiting_table %] + [% IF holds %] +
+ + @@ -179,72 +132,66 @@ - - [% FOREACH overloo IN overloop %] + + + + [% FOREACH hold IN holds %] - - - - - - - - - + + + + + + + + - - [% END %] -
Available since Title PatronCopy number Enumeration Action

[% overloo.waitingdate | $KohaDates %]

[% INCLUDE 'biblio-default-view.inc' biblionumber = overloo.biblionumber %][% overloo.title |html %] - [% FOREACH subtitl IN overloo.subtitle %] [% subtitl.subfield %][% END %] - - [% UNLESS ( item_level_itypes ) %][% IF ( overloo.itemtype ) %]  ([% overloo.itemtype %])[% END %][% END %] -
Barcode: [% overloo.barcode %] -
[% overloo.borrowername %], [% overloo.borrowerfirstname %]
[% overloo.borrowerphone %]
- [% IF ( overloo.borrowermail ) %] - [% overloo.borrowermail %][% END %] -
[% Branches.GetName( overloo.homebranch ) %][% Branches.GetName( overloo.holdingbranch ) %][% overloo.itemcallnumber %][% overloo.copynumber %][% overloo.enumchron %]
- - - - - - - [% IF ( overloo.dotransfer ) %] - - [% ELSE %] - - [% END %] -
- [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') != 'no' %] +
[% hold.waitingdate | $KohaDates %] + [% INCLUDE 'biblio-default-view.inc' biblionumber = hold.biblionumber %] + [% hold.title |html %] + [% FOREACH subtitl IN hold.subtitle %] [% subtitl.subfield %][% END %] + + [% UNLESS ( item_level_itypes ) %][% IF ( hold.itemtype ) %]  ([% hold.itemtype %])[% END %][% END %] +
Barcode: [% hold.barcode %] +
+ [% hold.borrowername %], [% hold.borrowerfirstname %] + [% IF ( hold.borrowerphone ) %]
[% hold.borrowerphone %][% END %] + [% IF ( hold.borrowermail ) %]
+ [% hold.borrowermail %][% END %] +
[% Branches.GetName( hold.homebranch ) %][% Branches.GetName( hold.holdingbranch ) %][% hold.itemcallnumber %][% hold.copynumber %][% hold.enumchron %]
- - - - - [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes' %] - - - [% ELSIF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes_and_notify' %] - - + + + + + + + [% IF ( hold.dotransfer ) %] + + [% ELSE %] + [% END %]
- [% END %] - -
- [% ELSE %] -
No holds found.
+ [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') != 'no' %] +
+ + + + + [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes' %] + + + [% ELSIF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes_and_notify' %] + + + [% END %] +
+ [% END %] + + [% END %] -
- + + + [% ELSE %] +
No holds found.
[% END %] - - - -[% IF Koha.Preference('CircSidebar') %] - -
- [% INCLUDE 'circ-nav.inc' %] -
[% END %] - -[% INCLUDE 'intranet-bottom.inc' %] -- 2.11.0