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

(-)a/Koha/Hold.pm (-7 / +4 lines)
Lines 174-181 sub set_waiting { Link Here
174
        desk_id => $desk_id,
174
        desk_id => $desk_id,
175
    };
175
    };
176
176
177
    if (defined $desk_id) { $values->{'desk_id'} = $desk_id };
178
179
    my $requested_expiration;
177
    my $requested_expiration;
180
    if ($self->expirationdate) {
178
    if ($self->expirationdate) {
181
        $requested_expiration = dt_from_string($self->expirationdate);
179
        $requested_expiration = dt_from_string($self->expirationdate);
Lines 331-341 Returns the related Koha::Library object for this Hold Link Here
331
=cut
329
=cut
332
330
333
sub desk {
331
sub desk {
334
    my ($self) = @_;
332
    my $self = shift;
335
333
    my $desk_rs = $self->_result->desk;
336
    $self->{_desk} ||= Koha::Desks->find( $self->desk_id() );
334
    return unless $desk_rs;
337
335
    return Koha::Desk->_new_from_dbic($desk_rs);
338
    return $self->{_desk};
339
}
336
}
340
337
341
=head3 borrower
338
=head3 borrower
(-)a/Koha/Template/Plugin/Desks.pm (-14 lines)
Lines 36-55 got or the current one. Link Here
36
36
37
=head2 Methods
37
=head2 Methods
38
38
39
=head3 GetName
40
41
[% Desk.GetName(desk_id) %]
42
43
return desk name or empty string
44
45
=cut
46
47
sub GetName {
48
    my ( $self, $desk_id ) = @_;
49
    my $d = Koha::Desks->find( $desk_id );
50
    return (defined $d) ? $d->unblessed->{'desk_name'} : q{};
51
}
52
53
=head3 GetLoggedInDeskId
39
=head3 GetLoggedInDeskId
54
40
55
[% Desks.GetLoggedInDeskId %]
41
[% Desks.GetLoggedInDeskId %]
(-)a/installer/data/mysql/atomicupdate/bug_24412_Attach_waiting_reserve_to_desk.perl (-12 / +13 lines)
Lines 1-16 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
3
    if ( !column_exists( 'reserves', 'desk_id' ) ) {
4
    $dbh->do(q{
4
        $dbh->do(q{
5
ALTER TABLE reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode,
5
                 ALTER TABLE reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode,
6
  ADD KEY desk_id (`desk_id`),
6
                 ADD KEY desk_id (`desk_id`),
7
  ADD CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE CASCADE ON UPDATE CASCADE ;
7
                 ADD CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE CASCADE ON UPDATE CASCADE ;
8
             });
8
                 });
9
    $dbh->do(q{
9
        $dbh->do(q{
10
ALTER TABLE old_reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode,
10
                 ALTER TABLE old_reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode,
11
  ADD KEY `old_desk_id` (`desk_id`);
11
                 ADD KEY `old_desk_id` (`desk_id`);
12
             });
12
                 });
13
13
14
    SetVersion( $DBversion );
14
        SetVersion( $DBversion );
15
    print "Upgrade to $DBversion done (Bug XXXXX - Attach waiting reserve to desk)\n";
15
        print "Upgrade to $DBversion done (Bug XXXXX - Attach waiting reserve to desk)\n";
16
    }
16
}
17
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-4 lines)
Lines 1-10 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
<<<<<<< HEAD
3
[% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
2
[% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
4
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
5
=======
6
[% USE Desks %]
7
>>>>>>> Bug 24412: Attach waiting reserve to desk
8
<table>
4
<table>
9
    <tr>
5
    <tr>
10
        [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
6
        [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc (-2 / +1 lines)
Lines 1-5 Link Here
1
[% USE ItemTypes %]
1
[% USE ItemTypes %]
2
[% USE Desks %]
3
[% USE AuthorisedValues %]
2
[% USE AuthorisedValues %]
4
<table id="[% table_name | html %]">
3
<table id="[% table_name | html %]">
5
    <thead>
4
    <thead>
Lines 39-45 Link Here
39
                    [% END %]
38
                    [% END %]
40
                </td>
39
                </td>
41
                <td>[% Branches.GetName( reserveloo.item.homebranch ) | html %]</td>
40
                <td>[% Branches.GetName( reserveloo.item.homebranch ) | html %]</td>
42
                <td>[% Branches.GetName( reserveloo.item.holdingbranch ) | html %][% IF (reserveloo.desk_id  ) %], [% Desks.GetName (reserveloo.desk_id) | html %][% END %]</td>
41
                <td>[% Branches.GetName( reserveloo.item.holdingbranch ) | html %][% IF (reserveloo.desk_id  ) %], [% reserveloo.desk.desk_name | html %][% END %]</td>
43
                <td>[% AuthorisedValues.GetByCode('LOC', reserveloo.item.location) | html %]</td>
42
                <td>[% AuthorisedValues.GetByCode('LOC', reserveloo.item.location) | html %]</td>
44
                <td>[% reserveloo.item.itemcallnumber | html %]</td>
43
                <td>[% reserveloo.item.itemcallnumber | html %]</td>
45
                <td>[% reserveloo.item.copynumber | html %]</td>
44
                <td>[% reserveloo.item.copynumber | html %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +1 lines)
Lines 4-10 Link Here
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% USE AuthorisedValues %]
5
[% USE AuthorisedValues %]
6
[% USE Branches %]
6
[% USE Branches %]
7
[% USE Desks %]
8
[% USE Biblio %]
7
[% USE Biblio %]
9
[% USE TablesSettings %]
8
[% USE TablesSettings %]
10
[% PROCESS 'i18n.inc' %]
9
[% PROCESS 'i18n.inc' %]
Lines 444-450 Note that permanent location is a code, and location may be an authval. Link Here
444
                        [% SET hold = item.first_hold %]
443
                        [% SET hold = item.first_hold %]
445
                        [% IF hold %]
444
                        [% IF hold %]
446
                            [% IF hold.waitingdate %]
445
                            [% IF hold.waitingdate %]
447
                                <span class="waitingat">Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% Desks.GetName ( hold.desk_id ) | html %][% END %] since [% hold.waitingdate | $KohaDates %].</span>
446
                                <span class="waitingat">Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% hold.desk.desk_name | html %][% END %] since [% hold.waitingdate | $KohaDates %].</span>
448
                                [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %]
447
                                [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %]
449
                                    <span class="heldfor">Hold for:</span>
448
                                    <span class="heldfor">Hold for:</span>
450
                                    [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %]
449
                                    [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc (-3 / +1 lines)
Lines 1-5 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% USE Desks  %]
3
[% USE ItemTypes %]
2
[% USE ItemTypes %]
4
[% USE KohaDates %]
3
[% USE KohaDates %]
5
4
Lines 107-113 Link Here
107
                                [% IF ( HOLD.is_at_destination ) %]
106
                                [% IF ( HOLD.is_at_destination ) %]
108
                                    [% IF ( HOLD.found ) %]
107
                                    [% IF ( HOLD.found ) %]
109
108
110
                                        Item waiting at <strong> [% HOLD.branch.branchname | html %]</strong>[% IF ( HOLD.desk_id ) %], [% Desks.GetName ( HOLD.desk_id ) | html %],[% END %]
109
                                        Item waiting at <strong> [% HOLD.branch.branchname | html %]</strong>[% IF ( HOLD.desk_id ) %], [% HOLD.desk.desk_name | html %],[% END %]
111
110
112
                                        [% IF ( HOLD.waitingdate ) %]
111
                                        [% IF ( HOLD.waitingdate ) %]
113
                                            since [% HOLD.waitingdate | $KohaDates %]
112
                                            since [% HOLD.waitingdate | $KohaDates %]
114
- 

Return to bug 24412