LP#1638299: improve display of scope notes in headings browse
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 27 Jul 2017 20:51:25 +0000 (20:51 +0000)
committerKathy Lussier <klussier@masslnc.org>
Fri, 1 Sep 2017 19:44:07 +0000 (15:44 -0400)
Scope notes are now displayed only under uses of a heading as a main
heading.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/opac/browse.tt2

index ed94609..4e74241 100644 (file)
@@ -99,7 +99,6 @@
                             </p>
                     </div>
                     [% END %]
-
                     <ul class="browse-result-list">
                     [% FOR result IN ctx.browse_results %]
                         <li class="browse-result">
                                 [% END %]
                             </span>
 
+                            [% FOR a IN result.authorities;
+                                    PROCESS authority_notes authority=a IF !sees.grep(a.id);
+                               END %]
                             [% auth_headings_ul_added = 0; %]
                                 [% seenit = {}; # for headings we've rendered
                                    FOR a IN result.sees;
-                                    PROCESS authority_notes authority=a;
-
-                                    # Other than displaying public general
-                                    # notes, we can go no further sans
-                                    # control_set.
+                                    # We can go no further sans control_set.
                                     NEXT UNLESS a.control_set;
 
                                     # get_authority_fields is fast and cache-y.
                                         [% END %]
                                     [% END %]
                                 [% END %]
-                                [% FOR a IN result.authorities; # I don't think we'll ever get here...
-                                    PROCESS authority_notes authority=a IF !sees.grep(a.id);
-
-                                    # Other than displaying public general
-                                    # notes, we can go no further sans
-                                    # control_set.
+                                [% FOR a IN result.authorities;
+                                    # We can go no further sans control_set.
                                     NEXT UNLESS a.control_set;
 
                                     # get_authority_fields is fast and cache-y.