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

(-)a/cataloguing/additem.pl (-1 / +14 lines)
Lines 169-175 if ( $op eq 'edititem' || $op eq 'dupeitem' ) { Link Here
169
        my $ondisplay = $item->active_display ? 1 : undef;
169
        my $ondisplay = $item->active_display ? 1 : undef;
170
        my $nomod     = $ondisplay;
170
        my $nomod     = $ondisplay;
171
171
172
        $template->param( ondisplay => $ondisplay, nomod => $nomod );
172
        $template->param(
173
            ondisplay => $ondisplay,
174
            nomod     => $nomod
175
        );
173
    }
176
    }
174
}
177
}
175
178
Lines 699-704 if ($op) { Link Here
699
702
700
# now, build existiing item list
703
# now, build existiing item list
701
704
705
my $bib_has_nomod;
706
my $bib_has_ondisplay;
707
702
my @items;
708
my @items;
703
for my $item ( $biblio->items->as_list, $biblio->host_items->as_list ) {
709
for my $item ( $biblio->items->as_list, $biblio->host_items->as_list ) {
704
    my $i = $item->columns_to_str;
710
    my $i = $item->columns_to_str;
Lines 713-718 for my $item ( $biblio->items->as_list, $biblio->host_items->as_list ) { Link Here
713
        }
719
        }
714
    }
720
    }
715
721
722
    $bib_has_nomod     = 1 if $i->{nomod};
723
    $bib_has_ondisplay = 1 if $i->{ondisplay};
724
716
    push @items, $i;
725
    push @items, $i;
717
}
726
}
718
727
Lines 837-842 $template->param( Link Here
837
    barcode          => $current_item->{barcode},
846
    barcode          => $current_item->{barcode},
838
    op               => $nextop,
847
    op               => $nextop,
839
    popup            => scalar $input->param('popup') ? 1 : 0,
848
    popup            => scalar $input->param('popup') ? 1 : 0,
849
    can_mod          => {
850
        nomod     => scalar $bib_has_nomod     ? 1 : 0,
851
        ondisplay => scalar $bib_has_ondisplay ? 1 : 0,
852
    },
840
    C4::Search::enabled_staff_search_views,
853
    C4::Search::enabled_staff_search_views,
841
);
854
);
842
$template->{'VARS'}->{'searchid'} = $searchid;
855
$template->{'VARS'}->{'searchid'} = $searchid;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-4 / +7 lines)
Lines 88-99 Link Here
88
        </div>
88
        </div>
89
    [% END %]
89
    [% END %]
90
    [% IF ( items ) %]
90
    [% IF ( items ) %]
91
        [% FOREACH item IN items %]
91
        [% IF ( can_mod.nomod ) %]
92
            [% IF item.ondisplay %]
92
            [% IF ( can_mod.ondisplay ) %]
93
                <div class="alert alert-warning">
93
                <div class="alert alert-warning">
94
                    <p> <strong>Item(s) on display:</strong> The following item is currently on display, and cannot be modified: </p>
94
                    <p> <strong>Item(s) on display:</strong> The following item is currently on display, and cannot be modified: </p>
95
                    <ul>
95
                    <ul>
96
                        <li><a href="/cgi-bin/koha/display/displays/[% item.active_display_id | url %]">[% item.barcode | html %]</a></li>
96
                        [% FOREACH item IN items %]
97
                            [% IF item.ondisplay %]
98
                                <li><a href="/cgi-bin/koha/display/displays/[% item.active_display_id | url %]">[% item.barcode | html %]</a></li>
99
                            [% END %]
100
                        [% END %]
97
                    </ul>
101
                    </ul>
98
                    <p> The permanent location for these item(s) is found below. To modify these details, edit the display, or remove the item from the display. </p>
102
                    <p> The permanent location for these item(s) is found below. To modify these details, edit the display, or remove the item from the display. </p>
99
                </div>
103
                </div>
100
- 

Return to bug 14962