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

(-)a/Koha/Illrequest.pm (-1 / +2 lines)
Lines 748-754 Return a string representing the material type of this request or undef Link Here
748
sub get_type {
748
sub get_type {
749
    my ($self) = @_;
749
    my ($self) = @_;
750
    my $attr = $self->illrequestattributes->find({ type => 'type'});
750
    my $attr = $self->illrequestattributes->find({ type => 'type'});
751
    return $attr ? $attr->value : undef;
751
    return if !$attr;
752
    return $attr->value;
752
};
753
};
753
754
754
#### Illrequests Imports
755
#### Illrequests Imports
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-3 / +3 lines)
Lines 450-456 Link Here
450
                                </li>
450
                                </li>
451
                                <li class="medium">
451
                                <li class="medium">
452
                                    <label class="medium">Request type:</label>
452
                                    <label class="medium">Request type:</label>
453
                                    [% type ? type : 'N/A' | html %]
453
                                    [% type || 'N/A' | html %]
454
                                </li>
454
                                </li>
455
                                <li class="cost">
455
                                <li class="cost">
456
                                    <label class="cost">Cost:</label>
456
                                    <label class="cost">Cost:</label>
Lines 559-566 Link Here
559
                                </div>
559
                                </div>
560
                                <div class="medium">
560
                                <div class="medium">
561
                                    <span class="label medium">Request type:</span>
561
                                    <span class="label medium">Request type:</span>
562
                                    [% type = request.get_type  %]
562
                                    % type = request.get_type %]
563
                                    [% type ? type : 'N/A' | html %]
563
                                    [% type || 'N/A' | html %]
564
                                </div>
564
                                </div>
565
                                <div class="cost">
565
                                <div class="cost">
566
                                    <span class="label cost">Cost:</span>
566
                                    <span class="label cost">Cost:</span>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt (-2 / +2 lines)
Lines 136-142 Link Here
136
                                        [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
136
                                        [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
137
                                    </td>
137
                                    </td>
138
                                    <td>[% request.backend | html %]</td>
138
                                    <td>[% request.backend | html %]</td>
139
                                    <td>[% type ? type : '<span>N/A</span>' | html %]</td>
139
                                    <td>[% type || 'N/A' | html %]</td>
140
                                    <td>[% request.capabilities.$status.name | html %]</td>
140
                                    <td>[% request.capabilities.$status.name | html %]</td>
141
                                    <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td>
141
                                    <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td>
142
                                    <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td>
142
                                    <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td>
Lines 180-186 Link Here
180
                                    </li>
180
                                    </li>
181
                                    <li>
181
                                    <li>
182
                                        <label for="medium">Request type:</label>
182
                                        <label for="medium">Request type:</label>
183
                                        [% type ? type : '<span>N/A</span>' | html %]
183
                                        [% type || 'N/A' | html %]
184
                                    </li>
184
                                    </li>
185
                                    <li>
185
                                    <li>
186
                                        <label for="placed">Request placed:</label>
186
                                        <label for="placed">Request placed:</label>
(-)a/t/db_dependent/Illrequests.t (-3 / +2 lines)
Lines 85-92 subtest 'Basic object tests' => sub { Link Here
85
    is($illrq_obj->backend, $illrq->{backend},
85
    is($illrq_obj->backend, $illrq->{backend},
86
       "Backend getter works.");
86
       "Backend getter works.");
87
87
88
    is($illrq_obj->get_type, '<span>N/A</span>',
88
    is($illrq_obj->get_type, undef,
89
        'get_type() returns placeholder if no type is set');
89
        'get_type() returns undef if no type is set');
90
    $builder->build({
90
    $builder->build({
91
        source => 'Illrequestattribute',
91
        source => 'Illrequestattribute',
92
        value  => {
92
        value  => {
93
- 

Return to bug 20941