OPAC: Fix broken copy table
authorTerran McCanna <tmccanna@georgialibraries.org>
Mon, 8 Nov 2021 20:05:38 +0000 (15:05 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Sat, 19 Nov 2022 19:59:31 +0000 (14:59 -0500)
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates-bootstrap/opac/parts/record/copy_table.tt2

index 8af0e6d..6a5be08 100755 (executable)
@@ -319,23 +319,28 @@ END; # FOREACH bib
                 ELSE;
                     '-';
                 END %]</td>
-        <!-- PINES customization: Show alert if item is new -->
-        <td>[%
-            vActive = date.format(copy_info.active_date,'%Y%m%d');
-            v6MonthsAgo = date.format(date.now - 15552000,'%Y%m%d');
-            IF copy_info.age_protect && (vActive > v6MonthsAgo); 
-                '<a title="" data-toggle="tooltip" data-original-title="' _ l("This is a new item and may only be checked out locally.") _ '"><i class="fas fa-star" style="color:orange;" aria-hidden="true"></i></a>';
-            END; %]
-        </td>
-        </tr>
 
+            [% END %]
+
+            [%- IF ctx.geo_sort && ctx.has_valid_coords %]
+                <td>[% display_ou_distance(copy_info.circ_lib) %]</td>
+            [%- END %]
+
+                       <!-- PINES customization: Show alert if item is new -->
+                       <td>[%
+                               vActive = date.format(copy_info.active_date,'%Y%m%d');
+                               v6MonthsAgo = date.format(date.now - 15552000,'%Y%m%d');
+                               IF copy_info.age_protect && (vActive > v6MonthsAgo);
+                                       '<a title="" data-toggle="tooltip" data-original-title="' _ l("This is a new item and may only be checked out locally.") _ '"><i class="fas fa-star" style="color:orange;" aria-hidden="true"></i></a>';
+                               END; %]
+                       </td>
+        </tr>
         [% IF copy_info.notes; %]
             [% FOREACH note IN copy_info.notes; %]
                 <tr><td>&nbsp;</td><td class="copy_note" colspan="4" property="description"><strong>[% note.title | html %]:</strong> [% note.value | html %]</td></tr>
             [% END %]
         [% END %]
-
-        [% IF copy_info.tags; %]
+               [% IF copy_info.tags; %]
             [% FOREACH tag IN copy_info.tags; %]
                 <tr class="copy_tag_row">
                     <td>&nbsp;</td>
@@ -344,19 +349,16 @@ END; # FOREACH bib
                         <span class="copy_tag_value">
                         [% IF tag.url %]
                             <a href="[% tag.url | html %]">
-                            [% END %]
+                        [% END %]
                                 [% tag.value | html %]
-                            [% IF tag.url %]
+                        [% IF tag.url %]
                             </a>
-                            [% END %]
+                        [% END %]
                         </span>
                     </td>
                 </tr>
-            [% END %]
-            [%- IF ctx.geo_sort && ctx.has_valid_coords %]
-                <td>[% display_ou_distance(copy_info.circ_lib) %]</td>
-            [%- END %]
-        </tr>
+                       [% END %]
+               [% END %]
 
 [%- IF copy_info.peer_bib_marc.size > 0;
 '<tr><td><ul>';