Bugzilla – Attachment 68254 Details for
Bug 19287
Add ability to mark an item 'Lost' from 'Holds to pull' list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19287: Refactor the template to avoid c/p code
Bug-19287-Refactor-the-template-to-avoid-cp-code.patch (text/plain), 17.00 KB, created by
Jonathan Druart
on 2017-10-18 14:36:33 UTC
(
hide
)
Description:
Bug 19287: Refactor the template to avoid c/p code
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-10-18 14:36:33 UTC
Size:
17.00 KB
patch
obsolete
>From 27b37a192294f6eed8138729ea0b62eb654cc526 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 @@ > </li> > </ul> > <div id="holdswaiting"> >- [% IF ( reserveloop ) %] >- <table id="holdst"> >- <thead><tr> >- <th class="title-string">Available since</th> >- <th class="anti-the">Title</th> >- <th>Patron</th> >- <th>Home branch</th> >- <th>Current location</th> >- <th>Call number</th> >- <th>Copy number</th> >- <th>Enumeration</th> >- <th>Action</th> >- </tr></thead> >- <tbody>[% FOREACH reserveloo IN reserveloop %] >- <tr> >- <td><span title="[% reserveloo.waitingdate %]">[% reserveloo.waitingdate | $KohaDates %]</span></td> >- <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %] >- [% reserveloo.title |html %] [% FOREACH subtitl IN reserveloo.subtitle %] [% subtitl.subfield %][% END %] >- </a> >- [% UNLESS ( item_level_itypes ) %][% IF ( reserveloo.itemtype ) %] (<b>[% reserveloo.itemtype %]</b>)[% END %][% END %] >- <br />Barcode: [% reserveloo.barcode %] >- </td> >- <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernum %]">[% reserveloo.borrowername %], [% reserveloo.borrowerfirstname %]</a> >- [% IF ( reserveloo.borrowerphone ) %]<br />[% reserveloo.borrowerphone %][% END %] >- [% IF ( reserveloo.borrowermail ) %]<br /><a href="mailto:[% reserveloo.borrowermail %]?subject=Hold waiting: [% reserveloo.title %]"> >- [% reserveloo.borrowermail %]</a>[% END %] >- </td> >- <td>[% Branches.GetName( reserveloo.homebranch ) %]</td> >- <td>[% Branches.GetName( reserveloo.holdingbranch ) %]</td> >- <td>[% reserveloo.itemcallnumber %]</td> >- <td>[% reserveloo.copynumber %]</td> >- <td>[% reserveloo.enumchron %]</td> >- <td> >- <form name="cancelReserve" action="waitingreserves.pl" method="post"> >- <input type="hidden" name="op" value="cancel_reserve" /> >- <input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernum %]" /> >- <input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber %]" /> >- <input type="hidden" name="fbr" value="[% reserveloo.holdingbranch %]" /> >- <input type="hidden" name="tbr" value="[% reserveloo.homebranch %]" /> >- <input type="hidden" name="tab" value="holdswaiting"> >- [% IF ( reserveloo.dotransfer ) %] >- <input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) %]" /> >- [% ELSE %] >- <input type="submit" value="Cancel hold" /> >- [% END %] >- </form> >- [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') != 'no' %] >- <form name="cancelReserve" action="waitingreserves.pl" method="post"> >- <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" /> >- <input type="hidden" name="fbr" value="[% reserveloo.holdingbranch %]" /> >- <input type="hidden" name="tbr" value="[% reserveloo.homebranch %]" /> >- <input type="hidden" name="tab" value="holdswaiting"> >- [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes' %] >- <input type="hidden" name="op" value="mark_as_lost" /> >- <input type="submit" value="Mark item as lost" /> >- [% ELSIF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes_and_notify' %] >- <input type="hidden" name="op" value="mark_as_lost_and_notify" /> >- <input type="submit" value="Mark item as lost and notify the patron" /> >- [% END %] >- </form> >+ [% PROCESS display_holds_waiting_table holds => reserveloop, tab => 'holdswaiting' %] >+ </div> >+ <div id="holdsover"> >+ [% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay %] days.</p>[% END %] >+ [% IF overloop %] >+ <form name="cancelAllReserve" action="waitingreserves.pl" method="post"> >+ <input type="hidden" name="cancelall" value="1" /> >+ <input type="hidden" name="allbranches" value="[% allbranches %]" /> >+ <input type="hidden" name="tab" value="holdsover"> >+ [% IF TransferWhenCancelAllWaitingHolds %] >+ <input type="submit" value="Cancel and Transfer all" /> >+ [% ELSE %] >+ <input type="submit" value="Cancel all" /> > [% END %] >- </td> >- </tr> >- [% END %]</tbody> >- </table> >- [% ELSE %] >- <div class="dialog message">No holds found.</div> >- [% END %] >+ </form> >+ >+ [% 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' %] >+ </div> > </div> >- <div id="holdsover"> >- [% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay %] days.</p>[% END %] >- [% IF ( overloop ) %] >- <form name="cancelAllReserve" action="waitingreserves.pl" method="post"> >- <input type="hidden" name="op" value="cancel_all" /> >- <input type="hidden" name="allbranches" value="[% allbranches %]" /> >- <input type="hidden" name="tab" value="holdsover"> >- [% IF TransferWhenCancelAllWaitingHolds %] >- <input type="submit" value="Cancel and Transfer all" /> >- [% ELSE %] >- <input type="submit" value="Cancel all" /> >- [% END %] >- </form> >- [% UNLESS TransferWhenCancelAllWaitingHolds %] >- Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds sypref) >- [% END %] >+ [% END %] > >- <table id="holdso"> >- <thead><tr> >+</div> >+</div> >+[% IF Koha.Preference('CircSidebar') %] >+</div> >+<div class="yui-b noprint"> >+ [% INCLUDE 'circ-nav.inc' %] >+</div> >+[% END %] >+</div> >+[% INCLUDE 'intranet-bottom.inc' %] >+ >+[% BLOCK display_holds_waiting_table %] >+ [% IF holds %] >+ <table id="holdst"> >+ <thead> >+ <tr> > <th class="title-string">Available since</th> > <th class="anti-the">Title</th> > <th>Patron</th> >@@ -179,72 +132,66 @@ > <th>Copy number</th> > <th>Enumeration</th> > <th>Action</th> >- </tr></thead> >- <tbody>[% FOREACH overloo IN overloop %] >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH hold IN holds %] > <tr> >- <td><p><span title="[% overloo.waitingdate %]">[% overloo.waitingdate | $KohaDates %]</span></p></td> >- <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = overloo.biblionumber %][% overloo.title |html %] >- [% FOREACH subtitl IN overloo.subtitle %] [% subtitl.subfield %][% END %] >- </a> >- [% UNLESS ( item_level_itypes ) %][% IF ( overloo.itemtype ) %] (<b>[% overloo.itemtype %]</b>)[% END %][% END %] >- <br />Barcode: [% overloo.barcode %] >- </td> >- <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overloo.borrowernum %]">[% overloo.borrowername %], [% overloo.borrowerfirstname %]</a><br />[% overloo.borrowerphone %]<br /> >- [% IF ( overloo.borrowermail ) %]<a href="mailto:[% overloo.borrowermail %]?subject=Reservation: [% overloo.title |url %]"> >- [% overloo.borrowermail %]</a>[% END %] >- </td> >- <td>[% Branches.GetName( overloo.homebranch ) %]</td> >- <td>[% Branches.GetName( overloo.holdingbranch ) %]</td> >- <td>[% overloo.itemcallnumber %]</td> >- <td>[% overloo.copynumber %]</td> >- <td>[% overloo.enumchron %]</td> >- <td><form name="cancelReserve" action="waitingreserves.pl" method="post"> >- <input type="hidden" name="op" value="cancel_reserve" /> >- <input type="hidden" name="borrowernumber" value="[% overloo.borrowernum %]" /> >- <input type="hidden" name="itemnumber" value="[% overloo.itemnumber %]" /> >- <input type="hidden" name="fbr" value="[% overloo.holdingbranch %]" /> >- <input type="hidden" name="tbr" value="[% overloo.homebranch %]" /> >- <input type="hidden" name="tab" value="holdsover"> >- [% IF ( overloo.dotransfer ) %] >- <input type="submit" value="Cancel hold and return to : [% Branches.GetName( overloo.homebranch ) %]" /> >- [% ELSE %] >- <input type="submit" value="Cancel hold" /> >- [% END %] >- </form> >- [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') != 'no' %] >+ <td><span title="[% hold.waitingdate %]">[% hold.waitingdate | $KohaDates %]</span></td> >+ <td> >+ [% INCLUDE 'biblio-default-view.inc' biblionumber = hold.biblionumber %] >+ [% hold.title |html %] >+ [% FOREACH subtitl IN hold.subtitle %] [% subtitl.subfield %][% END %] >+ </a> >+ [% UNLESS ( item_level_itypes ) %][% IF ( hold.itemtype ) %] (<b>[% hold.itemtype %]</b>)[% END %][% END %] >+ <br />Barcode: [% hold.barcode %] >+ </td> >+ <td> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% hold.borrowernum %]">[% hold.borrowername %], [% hold.borrowerfirstname %]</a> >+ [% IF ( hold.borrowerphone ) %]<br />[% hold.borrowerphone %][% END %] >+ [% IF ( hold.borrowermail ) %]<br /><a href="mailto:[% hold.borrowermail %]?subject=Hold waiting: [% hold.title %]"> >+ [% hold.borrowermail %]</a>[% END %] >+ </td> >+ <td>[% Branches.GetName( hold.homebranch ) %]</td> >+ <td>[% Branches.GetName( hold.holdingbranch ) %]</td> >+ <td>[% hold.itemcallnumber %]</td> >+ <td>[% hold.copynumber %]</td> >+ <td>[% hold.enumchron %]</td> >+ <td> > <form name="cancelReserve" action="waitingreserves.pl" method="post"> >- <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" /> >- <input type="hidden" name="fbr" value="[% reserveloo.holdingbranch %]" /> >- <input type="hidden" name="tbr" value="[% reserveloo.homebranch %]" /> >- <input type="hidden" name="tab" value="holdswaiting"> >- [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes' %] >- <input type="hidden" name="op" value="mark_as_lost" /> >- <input type="submit" value="Mark item as lost" /> >- [% ELSIF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes_and_notify' %] >- <input type="hidden" name="op" value="mark_as_lost_and_notify" /> >- <input type="submit" value="Mark item as lost and notify the patron" /> >+ <input type="hidden" name="op" value="cancel_reserve" /> >+ <input type="hidden" name="borrowernumber" value="[% hold.borrowernum %]" /> >+ <input type="hidden" name="itemnumber" value="[% hold.itemnumber %]" /> >+ <input type="hidden" name="fbr" value="[% hold.holdingbranch %]" /> >+ <input type="hidden" name="tbr" value="[% hold.homebranch %]" /> >+ <input type="hidden" name="tab" value="[% tab %]"> >+ [% IF ( hold.dotransfer ) %] >+ <input type="submit" value="Cancel hold and return to : [% Branches.GetName( hold.homebranch ) %]" /> >+ [% ELSE %] >+ <input type="submit" value="Cancel hold" /> > [% END %] > </form> >- [% END %] >- >- </td> >- </tr> >- [% END %]</tbody> >- </table> >- [% ELSE %] >- <div class="dialog message">No holds found.</div> >+ [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') != 'no' %] >+ <form name="cancelReserve" action="waitingreserves.pl" method="post"> >+ <input type="hidden" name="reserve_id" value="[% hold.reserve_id %]" /> >+ <input type="hidden" name="fbr" value="[% hold.holdingbranch %]" /> >+ <input type="hidden" name="tbr" value="[% hold.homebranch %]" /> >+ <input type="hidden" name="tab" value="[% tab %]"> >+ [% IF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes' %] >+ <input type="hidden" name="op" value="mark_as_lost" /> >+ <input type="submit" value="Mark item as lost" /> >+ [% ELSIF Koha.Preference('CanMarkHoldsAwaitingPickupAsLost') == 'yes_and_notify' %] >+ <input type="hidden" name="op" value="mark_as_lost_and_notify" /> >+ <input type="submit" value="Mark item as lost and notify the patron" /> >+ [% END %] >+ </form> >+ [% END %] >+ </td> >+ </tr> > [% END %] >- </div> >- </div> >+ </tbody> >+ </table> >+ [% ELSE %] >+ <div class="dialog message">No holds found.</div> > [% END %] >- >-</div> >-</div> >-[% IF Koha.Preference('CircSidebar') %] >-</div> >-<div class="yui-b noprint"> >- [% INCLUDE 'circ-nav.inc' %] >-</div> > [% END %] >-</div> >-[% INCLUDE 'intranet-bottom.inc' %] >-- >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 19287
:
68226
|
68227
|
68228
|
68229
|
68230
|
68251
|
68252
|
68253
|
68254
|
68255
|
68284
|
69746
|
70705
|
70764
|
70918
|
70919
|
73881
|
73882
|
73883
|
73884
|
73885
|
73886
|
73887
|
73888
|
73889
|
74696
|
74697
|
74698
|
74699
|
74700
|
74701
|
74702
|
74703
|
74704
|
74705
|
74749
|
75535