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

(-)a/Koha/Acquisition/Order.pm (-1 / +1 lines)
Lines 131-137 sub cancel { Link Here
131
            $self->add_message(
131
            $self->add_message(
132
                {
132
                {
133
                    message => 'error_delitem',
133
                    message => 'error_delitem',
134
                    payload => { item => $item, reason => @{$deleted->messages}[0]->messages }
134
                    payload => { item => $item, reason => @{$deleted->messages}[0]->message }
135
                }
135
                }
136
            );
136
            );
137
        }
137
        }
(-)a/Koha/BackgroundJob/BatchDeleteBiblio.pm (-1 / +1 lines)
Lines 119-125 sub process { Link Here
119
                    code => 'item_not_deleted',
119
                    code => 'item_not_deleted',
120
                    biblionumber => $biblionumber,
120
                    biblionumber => $biblionumber,
121
                    itemnumber => $item->itemnumber,
121
                    itemnumber => $item->itemnumber,
122
                    error => @{$deleted->messages}[0]->messages,
122
                    error => @{$deleted->messages}[0]->message,
123
                };
123
                };
124
                $schema->storage->txn_rollback;
124
                $schema->storage->txn_rollback;
125
                $job->progress( ++$job_progress )->store;
125
                $job->progress( ++$job_progress )->store;
(-)a/Koha/BackgroundJob/BatchDeleteItem.pm (-1 / +1 lines)
Lines 126-132 sub process { Link Here
126
                            biblionumber => $item->biblionumber,
126
                            biblionumber => $item->biblionumber,
127
                            barcode      => $item->barcode,
127
                            barcode      => $item->barcode,
128
                            title        => $item->biblio->title,
128
                            title        => $item->biblio->title,
129
                            reason       => $return,
129
                            reason       => @{$return->messages}[0]->message,
130
                          };
130
                          };
131
131
132
                        next;
132
                        next;
(-)a/Koha/UI/Table/Builder/Items.pm (-1 / +7 lines)
Lines 108-114 sub _build_headers { Link Here
108
108
109
    my @witness_attributes = uniq map {
109
    my @witness_attributes = uniq map {
110
        my $item = $_;
110
        my $item = $_;
111
        map { defined $item->{$_} && $item->{$_} ne "" ? $_ : () } keys %$item
111
        map {
112
            defined $item->{$_}
113
              && !ref( $item->{$_} ) # biblio and safe_to_delete are objects
114
              && $item->{$_} ne ""
115
              ? $_
116
              : ()
117
          } keys %$item
112
    } @$items;
118
    } @$items;
113
119
114
    my ( $itemtag, $itemsubfield ) =
120
    my ( $itemtag, $itemsubfield ) =
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc (-4 / +3 lines)
Lines 261-278 Link Here
261
                        [% UNLESS can_be_edited %]
261
                        [% UNLESS can_be_edited %]
262
                            <td class="error">Cannot delete</td>
262
                            <td class="error">Cannot delete</td>
263
                        [% ELSE %]
263
                        [% ELSE %]
264
                            [% IF item.safe_to_delete == 1 %]
264
                            [% IF item.safe_to_delete %]
265
                                <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" /></td>
265
                                <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" /></td>
266
                            [% ELSE %]
266
                            [% ELSE %]
267
                                [% SET messages = item.safe_to_delete.messages %]
267
                                [% SET messages = item.safe_to_delete.messages %]
268
                                [% FOR m IN messages %]
268
                                [% FOR m IN messages %]
269
                                    [% SWITCH m %]
269
                                    [% SWITCH m.message %]
270
                                    [% CASE "book_on_loan" %][% SET cannot_delete_reason = t("Item is checked out") %]
270
                                    [% CASE "book_on_loan" %][% SET cannot_delete_reason = t("Item is checked out") %]
271
                                    [% CASE "not_same_branch" %][% SET cannot_delete_reason = t("Item does not belong to your library") %]
271
                                    [% CASE "not_same_branch" %][% SET cannot_delete_reason = t("Item does not belong to your library") %]
272
                                    [% CASE "book_reserved" %][% SET cannot_delete_reason = t("Item has a waiting hold") %]
272
                                    [% CASE "book_reserved" %][% SET cannot_delete_reason = t("Item has a waiting hold") %]
273
                                    [% CASE "linked_analytics" %][% SET cannot_delete_reason = t("Item has linked analytics") %]
273
                                    [% CASE "linked_analytics" %][% SET cannot_delete_reason = t("Item has linked analytics") %]
274
                                    [% CASE "last_item_for_hold" %][% SET cannot_delete_reason = t("Last item for bibliographic record with biblio-level hold on it") %]
274
                                    [% CASE "last_item_for_hold" %][% SET cannot_delete_reason = t("Last item for bibliographic record with biblio-level hold on it") %]
275
                                    [% CASE %][% SET cannot_delete_reason = t("Unknown reason") _ '(' _ item.safe_to_delete _ ')' %]
275
                                    [% CASE %][% SET cannot_delete_reason = t("Unknown reason") _ '(' _ m.message _ ')' %]
276
                                    [% END %]
276
                                    [% END %]
277
                                [% END %]
277
                                [% END %]
278
278
279
- 

Return to bug 29788