TPAC: Display full publication info
[transitory.git] / Open-ILS / src / templates / opac / parts / record / summary.tt2
index c67d0ef..b750df6 100644 (file)
@@ -5,13 +5,9 @@
 <!-- ****************** rdetail_summary.xml ***************************** -->
 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
 
-[%- IF ctx.refworks.enabled == 'true' %]
-    [% INCLUDE 'opac/parts/record/refworks.tt2' %]
-[%- END %]
-
 <hr />
 
-[%- # This holds the record summary information %]
+[%-# This holds the record summary information %]
 <div id="rdetail_summary_header">
     <div id="rdetail_image_div">
         [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
     </div>
 
     <div id="rdetail_actions_div">
+        [%- search_ou = ctx.search_ou;
+            IF ctx.place_unfillable ||
+                ( attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size > 0
+                    && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
+                )
+         %]
         <div class="rdetail_aux_utils place_hold">
             <a href="[% mkurl(ctx.opac_root _ '/place_hold', 
-                {hold_target => ctx.bre_id, hold_type => 'T', hold_source_page => mkurl()}) %]" 
+                {hold_target => ctx.bre_id, hold_type => 'T', hold_source_page => mkurl()}, stop_parms) %]" 
             class="no-dec"><img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
             class="place_hold">[% l('Place Hold') %]</span></a>
         </div>
+        [%- END -%]
         <div class="rdetail_aux_utils toggle_list">
-        [%-  
+        [%  IF ctx.user;
+            INCLUDE "opac/parts/bookbag_actions.tt2";
+        %]
+        [%  ELSE;
             operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
             label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
         %]
-            <a href="[% ctx.opac_root %]/mylist/[% operation %]?record=[% ctx.bre_id %]" class="no-dec">
+            <a href="[% mkurl(ctx.opac_root _ '/mylist/' _ operation, {record => ctx.bre_id}, stop_parms) %]" class="no-dec">
                 <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
                 [% label %]
             </a>
+        [% END %]
+        </div>
+        <div class="rdetail_aux_utils">
+            <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
+            <a href="[% mkurl(ctx.opac_root _ '/record/print/' _ ctx.bre_id) %]" class="no-dec">[% l('Print') %]</a> /
+            <a href="[% mkurl(ctx.opac_root _ '/record/email/' _ ctx.bre_id) %]" class="no-dec">[% l('Email') %]</a>
         </div>
+        [%- IF ctx.refworks.enabled == 'true' %]
+            [%- INCLUDE 'opac/parts/record/refworks.tt2' %]
+        [%- END %]
     </div>
     <div id='rdetail_title_div'>
         [%- IF attrs.format_icon %]
@@ -46,7 +61,7 @@
             <img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
         </div>
         [%- END %]
-        <h1 id='rdetail_title'>[% attrs.title_extended | html %]</h1>
+        <h1 id='rdetail_title' itemprop="name">[% attrs.title_extended | html %]</h1>
         [%- INCLUDE "opac/parts/record/authors.tt2" %]
     </div>
 </div>
@@ -101,7 +116,7 @@ IF num_uris > 0;
                 ctx.record_hold_count, ctx.copy_summary.0.count) %]
         </p>
     </span>
-[%- INCLUDE "opac/parts/record/copy_table.tt2" %]
+[%- INCLUDE "opac/parts/record/copy_table.tt2" copies=ctx.copies %]
 </div>
 [%- END %]
 
@@ -110,7 +125,7 @@ IF num_uris > 0;
     [%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %]
     <li class='rdetail_isbns'>
         <strong class='rdetail_label'>[% l('ISBN:'); %]</strong>
-        <span class='rdetail_value'>[% isbn | html  %]</span>
+        <span class='rdetail_value' itemprop='isbn'>[% isbn | html  %]</span>
     </li>
         [%- END %]
     [%- END %]
@@ -136,7 +151,15 @@ IF num_uris > 0;
     [%- IF attrs.publisher %]
     <li id='rdetail_publisher'>
         <strong class='rdetail_label'>[% l("Publisher:") %]</strong>
-        <span class='rdetail_value'>[% attrs.publisher | html %] [% IF attrs.pubdate; attrs.pubdate | html; END %]</span>
+        <span class='rdetail_value' itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
+        [%- IF attrs.pubplace; %]
+            <span itemprop="location">[% attrs.pubplace | html; %]</span>
+        [%- END; %]
+            <span itemprop="name">[% attrs.publisher | html; %]</span>
+        </span>
+        [%- IF attrs.pubdate; %]
+            <span itemprop="datePublished">[% attrs.pubdate | html; %]</span>
+        [%- END; %]
     </li>
     [%- END %]
 </ul>