Bugzilla – Attachment 152596 Details for
Bug 34012
Use template wrapper for tabs: Recalls awaiting pickup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34012: Use template wrapper for tabs: Recalls awaiting pickup
Bug-34012-Use-template-wrapper-for-tabs-Recalls-aw.patch (text/plain), 19.65 KB, created by
Katrin Fischer
on 2023-06-22 21:04:58 UTC
(
hide
)
Description:
Bug 34012: Use template wrapper for tabs: Recalls awaiting pickup
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-06-22 21:04:58 UTC
Size:
19.65 KB
patch
obsolete
>From 0f1db5cd8cf72ea444373f717a30d952da9b4a22 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 14 Jun 2023 17:09:48 +0000 >Subject: [PATCH] Bug 34012: Use template wrapper for tabs: Recalls awaiting > pickup > >This patch updates the recalls awaiting pickup template so that it uses >the new WRAPPER directive to build tabbed navigation. > >Note: this patch includes indentation changes, so check the diff >accordingly. > >To test you must have UseRecalls enabled. Apply the patch and go to >Circulation -> Recalls awaiting pickup. > >Both the "Recalls waiting" and "Recalls waiting over X days" tabs should >look correct and work correctly. > >Signed-off-by: Sam Lau <samalau@gmail.com> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../en/modules/recalls/recalls_waiting.tt | 202 +++++++++--------- > 1 file changed, 99 insertions(+), 103 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt >index 7d414fe03b..508f9005c1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt >@@ -35,110 +35,106 @@ > > [% IF Koha.Preference('UseRecalls') %] > >- <div id="results" class="toptabs"> >+ [% WRAPPER tabs id= "results" %] >+ [% WRAPPER tabs_nav %] >+ [% WRAPPER tab_item tabname= "recallswaiting" bt_active= 1 %] <span>Recalls waiting: [% recalls.count | html %]</span> [% END %] >+ [% WRAPPER tab_item tabname= "recallsover" %] <span>Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %]</span> [% END %] >+ [% END # /WRAPPER tabs_nav %] > >- <ul class="nav nav-tabs" role="tablist"> >- <li role="presentation" class="active"> >- <a href="#recallswaiting" aria-controls="recallswaiting" role="tab" data-toggle="tab">Recalls waiting: [% recalls.count | html %]</a> >- </li> >- <li role="presentation"> >- <a href="#recallsover" aria-controls="recallsover" role="tab" data-toggle="tab">Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %]</a> >- </li> >- </ul> >- >- <div class="tab-content"> >- <div id="recallswaiting" role="tabpanel" class="tab-pane active"> >- [% IF ( recalls ) %] >- <table id="recallswaiting-table"> >- <thead><tr> >- <th class="recall-waitingdate title-string">Available since</th> >- <th class="recall-title anti-the">Title</th> >- <th class="recall-patron">Requested by</th> >- <th class="recall-library">Pickup location</th> >- <th class="recall-action nosort"> </th> >- </tr></thead> >- <tbody> >- [% FOREACH recall IN recalls %]<tr> >- <td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td> >- <td class="recall-title"> >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblio_id | uri %]"> >- [% recall.biblio.title | html %] >- [% FOREACH s IN recall.biblio.subtitle %] >- [% s | html %] >- [% END %] >- </a> >- [% recall.biblio.author | html %] >- <br><i>Barcode: [% recall.item.barcode | html %]</i> >- </td> >- <td class="recall-patron"> >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a> >- [% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %] >- [% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %] >- </td> >- <td class="recall-library">[% recall.library.branchname | html %]</td> >- <td class="recall-action actions"> >- <form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post"> >- <input type="hidden" name="recall_id" value="[% recall.id | html %]"> >- <input type="hidden" name="op" value="modify"> >- <fieldset class="action"> >- <button type="submit" name="revert" value="revert" class="btn btn-default btn-sm revert_recall"><i class="fa fa-undo"></i> Revert waiting status</button> >- <button type="submit" name="expire" value="expire" class="btn btn-default btn-sm expire_recall"><i class="fa fa-undo"></i> Expire recall</button> >- </fieldset> >- </form> >- </td> >- </tr>[% END %] >- </tbody> >- </table> >- [% ELSE %] >- <div class="dialog message">There are no recalls to show.</div> >- [% END %] >- </div> <!-- recallswaiting --> >- >- <div id="recallsover" role="tabpanel" class="tab-pane"> >- [% IF ( over.size ) %] >- [% IF ( Koha.Preference('RecallsMaxPickUpDelay') ) %]<p>Recalls listed here have been awaiting pickup for more than [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days.</p>[% END %] >- <table id="recallsover-table"> >- <thead><tr> >- <th class="recall-waitingdate title-string">Available since</th> >- <th class="recall-title anti-the">Title</th> >- <th class="recall-patron">Requested by</th> >- <th class="recall-library">Pickup location</th> >- <th class="recall-action nosort"> </th> >- </tr></thead> >- <tbody> >- [% FOREACH recall IN over %]<tr> >- <td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td> >- <td class="recall-title"> >- [% INCLUDE 'biblio-title.inc' biblio=recall.biblio link = 1 %] >- [% IF recall.biblio.author %] by [% recall.biblio.author | html %][% END %] >- [% recall.item.enumchron | html %] >- [% IF ( recall.item.barcode ) %]<br><em>Barcode: [% recall.item.barcode | html %]</em>[% END %] >- </td> >- <td class="recall-patron"> >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a> >- [% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %] >- [% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %] >- </td> >- <td class="recall-library">[% recall.library.branchname | html %]</td> >- <td class="recall-action actions"> >- <form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post"> >- <input type="hidden" name="recall_id" value="[% recall.id | html %]"> >- <input type="hidden" name="op" value="modify"> >- <fieldset class="action"> >- <button type="submit" name="revert" value="revert" class="btn btn-default btn-sm revert_recall"><i class="fa fa-undo"></i> Revert waiting status</button> >- <button type="submit" name="expire" value="expire" class="btn btn-default btn-sm expire_recall"><i class="fa fa-undo"></i> Expire recall</button> >- </fieldset> >- </form> >- </td> >- </tr>[% END %] >- </tbody> >- </table> >- [% ELSE %] >- <div class="dialog message">There are no recalls to show.</div> >- [% END %] >- </div> <!-- recallsover --> >- </div> <!-- /.tab-content --> >- </div> <!-- results--> >+ [% WRAPPER tab_panels %] >+ [% WRAPPER tab_panel tabname="recallswaiting" bt_active= 1 %] >+ [% IF ( recalls ) %] >+ <table id="recallswaiting-table"> >+ <thead><tr> >+ <th class="recall-waitingdate title-string">Available since</th> >+ <th class="recall-title anti-the">Title</th> >+ <th class="recall-patron">Requested by</th> >+ <th class="recall-library">Pickup location</th> >+ <th class="recall-action nosort"> </th> >+ </tr></thead> >+ <tbody> >+ [% FOREACH recall IN recalls %]<tr> >+ <td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td> >+ <td class="recall-title"> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblio_id | uri %]"> >+ [% recall.biblio.title | html %] >+ [% FOREACH s IN recall.biblio.subtitle %] >+ [% s | html %] >+ [% END %] >+ </a> >+ [% recall.biblio.author | html %] >+ <br><i>Barcode: [% recall.item.barcode | html %]</i> >+ </td> >+ <td class="recall-patron"> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a> >+ [% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %] >+ [% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %] >+ </td> >+ <td class="recall-library">[% recall.library.branchname | html %]</td> >+ <td class="recall-action actions"> >+ <form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post"> >+ <input type="hidden" name="recall_id" value="[% recall.id | html %]"> >+ <input type="hidden" name="op" value="modify"> >+ <fieldset class="action"> >+ <button type="submit" name="revert" value="revert" class="btn btn-default btn-sm revert_recall"><i class="fa fa-undo"></i> Revert waiting status</button> >+ <button type="submit" name="expire" value="expire" class="btn btn-default btn-sm expire_recall"><i class="fa fa-undo"></i> Expire recall</button> >+ </fieldset> >+ </form> >+ </td> >+ </tr>[% END %] >+ </tbody> >+ </table> >+ [% ELSE %] >+ <div class="dialog message">There are no recalls to show.</div> >+ [% END %] >+ [% END # /tab_panel# %] >+ [% WRAPPER tab_panel tabname="recallsover" %] >+ <div id="recallsover" role="tabpanel" class="tab-pane"> >+ [% IF ( over.size ) %] >+ [% IF ( Koha.Preference('RecallsMaxPickUpDelay') ) %]<p>Recalls listed here have been awaiting pickup for more than [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days.</p>[% END %] >+ <table id="recallsover-table"> >+ <thead><tr> >+ <th class="recall-waitingdate title-string">Available since</th> >+ <th class="recall-title anti-the">Title</th> >+ <th class="recall-patron">Requested by</th> >+ <th class="recall-library">Pickup location</th> >+ <th class="recall-action nosort"> </th> >+ </tr></thead> >+ <tbody> >+ [% FOREACH recall IN over %]<tr> >+ <td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td> >+ <td class="recall-title"> >+ [% INCLUDE 'biblio-title.inc' biblio=recall.biblio link = 1 %] >+ [% IF recall.biblio.author %] by [% recall.biblio.author | html %][% END %] >+ [% recall.item.enumchron | html %] >+ [% IF ( recall.item.barcode ) %]<br><em>Barcode: [% recall.item.barcode | html %]</em>[% END %] >+ </td> >+ <td class="recall-patron"> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a> >+ [% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %] >+ [% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %] >+ </td> >+ <td class="recall-library">[% recall.library.branchname | html %]</td> >+ <td class="recall-action actions"> >+ <form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post"> >+ <input type="hidden" name="recall_id" value="[% recall.id | html %]"> >+ <input type="hidden" name="op" value="modify"> >+ <fieldset class="action"> >+ <button type="submit" name="revert" value="revert" class="btn btn-default btn-sm revert_recall"><i class="fa fa-undo"></i> Revert waiting status</button> >+ <button type="submit" name="expire" value="expire" class="btn btn-default btn-sm expire_recall"><i class="fa fa-undo"></i> Expire recall</button> >+ </fieldset> >+ </form> >+ </td> >+ </tr>[% END %] >+ </tbody> >+ </table> >+ [% ELSE %] >+ <div class="dialog message">There are no recalls to show.</div> >+ [% END %] >+ </div> <!-- recallsover --> >+ [% END # /tab_panel# %] >+ [% END # /WRAPPER tab_panels %] >+ [% END # /WRAPPER tabs %] > > [% ELSE %] > <div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div> >-- >2.30.2
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 34012
:
152351
|
152358
|
152361
|
152362
| 152596