Lines 31-39
Allows authorized users to create and manage digital signs for the OPAC.
Link Here
|
31 |
|
31 |
|
32 |
=cut |
32 |
=cut |
33 |
|
33 |
|
34 |
use Koha::Sign; |
|
|
35 |
use Koha::Signs; |
34 |
use Koha::Signs; |
36 |
use Koha::SignStream; |
|
|
37 |
use Koha::SignStreams; |
35 |
use Koha::SignStreams; |
38 |
use Koha::SignsToStreams; |
36 |
use Koha::SignsToStreams; |
39 |
use Koha::Reports; |
37 |
use Koha::Reports; |
Lines 176-183
if ( $op eq 'add_stream' ) {
Link Here
|
176 |
} elsif ( $op eq 'view_sign' && $sign_id ne '' ) { |
174 |
} elsif ( $op eq 'view_sign' && $sign_id ne '' ) { |
177 |
|
175 |
|
178 |
# Getting sign streams attached to sign with records |
176 |
# Getting sign streams attached to sign with records |
179 |
my $schema = Koha::Database->new()->schema(); |
177 |
my @signstostreams = Koha::SignsToStreams->search({ 'me.sign_id' => $sign_id }, { prefetch => 'sign_stream' })->as_list; |
180 |
my @signstostreams = $schema->resultset('SignsToStream')->search({ 'me.sign_id' => $sign_id }, { prefetch => 'sign_stream' }); |
|
|
181 |
my @changedstreams; |
178 |
my @changedstreams; |
182 |
|
179 |
|
183 |
foreach my $s ( @signstostreams ) { |
180 |
foreach my $s ( @signstostreams ) { |
Lines 230-236
if ( $op eq 'add_stream' ) {
Link Here
|
230 |
} elsif ( $op eq 'edit_streams' && $sign_id ne '') { |
227 |
} elsif ( $op eq 'edit_streams' && $sign_id ne '') { |
231 |
|
228 |
|
232 |
my $sign = Koha::Signs->find( $sign_id ); |
229 |
my $sign = Koha::Signs->find( $sign_id ); |
233 |
my $streams = Koha::SignStreams->search({}); |
230 |
my $streams = Koha::SignStreams->search; |
234 |
my $signstostreams = Koha::SignsToStreams->search({ 'sign_id' => $sign_id }); |
231 |
my $signstostreams = Koha::SignsToStreams->search({ 'sign_id' => $sign_id }); |
235 |
|
232 |
|
236 |
$template->param( |
233 |
$template->param( |
Lines 302-309
if ( $op eq 'add_stream' ) {
Link Here
|
302 |
|
299 |
|
303 |
} else { |
300 |
} else { |
304 |
|
301 |
|
305 |
my @streams = Koha::SignStreams->search(); |
302 |
my @streams = Koha::SignStreams->search->as_list; |
306 |
my @signs = Koha::Signs->search(); |
303 |
my @signs = Koha::Signs->search->as_list; |
307 |
|
304 |
|
308 |
$template->param( |
305 |
$template->param( |
309 |
streams => \@streams, |
306 |
streams => \@streams, |
310 |
- |
|
|