https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24412 --- Comment #28 from Josef Moravec <josef.moravec@gmail.com> --- Comment on attachment 101957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101957 Bug 24412: Attach waiting reserve to desk Review of attachment 101957: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=24412&attachment=101957) ----------------------------------------------------------------- ::: Koha/Hold.pm @@ +173,3 @@
};
+ if (defined $desk_id) { $values->{'desk_id'} = $desk_id };
the desk_id => $desk_id, setting in values above should be omitted, only the one in if should stay @@ +323,5 @@
+ my ($self) = @_; + + $self->{_desk} ||= Koha::Desks->find( $self->desk_id() ); + + return $self->{_desk};
You should use relation and _new_from_dbic here, see https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL15:_Object-orient... ::: Koha/Template/Plugin/Desks.pm @@ +47,5 @@
+ +sub GetName { + my ( $self, $desk_id ) = @_; + my $d = Koha::Desks->find( $desk_id ); + return (defined $d) ? $d->unblessed->{'desk_name'} : q{};
should be something like: return $d ? $d->desk_name : q{}; ::: koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc @@ +120,4 @@
[% IF ( hold.found ) %] [% IF ( hold.atdestination ) %] [% IF ( hold.found ) %] + Item waiting at <b> [% hold.wbrname | html %]</b>[% IF hold.desk_name %], [% hold.desk_name | html %],[% END %] <input type="hidden" name="pickup" value="[% hold.wbrcode | html %]" /> since [% hold.waiting_date | $KohaDates %]
Looks like you don't need to use Desks template plugin. ::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ +381,4 @@
[% SET hold = item.first_hold %] [% IF hold %] [% IF hold.waitingdate %] + Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% Desks.GetName ( hold.desk_id ) | html %][% END %] since [% hold.waitingdate | $KohaDates %].
you don't new Desks template plugin, just use hold.desk.desk_name ::: koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ +468,4 @@
<div class="modal-footer"> <input type="hidden" name="cancel_reserve" value="0" /> + <button type="submit" class="btn btn-default approve" [% IF (Desks.defined) %]data-dismiss="modal" [% END %]>
Will need update as Desks.defined was removed in previous patches on bug 24201 ::: koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc @@ +106,4 @@
<i class="fa fa-exclamation-circle text-warning"></i> [% IF ( HOLD.is_at_destination ) %] [% IF ( HOLD.found ) %] + Item waiting at <b> [% HOLD.branch.branchname | html %]</b>[% IF ( HOLD.desk_id ) %], [% Desks.GetName ( HOLD.desk_id ) | html %],[% END %]
you don't new Desks template plugin, just use hold.desk.desk_name -- You are receiving this mail because: You are watching all bug changes.