PINES Custom OPAC Copy Table: Display Age Protection Star
authorTerran McCanna <tmccanna@georgialibraries.org>
Sun, 17 Jan 2021 18:09:05 +0000 (13:09 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Sun, 17 Jan 2021 21:34:47 +0000 (16:34 -0500)
Fixes a thinko with my previous commit to display a star
next to age-protected items.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates-bootstrap/opac/parts/record/copy_table.tt2

index 98fac52..2740512 100755 (executable)
@@ -216,7 +216,7 @@ END; # FOREACH bib
                 copy_info.copy_status | html;
             -%]</td>
         <!-- PINES customization: Show alert if item is new -->
-        <td>[% IF copy_info.age_protect && copy_info.create_date < (date.now - 15552000); '<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>[% IF copy_info.age_protect && (date.format(copy_info.active_date) > date.format(date.now - 15552000)); '<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>