[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_7 updated. 5d39669aa4d79e2228b1d9de698cb6cda69ed39d

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, rel_2_7 has been updated
       via  5d39669aa4d79e2228b1d9de698cb6cda69ed39d (commit)
      from  19833e4462769c98d2ce37a10975f0bc634f02c0 (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 5d39669aa4d79e2228b1d9de698cb6cda69ed39d
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