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

Evergreen Git git at git.evergreen-ils.org
Wed Sep 19 11:32:10 EDT 2012


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  c1ec288f4f77414d539554308764a1ad18ab954f (commit)
       via  eaac663d75eeeff6d4542522c9be3d77655db931 (commit)
      from  5619df9f8450db1ada476440fc3be2a973ed8809 (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 c1ec288f4f77414d539554308764a1ad18ab954f
Author: Dan Scott <dscott at laurentian.ca>
Date:   Wed Sep 12 12:59:53 2012 -0400

    TPAC: Results - don't show the pubdate if we're showing full pubinfo
    
    In the "show few details" mode, we show just the pubdate; in the "show
    full details" mode, we're showing the full pubinfo and therefore do not
    need to show the stubby pubdate.
    
    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/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index b7e526f..f40cc13 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -62,6 +62,11 @@
                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
                                                                     -%]">[% attrs.author | html %]</a></em>
+                                                                    [%- UNLESS CGI.param('detail_record_view')
+                                                                        OR (show_more_details.default == 'true'
+                                                                        OR show_more_details.default == 'hide')
+                                                                    %] [% attrs.pubdate | html %]
+                                                                    [%- END -%]
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">

commit eaac663d75eeeff6d4542522c9be3d77655db931
Author: Dan Scott <dscott at laurentian.ca>
Date:   Wed Sep 12 11:50:03 2012 -0400

    TPAC: Display full publication info
    
    In both the results table and record summary, we were failing to display
    the place of publication - which is critical information for people
    trying to track down the right edition or constructing a bibliography.
    
    Grab the place of publication, and then reconstruct 260abc (avoiding
    another XPath iteration and giving ourselves the ability to enhance the
    schema.org microdata at the same time).
    
    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 1a393c7..67805ac 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -47,6 +47,12 @@
             FOR sub IN titsubs; titsubs_content.push(sub.textContent); END;
         args.title_extended = titsubs_content.join(" ");
 
+        args.pubplaces = [];
+        FOR sub IN xml.findnodes('//*[@tag="260"]/*[@code="a"]');
+            args.pubplaces.push(sub.textContent);
+        END;
+        args.pubplace = (args.pubplaces.size) ? args.pubplaces.0 : '';
+
         args.publishers = [];
         FOR sub IN xml.findnodes('//*[@tag="260"]/*[@code="b"]');
             args.publishers.push(sub.textContent);
@@ -59,6 +65,9 @@
         END;
         args.pubdate = (args.pubdates.size) ? args.pubdates.0 : '';
 
+        # Full publisher info
+        args.pubinfo = "$args.pubplace $args.publisher $args.pubdate";
+
         args.summaries = [];
         FOR sub IN xml.findnodes('//*[@tag="520"]/*[@code="a"]');
             args.summaries.push(sub.textContent);
diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2
index 868a7dd..b750df6 100644
--- a/Open-ILS/src/templates/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2
@@ -151,12 +151,15 @@ IF num_uris > 0;
     [%- IF attrs.publisher %]
     <li id='rdetail_publisher'>
         <strong class='rdetail_label'>[% l("Publisher:") %]</strong>
-        <span class='rdetail_value' itemprop="publisher">[%
-            attrs.publisher | html;
-        %]</span>
-        [% IF attrs.pubdate; %]
-        <span itemprop="datePublished">[% attrs.pubdate | html; %]</span>
-        [% END; %]
+        <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>
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index bc52adb..b7e526f 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -62,8 +62,6 @@
                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
                                                                     -%]">[% attrs.author | html %]</a></em>
-                                                        &nbsp;&nbsp;
-                                                        [% attrs.pubdate | html %]
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
@@ -79,12 +77,12 @@
                                                         [% IF CGI.param('detail_record_view') %]
                                                         <!-- These fields are visible when viewing the results page in 'detailed' mode -->
 
-                                                        [% IF attrs.publisher %]
+                                                        [% IF attrs.pubinfo %]
                                                             <tr name="results_pub_tr">
                                                                 <td valign="top">
                                                                     <strong>[% l('Publisher:') %]</strong>
                                                                 </td>
-                                                                <td>[% attrs.publisher | html %]</td>
+                                                                <td>[% attrs.pubinfo | html %]</td>
                                                             </tr>
                                                         [% END %]
                                                         [% IF attrs.isbns.size > 0 %]

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

Summary of changes:
 Open-ILS/src/templates/opac/parts/misc_util.tt2    |    9 +++++++++
 .../src/templates/opac/parts/record/summary.tt2    |   15 +++++++++------
 Open-ILS/src/templates/opac/parts/result/table.tt2 |   11 +++++++----
 3 files changed, 25 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list