Bugzilla – Attachment 161206 Details for
Bug 35820
Table on Hold ratios page at circ/reserveratios.pl has wrong id
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35820: Fix table id on hold ratios page
Bug-35820-Fix-table-id-on-hold-ratios-page.patch (text/plain), 10.85 KB, created by
Marcel de Rooy
on 2024-01-19 11:00:58 UTC
(
hide
)
Description:
Bug 35820: Fix table id on hold ratios page
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-01-19 11:00:58 UTC
Size:
10.85 KB
patch
obsolete
>From ca10f19c94abf72076b5aa1880e8c71309105afd Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 17 Jan 2024 11:58:03 +0000 >Subject: [PATCH] Bug 35820: Fix table id on hold ratios page >Content-Type: text/plain; charset=utf-8 > >This patch corrects the ID on the table showing holds on the holds >ratios page so that it matches the DataTables initialization and >configuration. I'm not aware of any bug with the functionality, but >consistency is good. > >The patch also wraps the table in a "page-section" div, an update which >includes indentation changes. > >To test, apply the patch and if necessary, place multiple holds on a >title so that the hold ratios page will display results. > >- Go to Circulation -> Hold ratios. >- The table of hold ratios should look correct. >- Click the "Configure" button at the top of the table. >- On the table settings page, change the default visibility of some > columns. >- Return to the hold ratios page to confirm that the correct columns are > hidden by default. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/circ/reserveratios.tt | 180 +++++++++--------- > 1 file changed, 91 insertions(+), 89 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >index ae70c990a4..5b8533cde5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >@@ -49,94 +49,96 @@ > <div class="sql">[% sql | html %]</div> > > [% IF ( reserveloop ) %] >- <table id="holdst"> >- <thead> >- <tr> >- <th>Holds</th> >- <th>Items</th> >- <th>Hold ratio</th> >- <th class="anti-the">Title</th> >- <th>Home libraries</th> >- <th>Holding libraries</th> >- <th>Location</th> >- <th>Itype</th> >- <th>Collection</th> >- <th class="natural">Call numbers</th> >- <th>Items needed</th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH reserveloo IN reserveloop %] >- <tr> >- <td><p>[% reserveloo.reservecount | html %]</p></td> >- <td><p>[% reserveloo.itemcount | html %]</p></td> >- <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reserveloo.biblionumber | uri %]" >[% reserveloo.thisratio | html %]</a></td> >- <td> >- [% INCLUDE 'biblio-title.inc' biblio=reserveloo link = 1 %][% IF ( reserveloo.author ) %] by [% reserveloo.author | html %][% END %] >- </td> >- <td> >- <ul> >- [% FOREACH homebranch IN reserveloo.homebranch_list %] >- <li>[% Branches.GetName ( homebranch ) | html %]</li> >- [% END %] >- </ul> >- </td> >- <td> >- <ul> >- [% FOREACH holdingbranch IN reserveloo.holdingbranch_list %] >- <li>[% Branches.GetName ( holdingbranch ) | html %]</li> >- [% END %] >- </ul> >- </td> >- <td> >- <ul> >- [% FOREACH location IN reserveloo.location %] >- <li>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => location ) | html %]</li> >- [% END %] >- </ul> >- </td> >- <td> >- <ul> >- [% FOREACH itype IN reserveloo.itype %] >- <li>[% ItemTypes.GetDescription( itype ) | html %]</li> >- [% END %] >- </ul> >- </td> >- <td> >- <ul> >- [% FOREACH ccode IN reserveloo.ccode %] >- <li>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => ccode ) | html %]</li> >- [% END %] >- </ul> >- </td> >- <td> >- <ul> >- [% FOREACH listcall IN reserveloo.listcall %] >- <li>[% listcall | html %]</li> >- [% END %] >- </ul> >- </td> >- <td class="actions" data-sort="[% reserveloo.copies_to_buy | html %]"> >- <p> >- [% IF ( reserveloo.thisratio_atleast1 ) %] >- [% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.copies_to_buy | html %] --> >- <a href="/cgi-bin/koha/acqui/neworderempty.pl?biblionumber=[% reserveloo.biblionumber | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&rr_quantity_to_order=[% reserveloo.copies_to_buy | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% reserveloo.copies_to_buy | html %] to order</a> >- [% ELSE %] >- <strong>[% reserveloo.copies_to_buy | html %] to order</strong> >- [% END %] >- [% IF ( reserveloo.pendingorders ) %]<br><strong>[% reserveloo.pendingorders | html %] pending</strong>[% END %] >- [% ELSE %] >- <span>0 to order</span> >- [% END %] >- </p> >- </td> >- </tr> >- [% END %] >- </tbody> >- </table> >- [% ELSE %] >- <strong>No items found.</strong> >- [% END %] >+ <div class="page-section"> >+ <table id="holds-ratios"> >+ <thead> >+ <tr> >+ <th>Holds</th> >+ <th>Items</th> >+ <th>Hold ratio</th> >+ <th class="anti-the">Title</th> >+ <th>Home libraries</th> >+ <th>Holding libraries</th> >+ <th>Location</th> >+ <th>Itype</th> >+ <th>Collection</th> >+ <th class="natural">Call numbers</th> >+ <th>Items needed</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH reserveloo IN reserveloop %] >+ <tr> >+ <td><p>[% reserveloo.reservecount | html %]</p></td> >+ <td><p>[% reserveloo.itemcount | html %]</p></td> >+ <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reserveloo.biblionumber | uri %]" >[% reserveloo.thisratio | html %]</a></td> >+ <td> >+ [% INCLUDE 'biblio-title.inc' biblio=reserveloo link = 1 %][% IF ( reserveloo.author ) %] by [% reserveloo.author | html %][% END %] >+ </td> >+ <td> >+ <ul> >+ [% FOREACH homebranch IN reserveloo.homebranch_list %] >+ <li>[% Branches.GetName ( homebranch ) | html %]</li> >+ [% END %] >+ </ul> >+ </td> >+ <td> >+ <ul> >+ [% FOREACH holdingbranch IN reserveloo.holdingbranch_list %] >+ <li>[% Branches.GetName ( holdingbranch ) | html %]</li> >+ [% END %] >+ </ul> >+ </td> >+ <td> >+ <ul> >+ [% FOREACH location IN reserveloo.location %] >+ <li>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => location ) | html %]</li> >+ [% END %] >+ </ul> >+ </td> >+ <td> >+ <ul> >+ [% FOREACH itype IN reserveloo.itype %] >+ <li>[% ItemTypes.GetDescription( itype ) | html %]</li> >+ [% END %] >+ </ul> >+ </td> >+ <td> >+ <ul> >+ [% FOREACH ccode IN reserveloo.ccode %] >+ <li>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => ccode ) | html %]</li> >+ [% END %] >+ </ul> >+ </td> >+ <td> >+ <ul> >+ [% FOREACH listcall IN reserveloo.listcall %] >+ <li>[% listcall | html %]</li> >+ [% END %] >+ </ul> >+ </td> >+ <td class="actions" data-sort="[% reserveloo.copies_to_buy | html %]"> >+ <p> >+ [% IF ( reserveloo.thisratio_atleast1 ) %] >+ [% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.copies_to_buy | html %] --> >+ <a href="/cgi-bin/koha/acqui/neworderempty.pl?biblionumber=[% reserveloo.biblionumber | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&rr_quantity_to_order=[% reserveloo.copies_to_buy | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% reserveloo.copies_to_buy | html %] to order</a> >+ [% ELSE %] >+ <strong>[% reserveloo.copies_to_buy | html %] to order</strong> >+ [% END %] >+ [% IF ( reserveloo.pendingorders ) %]<br><strong>[% reserveloo.pendingorders | html %] pending</strong>[% END %] >+ [% ELSE %] >+ <span>0 to order</span> >+ [% END %] >+ </p> >+ </td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </div> <!-- /.page-section --> >+[% ELSE %] >+ <strong>No items found.</strong> >+[% END %] > > </main> > </div> <!-- /.col-sm-10.col-sm-push-2 --> >@@ -202,7 +204,7 @@ > <script> > var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %]; > $(document).ready(function() { >- KohaTable("holdst", { >+ KohaTable("holds-ratios", { > "aaSorting": [ [2,'desc'], [3,'asc'] ], > "aoColumnDefs": [ > { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >-- >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 35820
:
161096
|
161102
| 161206