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

(-)a/Koha/Illrequest.pm (-1 / +2 lines)
Lines 747-753 Return a string representing the material type of this request or undef Link Here
747
sub get_type {
747
sub get_type {
748
    my ($self) = @_;
748
    my ($self) = @_;
749
    my $attr = $self->illrequestattributes->find({ type => 'type'});
749
    my $attr = $self->illrequestattributes->find({ type => 'type'});
750
    return $attr ? $attr->value : undef;
750
    return if !$attr;
751
    return $attr->value;
751
};
752
};
752
753
753
#### Illrequests Imports
754
#### Illrequests Imports
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-3 / +3 lines)
Lines 462-468 Link Here
462
                                </li>
462
                                </li>
463
                                <li class="medium">
463
                                <li class="medium">
464
                                    <label class="medium">Request type:</label>
464
                                    <label class="medium">Request type:</label>
465
                                    [% type ? type : 'N/A' | html %]
465
                                    [% type || 'N/A' | html %]
466
                                </li>
466
                                </li>
467
                                <li class="cost">
467
                                <li class="cost">
468
                                    <label class="cost">Cost:</label>
468
                                    <label class="cost">Cost:</label>
Lines 571-578 Link Here
571
                                </div>
571
                                </div>
572
                                <div class="medium">
572
                                <div class="medium">
573
                                    <span class="label medium">Request type:</span>
573
                                    <span class="label medium">Request type:</span>
574
                                    [% type = request.get_type  %]
574
                                    % type = request.get_type %]
575
                                    [% type ? type : 'N/A' | html %]
575
                                    [% type || 'N/A' | html %]
576
                                </div>
576
                                </div>
577
                                <div class="cost">
577
                                <div class="cost">
578
                                    <span class="label cost">Cost:</span>
578
                                    <span class="label cost">Cost:</span>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt (-2 / +2 lines)
Lines 135-141 Link Here
135
                                        [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
135
                                        [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
136
                                    </td>
136
                                    </td>
137
                                    <td>[% request.backend | html %]</td>
137
                                    <td>[% request.backend | html %]</td>
138
                                    <td>[% type ? type : '<span>N/A</span>' | html %]</td>
138
                                    <td>[% type || 'N/A' | html %]</td>
139
                                    <td>[% request.capabilities.$status.name | html %]</td>
139
                                    <td>[% request.capabilities.$status.name | html %]</td>
140
                                    <td>[% request.placed | html %]</td>
140
                                    <td>[% request.placed | html %]</td>
141
                                    <td>[% request.updated | html %]</td>
141
                                    <td>[% request.updated | html %]</td>
Lines 179-185 Link Here
179
                                    </li>
179
                                    </li>
180
                                    <li>
180
                                    <li>
181
                                        <label for="medium">Request type:</label>
181
                                        <label for="medium">Request type:</label>
182
                                        [% type ? type : '<span>N/A</span>' | html %]
182
                                        [% type || 'N/A' | html %]
183
                                    </li>
183
                                    </li>
184
                                    <li>
184
                                    <li>
185
                                        <label for="placed">Request placed:</label>
185
                                        <label for="placed">Request placed:</label>
(-)a/t/db_dependent/Illrequests.t (-3 / +2 lines)
Lines 83-90 subtest 'Basic object tests' => sub { Link Here
83
    is($illrq_obj->backend, $illrq->{backend},
83
    is($illrq_obj->backend, $illrq->{backend},
84
       "Backend getter works.");
84
       "Backend getter works.");
85
85
86
    is($illrq_obj->get_type, '<span>N/A</span>',
86
    is($illrq_obj->get_type, undef,
87
        'get_type() returns placeholder if no type is set');
87
        'get_type() returns undef if no type is set');
88
    $builder->build({
88
    $builder->build({
89
        source => 'Illrequestattribute',
89
        source => 'Illrequestattribute',
90
        value  => {
90
        value  => {
91
- 

Return to bug 20941