Bug 20941: (follow-up) Update N/A handling
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Fri, 5 Oct 2018 07:56:45 +0000 (08:56 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 31 Oct 2018 13:45:56 +0000 (13:45 +0000)
Modify the conditional display of N/A in accordance with comment #17

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt

index 081000d..dea0a48 100644 (file)
                                 </li>
                                 <li class="medium">
                                     <label class="medium">Request type:</label>
-                                    [% type || '<span>N/A</span>' | html %]
+                                    [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
                                 </li>
                                 <li class="cost">
                                     <label class="cost">Cost:</label>
                                 </div>
                                 <div class="medium">
                                     <span class="label medium">Request type:</span>
-                                    % type = request.get_type %]
-                                    [% type || '<span>N/A</span>' | html %]
+                                    [% type = request.get_type %]
+                                    [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
                                 </div>
                                 <div class="cost">
                                     <span class="label cost">Cost:</span>
index 1016b86..9fd474d 100644 (file)
                                         [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %]
                                     </td>
                                     <td>[% request.backend | html %]</td>
-                                    <td>[% type || '<span>N/A</span>' | html %]</td>
+                                    <td>
+                                        [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
+                                    </td>
                                     <td>[% request.capabilities.$status.name | html %]</td>
                                     <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td>
                                     <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td>
                                     </li>
                                     <li>
                                         <label for="medium">Request type:</label>
-                                        [% type || '<span>N/A</span>' | html %]
+                                        [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
                                     </li>
                                     <li>
                                         <label for="placed">Request placed:</label>