View | Details | Raw Unified | Return to bug 8628
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt (-2 / +2 lines)
Lines 451-463 Link Here
451
            "aoColumnDefs": [
451
            "aoColumnDefs": [
452
                { "aTargets": [ -1 ], "bSearchable": false, "bSortable": false },
452
                { "aTargets": [ -1 ], "bSearchable": false, "bSortable": false },
453
            ],
453
            ],
454
            "sPaginationType": "four_button"
454
            "sPaginationType": "full"
455
        }));
455
        }));
456
        $("#table_streams").dataTable($.extend(true, {}, dataTablesDefaults, {
456
        $("#table_streams").dataTable($.extend(true, {}, dataTablesDefaults, {
457
            "aoColumnDefs": [
457
            "aoColumnDefs": [
458
                { "aTargets": [ -1 ], "bSearchable": false, "bSortable": false },
458
                { "aTargets": [ -1 ], "bSearchable": false, "bSortable": false },
459
            ],
459
            ],
460
            "sPaginationType": "four_button"
460
            "sPaginationType": "full"
461
        }));
461
        }));
462
462
463
        $(".detach").on("click", function(){
463
        $(".detach").on("click", function(){
(-)a/opac/opac-signs.pl (-3 / +2 lines)
Lines 50-57 if ( C4::Context->preference('OPACDigitalSigns') ) { Link Here
50
        $template->{VARS}->{'sign'} = Koha::Signs->find( $sign_id );
50
        $template->{VARS}->{'sign'} = Koha::Signs->find( $sign_id );
51
51
52
        # Getting sign streams attached to sign with records
52
        # Getting sign streams attached to sign with records
53
        my $schema = Koha::Database->new()->schema();
53
        my @signstostreams = Koha::SignsToStreams->search({ 'me.sign_id' => $sign_id }, { prefetch => 'sign_stream' })->as_list;
54
        my @signstostreams = $schema->resultset('SignsToStream')->search({ 'me.sign_id' => $sign_id }, { prefetch => 'sign_stream' });
55
        my @changedstreams;
54
        my @changedstreams;
56
        my %record_cache = ();
55
        my %record_cache = ();
57
        foreach my $s ( @signstostreams ) {
56
        foreach my $s ( @signstostreams ) {
Lines 106-112 if ( C4::Context->preference('OPACDigitalSigns') ) { Link Here
106
        }
105
        }
107
        $template->{VARS}->{'streams'} = \@changedstreams;
106
        $template->{VARS}->{'streams'} = \@changedstreams;
108
    } else { # Display a list of all available signs
107
    } else { # Display a list of all available signs
109
        $template->{VARS}->{'signs'} = Koha::Signs->search({});
108
        $template->{VARS}->{'signs'} = Koha::Signs->search;
110
    }
109
    }
111
}
110
}
112
111
(-)a/tools/signs.pl (-8 / +4 lines)
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
- 

Return to bug 8628