Bugzilla – Attachment 147010 Details for
Bug 8628
Add digital signs to the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8628: (follow-up) Fix search calls and table pagination
Bug-8628-follow-up-Fix-search-calls-and-table-pagi.patch (text/plain), 3.97 KB, created by
Aleisha Amohia
on 2023-02-21 04:09:15 UTC
(
hide
)
Description:
Bug 8628: (follow-up) Fix search calls and table pagination
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-02-21 04:09:15 UTC
Size:
3.97 KB
patch
obsolete
>From d2d6af45a6405e5b38f331e92de9bf029ebbbe08 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 21 Feb 2023 04:07:25 +0000 >Subject: [PATCH] Bug 8628: (follow-up) Fix search calls and table pagination > >--- > .../intranet-tmpl/prog/en/modules/tools/signs.tt | 4 ++-- > opac/opac-signs.pl | 5 ++--- > tools/signs.pl | 11 ++++------- > 3 files changed, 8 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt >index 931079996c..e3e3569c49 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt >@@ -451,13 +451,13 @@ > "aoColumnDefs": [ > { "aTargets": [ -1 ], "bSearchable": false, "bSortable": false }, > ], >- "sPaginationType": "four_button" >+ "sPaginationType": "full" > })); > $("#table_streams").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ > { "aTargets": [ -1 ], "bSearchable": false, "bSortable": false }, > ], >- "sPaginationType": "four_button" >+ "sPaginationType": "full" > })); > > $(".detach").on("click", function(){ >diff --git a/opac/opac-signs.pl b/opac/opac-signs.pl >index 7434788123..91fb5d9857 100755 >--- a/opac/opac-signs.pl >+++ b/opac/opac-signs.pl >@@ -50,8 +50,7 @@ if ( C4::Context->preference('OPACDigitalSigns') ) { > $template->{VARS}->{'sign'} = Koha::Signs->find( $sign_id ); > > # Getting sign streams attached to sign with records >- my $schema = Koha::Database->new()->schema(); >- my @signstostreams = $schema->resultset('SignsToStream')->search({ 'me.sign_id' => $sign_id }, { prefetch => 'sign_stream' }); >+ my @signstostreams = Koha::SignsToStreams->search({ 'me.sign_id' => $sign_id }, { prefetch => 'sign_stream' })->as_list; > my @changedstreams; > my %record_cache = (); > foreach my $s ( @signstostreams ) { >@@ -106,7 +105,7 @@ if ( C4::Context->preference('OPACDigitalSigns') ) { > } > $template->{VARS}->{'streams'} = \@changedstreams; > } else { # Display a list of all available signs >- $template->{VARS}->{'signs'} = Koha::Signs->search({}); >+ $template->{VARS}->{'signs'} = Koha::Signs->search; > } > } > >diff --git a/tools/signs.pl b/tools/signs.pl >index e243b59b97..8f8dddf7af 100755 >--- a/tools/signs.pl >+++ b/tools/signs.pl >@@ -31,9 +31,7 @@ Allows authorized users to create and manage digital signs for the OPAC. > > =cut > >-use Koha::Sign; > use Koha::Signs; >-use Koha::SignStream; > use Koha::SignStreams; > use Koha::SignsToStreams; > use Koha::Reports; >@@ -176,8 +174,7 @@ if ( $op eq 'add_stream' ) { > } elsif ( $op eq 'view_sign' && $sign_id ne '' ) { > > # Getting sign streams attached to sign with records >- my $schema = Koha::Database->new()->schema(); >- my @signstostreams = $schema->resultset('SignsToStream')->search({ 'me.sign_id' => $sign_id }, { prefetch => 'sign_stream' }); >+ my @signstostreams = Koha::SignsToStreams->search({ 'me.sign_id' => $sign_id }, { prefetch => 'sign_stream' })->as_list; > my @changedstreams; > > foreach my $s ( @signstostreams ) { >@@ -230,7 +227,7 @@ if ( $op eq 'add_stream' ) { > } elsif ( $op eq 'edit_streams' && $sign_id ne '') { > > my $sign = Koha::Signs->find( $sign_id ); >- my $streams = Koha::SignStreams->search({}); >+ my $streams = Koha::SignStreams->search; > my $signstostreams = Koha::SignsToStreams->search({ 'sign_id' => $sign_id }); > > $template->param( >@@ -302,8 +299,8 @@ if ( $op eq 'add_stream' ) { > > } else { > >- my @streams = Koha::SignStreams->search(); >- my @signs = Koha::Signs->search(); >+ my @streams = Koha::SignStreams->search->as_list; >+ my @signs = Koha::Signs->search->as_list; > > $template->param( > streams => \@streams, >-- >2.20.1
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 8628
:
42703
|
42704
|
45968
|
45969
|
58602
|
58603
|
58604
|
58605
|
62338
|
64249
|
66246
|
66247
|
66248
|
66249
|
66250
|
77025
|
77026
|
77027
|
77028
|
77141
|
77142
|
77143
|
77144
|
77145
|
78709
|
80248
|
80249
|
80250
|
80252
|
82896
|
82897
|
82898
|
82899
|
82900
|
82901
|
83312
|
88821
|
88822
|
88823
|
88824
|
88825
|
88826
|
93054
|
93055
|
93056
|
93057
|
93058
|
93059
|
93066
|
93067
|
93068
|
93069
|
93070
|
93071
|
99608
|
99609
|
99610
|
99611
|
99612
|
99613
|
99614
|
99615
|
99616
|
99617
|
99618
|
99619
|
99620
|
99621
|
99622
|
99623
|
99624
|
99717
|
99718
|
99801
|
118472
|
118473
|
118474
|
118475
|
118476
|
118477
|
118478
|
118479
|
118480
|
119455
|
131223
|
131224
|
145645
|
145646
|
145647
|
145648
|
145649
|
145650
|
145651
|
145652
|
145653
|
145654
|
147000
|
147001
|
147002
|
147003
|
147004
|
147005
|
147006
|
147007
|
147008
|
147009
| 147010