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

Evergreen Git git at git.evergreen-ils.org
Wed Apr 16 11:54:20 EDT 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  bd12a3d52578a9791f51e8cf7065d833e2a20142 (commit)
      from  ab9c7849a19aae60a5b61e8a09d6412ff275616b (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 bd12a3d52578a9791f51e8cf7065d833e2a20142
Author: Dan Scott <dscott at laurentian.ca>
Date:   Wed Apr 16 10:42:49 2014 -0400

    LP#1308590: Fix schema.org type mapping
    
    The switch to config.coded_value_map for format icon types and labels
    inadvertently broke schema.org type mapping. Restore it and attempt
    to take advantage of the finer-grained types that are now available
    to us.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
index 63b82b4..4a0cf58 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -91,9 +91,35 @@
         # Map item types to schema.org types; impedance mismatch :(
         args.schema.itemtype = {};
         schema_typemap = {};
-        schema_typemap.a = 'http://schema.org/Book';
-        schema_typemap.e = 'http://schema.org/Map';
-        schema_typemap.j = 'http://schema.org/MusicAlbum';
+
+        schema_typemap.bluray = 'Movie'; # Movie could also be TVSeries
+        schema_typemap.book = 'Book';
+        schema_typemap.braille = 'Book';
+        schema_typemap.casaudiobook = 'Book AudioObject';
+        schema_typemap.casmusic = 'MusicAlbum';
+        schema_typemap.cdaudiobook = 'Book AudioObject';
+        schema_typemap.cdmusic = 'MusicAlbum';
+        schema_typemap.dvd = 'Movie';
+        schema_typemap.eaudio = 'AudioObject';
+        schema_typemap.ebook = 'Book';
+        # schema_typemap.equip = '';
+        schema_typemap.evideo = 'Movie';
+        # schema_typemap.kit = '';
+        schema_typemap.lpbook = 'Book';
+        schema_typemap.map = 'Map';
+        # schema_typemap.microform = '';
+        schema_typemap.music = 'MusicAlbum';
+        schema_typemap.phonomusic = 'MusicAlbum';
+        # schema_typemap.phonospoken = '';
+        # schema_typemap.picture = ''; Painting or Photograph?
+        schema_typemap.score = 'Book'; # schema.org has no generic Music type
+        schema_typemap.serial = 'Periodical';
+        schema_typemap.software = 'SoftwareApplication';
+        schema_typemap.vhs = 'Movie';
+
+        schema_typemap.a = 'Book';
+        schema_typemap.e = 'Map';
+        schema_typemap.j = 'MusicAlbum';
 
         # Hard-coded to match defaults in config.copy_status for all OPAC-visible statuses
         schema_copy_status = {};
@@ -438,7 +464,7 @@
                 NEXT IF ccvm.opac_visible == 'f';
 
                 format = {};
-                type = node.textContent;
+                type = ccvm.code.remove('-'); # blu-ray to bluray
                 format.label = ccvm.search_label || ccvm.value;
                 format.icon = PROCESS get_ccvm_icon ccvm=ccvm;
                 format.itemtype = schema_typemap.$type || 'CreativeWork';

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

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


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list