LP1812241 follow-up: adds default URI note to Show More Details View user/sandbergja/lp1812241_nosubfieldz
authorJane Sandberg <sandbej@linnbenton.edu>
Sat, 25 May 2019 00:49:42 +0000 (17:49 -0700)
committerJane Sandberg <sandbej@linnbenton.edu>
Sat, 25 May 2019 03:17:02 +0000 (20:17 -0700)
This commit also adds some information about this feature's use
case to the Release Notes entry, based on a conversation with Rogan.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/templates/opac/parts/record/summary.tt2
Open-ILS/src/templates/opac/parts/result/table.tt2
Open-ILS/src/templates/opac/parts/uri_note.tt2 [new file with mode: 0644]
docs/RELEASE_NOTES_NEXT/OPAC/Default_URI_Link_Note.adoc

index 12a7f91..f8bbafd 100644 (file)
@@ -226,16 +226,7 @@ IF num_uris > 0;
             END;
         -%]
         </a>
-       [%- IF uri.note -%]
-       [%- '- <span property="description">' _ uri.note _ '</span>' %]
-       [%- ELSE -%]
-               [% IF ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %]
-                       [% link_note = ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %]
-               [% '<span property="description">'; link_note | html; '</span>' %]                                          
-               [% END %]
-       [%- END -%]
-
-
+       [% INCLUDE "opac/parts/uri_note.tt2" %]
 
         <link property="availability" href="http://schema.org/OnlineOnly" />
         [%- IF attrs.gtin13; '<meta property="gtin13" content="' _ attrs.gtin13 _ '" />'; END; %]
index 63b4980..1a2ea51 100644 (file)
@@ -347,7 +347,9 @@ END;
                                                                 <td valign='top'>
                                                                     <strong>[% l('Electronic resource') %]</strong>
                                                                 </td>
-                                                                <td><a href="[% uri.href %]" class="uri_link" target="_blank">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
+                                                                <td><a href="[% uri.href %]" class="uri_link" target="_blank">[% uri.link | html %]</a>
+                                                                    [% INCLUDE "opac/parts/uri_note.tt2" %]
+                                                                </td>
                                                             </tr>
                                                             [% END %]
                                                          [% END %]
diff --git a/Open-ILS/src/templates/opac/parts/uri_note.tt2 b/Open-ILS/src/templates/opac/parts/uri_note.tt2
new file mode 100644 (file)
index 0000000..1847ec7
--- /dev/null
@@ -0,0 +1,8 @@
+[%- IF uri.note -%]
+    [%- '- <span property="description">' _ uri.note _ '</span>' %]
+[%- ELSE -%]
+    [% IF ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %]
+        [% link_note = ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %]
+        [% '<span property="description">'; link_note | html; '</span>' %]
+    [% END %]
+[%- END -%]
index ad8c34c..f4abce5 100644 (file)
@@ -3,3 +3,9 @@ New Setting for Default URI Notes
 If a URI does not have a 856$z defining a note to display next to 
 it in the OPAC you can use the opac.uri_default_note_text setting
 to define one.
+
+This feature helps to save catalogers time.  If your library has
+a note that should be added to a wide range of electronic resources,
+rather than applying the note to all applicable records, you can set
+this setting to an appropriate value, and add an 856$z note for any
+resources that don't meet the criteria.