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

(-)a/Koha/Old/Hold.pm (+13 lines)
Lines 23-28 use base qw(Koha::Hold); Link Here
23
23
24
use C4::Context;
24
use C4::Context;
25
use Koha::Exceptions::SysPref;
25
use Koha::Exceptions::SysPref;
26
use Koha::Old::Biblios;
26
27
27
=head1 NAME
28
=head1 NAME
28
29
Lines 47-52 sub biblio { Link Here
47
    return Koha::Biblio->_new_from_dbic($rs);
48
    return Koha::Biblio->_new_from_dbic($rs);
48
}
49
}
49
50
51
=head3 deleted_biblio
52
53
Returns the related Koha::Deletedbiblio object for this old hold
54
55
=cut
56
57
sub deleted_biblio {
58
    my ($self) = @_;
59
    my $db = $self->_result->deleted_biblionumber;
60
    return Koha::Old::Biblios->find($db);
61
}
62
50
=head3 item
63
=head3 item
51
64
52
Returns the related Koha::Item object for this old Hold
65
Returns the related Koha::Item object for this old Hold
(-)a/api/v1/swagger/definitions/hold.yaml (+5 lines)
Lines 120-125 properties: Link Here
120
      - object
120
      - object
121
      - "null"
121
      - "null"
122
    description: Bibliographic record
122
    description: Bibliographic record
123
  deleted_biblio:
124
    type:
125
      - object
126
      - "null"
127
    description: Deleted bibliographic record
123
  item:
128
  item:
124
    type:
129
    type:
125
      - object
130
      - object
(-)a/api/v1/swagger/paths/holds.yaml (+1 lines)
Lines 103-108 Link Here
103
          enum:
103
          enum:
104
            - cancellation_requested
104
            - cancellation_requested
105
            - biblio
105
            - biblio
106
            - deleted_biblio
106
            - pickup_library
107
            - pickup_library
107
        collectionFormat: csv
108
        collectionFormat: csv
108
    produces:
109
    produces:
(-)a/api/v1/swagger/paths/patrons_holds.yaml (+1 lines)
Lines 30-35 Link Here
30
          enum:
30
          enum:
31
            - cancellation_requested
31
            - cancellation_requested
32
            - biblio
32
            - biblio
33
            - deleted_biblio
33
            - item
34
            - item
34
            - pickup_library
35
            - pickup_library
35
            - pickup_library.branchname
36
            - pickup_library.branchname
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc (+3 lines)
Lines 19-24 Link Here
19
                title = escape_str(biblio.biblio_id);
19
                title = escape_str(biblio.biblio_id);
20
            } else {
20
            } else {
21
                title = '<span class="biblio-title">';
21
                title = '<span class="biblio-title">';
22
                if ( config && config.deleted ) {
23
                    title += _("(Bibliographic record deleted) ");
24
                }
22
                if (biblio.title != null && biblio.title != "") {
25
                if (biblio.title != null && biblio.title != "") {
23
                    title += escape_str(biblio.title);
26
                    title += escape_str(biblio.title);
24
                } else {
27
                } else {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt (-3 / +8 lines)
Lines 207-220 Link Here
207
                        url: table_url,
207
                        url: table_url,
208
                    },
208
                    },
209
                    order: [],
209
                    order: [],
210
                    embed: ['biblio', 'item', 'pickup_library', 'pickup_library.branchname'],
210
                    embed: ['biblio', 'deleted_biblio', 'item', 'pickup_library', 'pickup_library.branchname'],
211
                    columns: [
211
                    columns: [
212
                        {
212
                        {
213
                            data: "biblio.title:biblio.subtitle:biblio.medium",
213
                            data: "biblio.title:biblio.subtitle:biblio.medium",
214
                            searchable: true,
214
                            searchable: true,
215
                            orderable: true,
215
                            orderable: true,
216
                            render: function (data, type, row, meta) {
216
                            render: function (data, type, row, meta) {
217
                                return $biblio_to_html(row.biblio, { link: 1 });
217
                                if( row.biblio ){
218
                                    return $biblio_to_html(row.biblio, { link: 1 });
219
                                } else {
220
                                    return $biblio_to_html(row.deleted_biblio, { link: 0, deleted: 1 });
221
                                }
218
                            }
222
                            }
219
                        },
223
                        },
220
                        {
224
                        {
Lines 222-228 Link Here
222
                            searchable: true,
226
                            searchable: true,
223
                            orderable: true,
227
                            orderable: true,
224
                            render: function (data, type, row, meta) {
228
                            render: function (data, type, row, meta) {
225
                                return row.biblio ? row.biblio.author : "" ;
229
                                let biblio = row.biblio ? row.biblio : row.deleted_biblio;
230
                                return biblio ? biblio.author : "";
226
                            }
231
                            }
227
                        },
232
                        },
228
                        {
233
                        {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc (+2 lines)
Lines 1-6 Link Here
1
[%- IF link && ! biblio %][% link = 0 %][% END %]
1
[%- IF link && ! biblio %][% link = 0 %][% END %]
2
[%- IF ( link ) -%]
2
[%- IF ( link ) -%]
3
    <a href="[%- PROCESS biblio_a_href biblionumber => biblio.biblionumber -%]" class="title">[% PROCESS 'show-biblio-title' %]</a>
3
    <a href="[%- PROCESS biblio_a_href biblionumber => biblio.biblionumber -%]" class="title">[% PROCESS 'show-biblio-title' %]</a>
4
[%- ELSIF (deleted) -%]
5
    <span class="deleted-biblio">(Deleted bibliographic record) [%- PROCESS 'show-biblio-title' -%]</span>
4
[%- ELSE -%]
6
[%- ELSE -%]
5
    [%- PROCESS 'show-biblio-title' -%]
7
    [%- PROCESS 'show-biblio-title' -%]
6
[%- END -%]
8
[%- END -%]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt (-1 / +5 lines)
Lines 107-114 Link Here
107
                                    <tbody>
107
                                    <tbody>
108
                                        [% FOREACH hold IN holds %]
108
                                        [% FOREACH hold IN holds %]
109
                                            <tr>
109
                                            <tr>
110
                                            [% IF hold.biblio %]
110
                                                <td>[% INCLUDE 'biblio-title.inc' biblio=hold.biblio link=>1 %]</td>
111
                                                <td>[% INCLUDE 'biblio-title.inc' biblio=hold.biblio link=>1 %]</td>
111
                                                <td>[% hold.biblio.author | html %]</td>
112
                                                <td>[% hold.biblio.author | html %]</td>
113
                                            [% ELSE %]
114
                                                <td>[% INCLUDE 'biblio-title.inc' biblio=hold.deleted_biblio link=>0 deleted=>1 %]</td>
115
                                                <td>[% hold.deleted_biblio.author | html %]</td>
116
                                            [% END %]
112
                                                <td>[% hold.item.barcode | html %]</td>
117
                                                <td>[% hold.item.barcode | html %]</td>
113
                                                <td>[% Branches.GetName( hold.branchcode ) | html %]</td>
118
                                                <td>[% Branches.GetName( hold.branchcode ) | html %]</td>
114
                                                <td data-order="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</td>
119
                                                <td data-order="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</td>
115
- 

Return to bug 38395