[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. d04d181e0db2181866de3b5d30e4c21cf7f3aaa1

Evergreen Git git at git.evergreen-ils.org
Tue Dec 16 14:51:17 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  d04d181e0db2181866de3b5d30e4c21cf7f3aaa1 (commit)
      from  8ee660ea1964c774b82157c717efb4f884f666fe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d04d181e0db2181866de3b5d30e4c21cf7f3aaa1
Author: Dan Scott <dscott at laurentian.ca>
Date:   Wed Dec 10 17:05:38 2014 -0500

    LP#1401286: Cleaner display of URIs in search results
    
    Right now a record with an 856 like:
    
    856 40 $zAvailable online $uhttp://publications.gc.ca $9LUSYS
    
    shows up in search results with an HTML display like:
    
    <a href="http://publications.gc.ca">http://publications.gc.ca</a> - Available online
    
    rather than the much cleaner:
    
    <a href="http://publications.gc.ca">Available online</a>
    
    My simplistic approach is to check to see if the link text == the href,
    and if so, and we have a note to display, to use the note as the text of
    the link instead.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
index 6788c75..32717b8 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -433,6 +433,11 @@
                     res.href = uri.getAttribute('href');
                     res.link = uri.getAttribute('label');
                     res.note = uri.getAttribute('use_restriction');
+                    # Avoid displaying the href as the link text if we can display the note instead
+                    IF res.link == res.href AND res.note;
+                        res.link = res.note;
+                        res.note = '';
+                    END;
                     args.uris.push(res);
                 END;
                 NEXT;

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/opac/parts/misc_util.tt2 |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list