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

(-)a/Koha/Illrequest.pm (-1 / +2 lines)
Lines 735-741 Return a string representing the material type of this request or undef Link Here
735
sub get_type {
735
sub get_type {
736
    my ($self) = @_;
736
    my ($self) = @_;
737
    my $attr = $self->illrequestattributes->find({ type => 'type'});
737
    my $attr = $self->illrequestattributes->find({ type => 'type'});
738
    return $attr ? $attr->value : undef;
738
    return if !$attr;
739
    return $attr->value;
739
};
740
};
740
741
741
#### Illrequests Imports
742
#### Illrequests Imports
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-3 / +3 lines)
Lines 438-444 Link Here
438
                                </li>
438
                                </li>
439
                                <li class="medium">
439
                                <li class="medium">
440
                                    <label class="medium">Request type:</label>
440
                                    <label class="medium">Request type:</label>
441
                                    [% type ? type : 'N/A' | html %]
441
                                    [% type || 'N/A' | html %]
442
                                </li>
442
                                </li>
443
                                <li class="cost">
443
                                <li class="cost">
444
                                    <label class="cost">Cost:</label>
444
                                    <label class="cost">Cost:</label>
Lines 538-545 Link Here
538
                                </div>
538
                                </div>
539
                                <div class="medium">
539
                                <div class="medium">
540
                                    <span class="label medium">Request type:</span>
540
                                    <span class="label medium">Request type:</span>
541
                                    [% type = request.get_type  %]
541
                                    % type = request.get_type %]
542
                                    [% type ? type : 'N/A' | html %]
542
                                    [% type || 'N/A' | html %]
543
                                </div>
543
                                </div>
544
                                <div class="cost">
544
                                <div class="cost">
545
                                    <span class="label cost">Cost:</span>
545
                                    <span class="label cost">Cost:</span>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt (-2 / +2 lines)
Lines 129-135 Link Here
129
                                    <td>[% request.metadata.Author || 'N/A' | html %]</td>
129
                                    <td>[% request.metadata.Author || 'N/A' | html %]</td>
130
                                    <td>[% request.metadata.Title || 'N/A' | html %]</td>
130
                                    <td>[% request.metadata.Title || 'N/A' | html %]</td>
131
                                    <td>[% request.backend | html %]</td>
131
                                    <td>[% request.backend | html %]</td>
132
                                    <td>[% type ? type : '<span>N/A</span>' | html %]</td>
132
                                    <td>[% type || 'N/A' | html %]</td>
133
                                    <td>[% request.capabilities.$status.name | html %]</td>
133
                                    <td>[% request.capabilities.$status.name | html %]</td>
134
                                    <td>[% request.placed | html %]</td>
134
                                    <td>[% request.placed | html %]</td>
135
                                    <td>[% request.updated | html %]</td>
135
                                    <td>[% request.updated | html %]</td>
Lines 169-175 Link Here
169
                                    </li>
169
                                    </li>
170
                                    <li>
170
                                    <li>
171
                                        <label for="medium">Request type:</label>
171
                                        <label for="medium">Request type:</label>
172
                                        [% type ? type : '<span>N/A</span>' | html %]
172
                                        [% type || 'N/A' | html %]
173
                                    </li>
173
                                    </li>
174
                                    <li>
174
                                    <li>
175
                                        <label for="placed">Request placed:</label>
175
                                        <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