[open-ils-commits] [GIT] Evergreen ILS branch master updated. 580afa19bd100374f51ea30af242913cb7522bcf

Evergreen Git git at git.evergreen-ils.org
Fri Feb 20 21:33:08 EST 2015


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  580afa19bd100374f51ea30af242913cb7522bcf (commit)
       via  efd0c1f9cb4f971658f06cade9b052f1710229c7 (commit)
      from  b9ababa5f146beaa39326a34e081a1d26c9c2351 (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 580afa19bd100374f51ea30af242913cb7522bcf
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Sat Feb 21 02:39:40 2015 +0000

    LP#1423585: add release notes entry
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/discoverability.txt b/docs/RELEASE_NOTES_NEXT/OPAC/discoverability.txt
index 74ec232..9a62514 100644
--- a/docs/RELEASE_NOTES_NEXT/OPAC/discoverability.txt
+++ b/docs/RELEASE_NOTES_NEXT/OPAC/discoverability.txt
@@ -42,3 +42,5 @@ to better support search engines:
    HTTP status code, and record detail pages for records that have been deleted
    now return a proper 410 "HTTP_GONE" HTTP status code, instead of returning a
    misleading 200 "OK" HTTP status code.
+ * Record detail and library pages now include http://ogp.me/[Open Graph Protocol]
+   markup.

commit efd0c1f9cb4f971658f06cade9b052f1710229c7
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Feb 19 11:08:32 2015 -0500

    LP#1423585 Add Open Graph Protocol markup to TPAC
    
    Very simplistic markup for now, just the basic http://ogp.me
    requirements of title, url, image, and type (and we're reusing
    the schema.org type in the short term).
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 4147b8f..b1527fb 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -309,6 +309,9 @@ sub load_common {
         }
     }
 
+    # List of <meta> and <link> elements to populate
+    $ctx->{metalinks} = [];
+
     $self->extract_copy_location_group_info;
     $ctx->{search_ou} = $self->_get_search_lib();
     $self->staff_saved_searches_set_expansion_state if $ctx->{is_staff};
diff --git a/Open-ILS/src/templates/opac/advanced.tt2 b/Open-ILS/src/templates/opac/advanced.tt2
index d6bf8e9..8efb9f2 100644
--- a/Open-ILS/src/templates/opac/advanced.tt2
+++ b/Open-ILS/src/templates/opac/advanced.tt2
@@ -5,7 +5,7 @@
     pane = CGI.param("pane") || "advanced";
     loc = ctx.search_ou;
 
-    metalinks = '<meta name="robots" content="noindex">';
+    ctx.metalinks.push('<meta name="robots" content="noindex">');
 -%]
     <h2 class="sr-only">[% l('Advanced Search') %]</h2>
     <div id="search-wrapper">
diff --git a/Open-ILS/src/templates/opac/browse.tt2 b/Open-ILS/src/templates/opac/browse.tt2
index e7557e1..3a8397d 100644
--- a/Open-ILS/src/templates/opac/browse.tt2
+++ b/Open-ILS/src/templates/opac/browse.tt2
@@ -10,7 +10,7 @@
     blimit = CGI.param('blimit') || ctx.opac_hits_per_page || 10;
 
     depart_list = ['blimit', 'bterm', 'bpivot'];
-    metalinks = '<meta name="robots" content="noindex">';
+    ctx.metalinks.push('<meta name="robots" content="noindex">');
 %]
 
     <h2 class="sr-only">[% l('Catalog Browse') %]</h2>
diff --git a/Open-ILS/src/templates/opac/cnbrowse.tt2 b/Open-ILS/src/templates/opac/cnbrowse.tt2
index 09a6b5c..a0908f6 100644
--- a/Open-ILS/src/templates/opac/cnbrowse.tt2
+++ b/Open-ILS/src/templates/opac/cnbrowse.tt2
@@ -3,7 +3,7 @@
 
     PROCESS "opac/parts/header.tt2";
     PROCESS "opac/parts/misc_util.tt2";
-    metalinks = '<meta name="robots" content="noindex">';
+    ctx.metalinks.push('<meta name="robots" content="noindex">');
     WRAPPER "opac/parts/base.tt2";
     INCLUDE "opac/parts/topnav.tt2";
     ctx.page_title = l("Call Number Browse"); %]
diff --git a/Open-ILS/src/templates/opac/library.tt2 b/Open-ILS/src/templates/opac/library.tt2
index 695566b..702f30e 100644
--- a/Open-ILS/src/templates/opac/library.tt2
+++ b/Open-ILS/src/templates/opac/library.tt2
@@ -3,7 +3,9 @@
     INCLUDE "opac/parts/topnav.tt2";
     ctx.page_title = l("Library details: [_1]", ctx.library.name);
     canon = ctx.proto _ '://' _ ctx.hostname _ mkurl('', {}, 1);
-    metalinks = '<link rel="canonical" href="' _ canon  _ '" />';
+    ctx.metalinks.push('<link rel="canonical" href="' _ canon  _ '" />');
+    ctx.metalinks.push('<meta property="og:url" content="' _ canon  _ '" />');
+    ctx.metalinks.push('<meta property="og:type" content="http://schema.org/Library" />');
 -%]
     [%- INCLUDE "opac/parts/searchbar.tt2" %]
     [%- INCLUDE "opac/parts/library/core_info.tt2"; %]
diff --git a/Open-ILS/src/templates/opac/mylist.tt2 b/Open-ILS/src/templates/opac/mylist.tt2
index 6111822..16488e2 100644
--- a/Open-ILS/src/templates/opac/mylist.tt2
+++ b/Open-ILS/src/templates/opac/mylist.tt2
@@ -2,7 +2,7 @@
     PROCESS "opac/parts/misc_util.tt2";
     WRAPPER "opac/parts/base.tt2";
     INCLUDE "opac/parts/topnav.tt2";
-    metalinks = '<meta name="robots" content="noindex">';
+    ctx.metalinks.push('<meta name="robots" content="noindex">');
     ctx.page_title = l("Record Detail") %]
     <h2 class="sr-only">[% l('Temporary List') %]</h2>
     <div class="mobile_hide">
diff --git a/Open-ILS/src/templates/opac/parts/base.tt2 b/Open-ILS/src/templates/opac/parts/base.tt2
index f971c5e..540525d 100644
--- a/Open-ILS/src/templates/opac/parts/base.tt2
+++ b/Open-ILS/src/templates/opac/parts/base.tt2
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html lang='[% ctx.locale.replace('_', '-') %]'>
-    <head>
+    <head prefix="og: http://ogp.me/ns#">
         <meta charset="utf-8" />
         <meta http-equiv="X-UA-Compatible" content="IE=edge" />
         [% IF ctx.refresh %]
@@ -18,7 +18,9 @@
         <link rel="unapi-server" type="application/xml" title="unAPI" href="/opac/extras/unapi" />
         <link type="application/opensearchdescription+xml" rel='search' title="[% l('[_1] OpenSearch', libname) %]" href="/opac/extras/opensearch/1.1/[% libsname | uri %]/-/osd.xml" />
         [%-# Hook for page-specific metadata such as <meta name="robots" content="noindex"> %]
-        [% metalinks; -%]
+        [%- ctx.metalinks.push('<meta property="og:title" content="' _ ctx.page_title _ '" />'); %]
+        [%- ctx.metalinks.push('<meta property="og:site_name" content="' _ libname _ '" />'); %]
+        [% FOREACH meta IN ctx.metalinks; meta _ "\n"; END; -%]
         [% IF want_dojo %]
         <style type="text/css">
             @import "[% ctx.media_prefix %]/js/dojo/dijit/themes/tundra/tundra.css";
diff --git a/Open-ILS/src/templates/opac/parts/record/body.tt2 b/Open-ILS/src/templates/opac/parts/record/body.tt2
index 616ede0..2801670 100644
--- a/Open-ILS/src/templates/opac/parts/record/body.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/body.tt2
@@ -3,6 +3,7 @@
     PROCESS get_marc_attrs args=attrs;
     stop_parms = ['expand','cnoffset','copy_offset','copy_limit'];
     ctx.record_attrs = attrs; # capture for JS
+    ctx.metalinks.push('<meta property="og:type" content="http://schema.org/' _ args.schema.itemtype _ '" />');
 %]
 <div id='canvas_main' class='canvas' vocab="http://schema.org/" typeof='[% args.schema.itemtype %] Product' resource="#schemarecord">
 [%- FOREACH link IN args.links.sameAs; %]
diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2
index daf4488..2accfff 100644
--- a/Open-ILS/src/templates/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2
@@ -1,6 +1,7 @@
 [%  PROCESS "opac/parts/misc_util.tt2";
     USE ResolverResolver;
     ctx.page_title = attrs.title | html
+    ctx.metalinks.push('<meta property="og:image" content="' _ ctx.media_prefix _ '/opac/extras/ac/jacket/large/r/' _ ctx.bre_id _ '" />');
 %]
 <!-- ****************** rdetail_summary.xml ***************************** -->
 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
diff --git a/Open-ILS/src/templates/opac/record.tt2 b/Open-ILS/src/templates/opac/record.tt2
index c07234f..7993a70 100644
--- a/Open-ILS/src/templates/opac/record.tt2
+++ b/Open-ILS/src/templates/opac/record.tt2
@@ -3,7 +3,8 @@
     INCLUDE "opac/parts/topnav.tt2";
     ctx.page_title = l("Record Detail");
     canon = ctx.proto _ '://' _ ctx.hostname _ mkurl('', {}, 1);
-    metalinks = '<link rel="canonical" href="' _ canon  _ '" />';
+    ctx.metalinks.push('<link rel="canonical" href="' _ canon  _ '" />');
+    ctx.metalinks.push('<meta property="og:url" content="' _ canon  _ '" />');
     IF CGI.param("expand"); basic_search = "f"; END;    
 -%]
     <h2 class="sr-only">[% l('Record Details') %]</h2>
diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index eb3fbdd..f1bb957 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -14,7 +14,7 @@
     page_count = (!ctx.page_size.defined || !ctx.hit_count.defined || ctx.page_size == 0) ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size);
 
     # We don't want search engines indexing search results
-    metalinks = '<meta name="robots" content="noindex">';
+    ctx.metalinks.push('<meta name="robots" content="noindex">');
 
     PROCESS "opac/parts/misc_util.tt2";
     PROCESS get_library;

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

Summary of changes:
 .../src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm    |    3 +++
 Open-ILS/src/templates/opac/advanced.tt2           |    2 +-
 Open-ILS/src/templates/opac/browse.tt2             |    2 +-
 Open-ILS/src/templates/opac/cnbrowse.tt2           |    2 +-
 Open-ILS/src/templates/opac/library.tt2            |    4 +++-
 Open-ILS/src/templates/opac/mylist.tt2             |    2 +-
 Open-ILS/src/templates/opac/parts/base.tt2         |    6 ++++--
 Open-ILS/src/templates/opac/parts/record/body.tt2  |    1 +
 .../src/templates/opac/parts/record/summary.tt2    |    1 +
 Open-ILS/src/templates/opac/record.tt2             |    3 ++-
 Open-ILS/src/templates/opac/results.tt2            |    2 +-
 docs/RELEASE_NOTES_NEXT/OPAC/discoverability.txt   |    2 ++
 12 files changed, 21 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list