From 0df0640dd32bb71912954e982ffddd6a029be4e9 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 16 Jul 2013 15:33:49 -0400 Subject: [PATCH] Cut over to RDFa Lite instead of microdata for schema.org RDFa Lite is more easily extensible and as accepted as microdata. Signed-off-by: Dan Scott --- Open-ILS/src/templates/opac/parts/record/body.tt2 | 3 +- .../templates/opac/parts/record/copy_counts.tt2 | 12 ++++---- .../src/templates/opac/parts/record/copy_table.tt2 | 32 +++++++++++----------- .../src/templates/opac/parts/record/summary.tt2 | 20 +++++++------- 4 files changed, 33 insertions(+), 34 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/body.tt2 b/Open-ILS/src/templates/opac/parts/record/body.tt2 index d334acc4ae..360368e141 100644 --- a/Open-ILS/src/templates/opac/parts/record/body.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/body.tt2 @@ -4,8 +4,7 @@ stop_parms = ['expand','cnoffset','copy_offset','copy_limit']; ctx.record_attrs = attrs; # capture for JS %] -
- +
[%- INCLUDE "opac/parts/record/navigation.tt2" %] [%- IF ctx.bib_is_dead %]
diff --git a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 index fb78392712..c5e89fbdd0 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 @@ -17,9 +17,9 @@ ou_name = cp_org_unit.name; displayed_ous.$ou_name = 1; %] -
  • - - +
  • + + [% l('[quant,_1,copy,copies] at [_2].', ou_avail, ou_name) | html %] [%- this_depth = ctx.get_aou(ou_id).ou_type.depth; IF ou_avail > 0 && this_depth != ctx.copy_depth %] @@ -37,9 +37,9 @@ UNLESS depth < 0 || displayed_ous.exists(ou_name); %] [%- IF attrs.plib_copy_counts.$depth.count > 0; %] -
  • - - +
  • + + [%- l('[_1] of [quant,_2,copy,copies] available at [_3].', attrs.plib_copy_counts.$depth.available, diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 index c339e65714..491a5b345c 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -57,10 +57,10 @@ END; [%- bib_lib_name = ctx.get_aou(bib.target_copy.circ_lib).name | html; l("[_1] (foreign item)", bib_lib_name); -%] -
    • + @@ -89,11 +89,11 @@ END; # FOREACH bib callnum = callnum _ " " _ callnum_suffix; END; -%] - + [%- IF serial_holdings %] [%- copy_info.holding_label | html; -%] - [%- ELSE %] + [%- ELSE %] [%- org_name = ctx.get_aou(copy_info.circ_lib).name; lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url'); @@ -102,20 +102,20 @@ END; # FOREACH bib IF lib_url; ''; END; -%] [% END %] - [% callnum | html %] [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](Text)[% END %] + [% callnum | html %] [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](Text)[% END %] [%- IF has_parts == 'true' %] [% copy_info.part_label | html %] [%- END %] - + [%- IF ctx.is_staff -%] [% copy_info.barcode | html %] [%- ELSE -%][% copy_info.barcode | html %] [%- END -%] [%- IF attrs.gtin13; - ''; + ''; END; -%] - [% copy_info.copy_location | html %] + [% copy_info.copy_location | html %] [%- IF ctx.is_staff %] [% copy_info.age_protect ? @@ -178,13 +178,13 @@ END; # FOREACH bib [%- # Hard-coded to match defaults in config.copy_status IF (copy_info.status_code == 0 OR copy_info.status_code == 7); - ''; + ''; ELSIF copy_info.status_code == 1; - ''; + ''; ELSIF copy_info.status_code == 9; - ''; + ''; ELSIF copy_info.status_code == 12; - ''; + ''; END; copy_info.copy_status | html; -%] @@ -212,9 +212,9 @@ END; # FOREACH bib attrs = {marc_xml => bib}; PROCESS get_marc_attrs args=attrs %] [%- IF attrs.bibid != ctx.bre_id; %] -
    • -
    • + [% attrs.title | html %] / [% attrs.author | html %]
    • diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index db3f4ca54e..4be6b33d85 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -61,7 +61,7 @@ [% attrs.format_label %]
  • [%- END %] -

    [% attrs.title_extended | html %]

    +

    [% attrs.title_extended | html %]

    [%- FOR link880 IN attrs.graphic_titles; FOR alt IN link880.graphic; @@ -109,13 +109,13 @@ IF num_uris > 0; [%- IF num_uris > 1 %]
      [% END %] [%- FOR uri IN merged_uris %] [%- IF num_uris == 1 -%] -

      +

      [%- ELSE -%] -

    • +
    • [%- END -%] [% uri.link %][% ' - ' _ uri.note IF uri.note %] - - [%- IF attrs.gtin13; ''; END; %] + + [%- IF attrs.gtin13; ''; END; %] [%- IF num_uris == 1 %]

      [% ELSE %]
    • [% END %] [%- END %] [%- IF num_uris > 1 %]
    [% END %] @@ -154,7 +154,7 @@ IF num_uris > 0; [%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %]
  • [% l('ISBN:'); %] - [% isbn | html %] + [% isbn | html %]
  • [%- END %] [%- END %] @@ -195,14 +195,14 @@ IF num_uris > 0; [%- IF attrs.publisher %]
  • [% l("Publisher:") %] - + [%- IF attrs.pubplace; %] - [% attrs.pubplace | html; %] + [% attrs.pubplace | html; %] [%- END; %] - [% attrs.publisher | html; %] + [% attrs.publisher | html; %] [%- IF attrs.pubdate; %] - + [% attrs.pubdate | html; %] [%- END; %] [%- IF attrs.graphic_pubinfos.size > 0; -- 2.11.0