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

Evergreen Git git at git.evergreen-ils.org
Tue Oct 23 17:59:19 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  546ef30df8407dcbd94f257a39497d8550838472 (commit)
       via  d405493ca7f613097650d1c9cfc8c1c1241da4a5 (commit)
       via  36b36924677fa925a59a1af5d77aed21c160e3e6 (commit)
       via  e744fbb8d05cf8de850bd7b95dde8c1c5fc8763d (commit)
      from  d19878b7d312718a0a568f8c3a356cc3ea8a5180 (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 546ef30df8407dcbd94f257a39497d8550838472
Author: Ben Shum <bshum at biblio.org>
Date:   Wed Oct 24 01:42:04 2012 +0800

    TPAC: indent Content descriptions to line up with Record details
    
    In the interest of trying to keep things a little more presentable, indent
    the new content notes so that they line up with the record details bulleted
    list items.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2
index 2c028c7..d97989d 100644
--- a/Open-ILS/src/templates/opac/css/style.css.tt2
+++ b/Open-ILS/src/templates/opac/css/style.css.tt2
@@ -1200,6 +1200,11 @@ a.opac-button, input.opac-button {
     margin-top: 1em;
 }
 
+.rdetail_content {
+    margin-left: 1.5em;
+    padding-left: 1.5em;
+}
+
 .rdetail_content_type, .rdetail_subject_type {
     vertical-align: top;
     font-weight: bold;

commit d405493ca7f613097650d1c9cfc8c1c1241da4a5
Author: Dan Scott <dscott at laurentian.ca>
Date:   Tue Oct 23 11:57:46 2012 -0400

    TPAC: Use a single table for all content notes
    
    Rather than having one table per kind of content note, keep them all in
    a single table. Thanks to Ben Shum for the prod.
    
    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/record/contents.tt2 b/Open-ILS/src/templates/opac/parts/record/contents.tt2
index f8778fc..956a72d 100644
--- a/Open-ILS/src/templates/opac/parts/record/contents.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/contents.tt2
@@ -168,20 +168,15 @@ BLOCK render_contents;
     END;
 END 
 %]
-
 [%  BLOCK render_all_contents;
     FOREACH cont IN contents;
         content = PROCESS render_contents(xpath=cont.xpath);
         IF content.match('\S');
-%]
-        <table class='rdetail_content'>
-            <tbody>
-                <tr>
-                    <td class='rdetail_content_type'>[% cont.label %]</td>
-                    <td class='rdetail_content_value' itemprop='keywords'>[% content %]</td>
-                </tr>
-            </tbody>
-        </table>
+-%]
+<tr>
+    <td class='rdetail_content_type'>[% cont.label %]</td>
+    <td class='rdetail_content_value' itemprop='keywords'>[% content %]</td>
+</tr>
         [%- END; %]
     [%- END; %]
 [%- END %]
@@ -190,5 +185,9 @@ END
     IF content_html.length > 0;
 %]
 <h2 class='rdetail_contents'>[% l('Content descriptions') %]</h2>
+<table class='rdetail_content'>
+    <tbody>
 [%- content_html %]
+    </tbody>
+</table>
 [%- END %]

commit 36b36924677fa925a59a1af5d77aed21c160e3e6
Author: Dan Scott <dscott at laurentian.ca>
Date:   Tue Oct 23 11:47:48 2012 -0400

    TPAC: Show contents notes directly in record summary
    
    By popular demand in IRC, move the contents notes directly into the body
    of the record summary rather than hiding the content under a twisty.
    This improves external indexing of the page and makes the contents notes
    more immediately evident to users.
    
    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/record/extras.tt2 b/Open-ILS/src/templates/opac/parts/record/extras.tt2
index 14d0d92..54f36d9 100644
--- a/Open-ILS/src/templates/opac/parts/record/extras.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/extras.tt2
@@ -36,7 +36,6 @@
 
         extras = [
             {name => 'summaryplus',  label => l('Summaries &amp; More'), hide => hide_summary}, 
-            {name => 'contents',  label => l('Contents'), hide => !ctx.marc_xml.findnodes('//*[starts-with(@tag,"5")]')},
             {name => 'annotation', label => l('Annotation'), hide => 1}, 
             {name => 'awards',  label => l('Awards, Reviews, & Suggested Reads')}, 
             {name => 'excerpt',  label => l('Excerpt'), hide => 1},
diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2
index b750df6..a5767a1 100644
--- a/Open-ILS/src/templates/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2
@@ -164,6 +164,7 @@ IF num_uris > 0;
     [%- END %]
 </ul>
 
+[%- INCLUDE "opac/parts/record/contents.tt2" %]
 [%- INCLUDE "opac/parts/record/subjects.tt2" %]
 [%- INCLUDE "opac/parts/record/series.tt2" %]
 [%- INCLUDE "opac/parts/record/extras.tt2" %]

commit e744fbb8d05cf8de850bd7b95dde8c1c5fc8763d
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Oct 22 15:46:20 2012 -0400

    Add detailed contents content to TPAC record summary
    
    Drawing from the LoC MARC definitions for the 500 field, display'em if you
    got'em. Given that many keyword searches are likely to draw upon this content,
    we should display the matches in the record summary.
    
    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/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2
index b5c7418..2c028c7 100644
--- a/Open-ILS/src/templates/opac/css/style.css.tt2
+++ b/Open-ILS/src/templates/opac/css/style.css.tt2
@@ -1200,7 +1200,7 @@ a.opac-button, input.opac-button {
     margin-top: 1em;
 }
 
-.rdetail_subject_type {
+.rdetail_content_type, .rdetail_subject_type {
     vertical-align: top;
     font-weight: bold;
 }
diff --git a/Open-ILS/src/templates/opac/parts/record/contents.tt2 b/Open-ILS/src/templates/opac/parts/record/contents.tt2
new file mode 100644
index 0000000..f8778fc
--- /dev/null
+++ b/Open-ILS/src/templates/opac/parts/record/contents.tt2
@@ -0,0 +1,194 @@
+[%-
+contents =  [
+    {
+        label => l('General Note: '),
+        xpath => '//*[@tag="500"]'
+    }, {
+        label => l('With Note: '),
+        xpath => '//*[@tag="501"]'
+    }, {
+        label => l('Dissertation Note: '),
+        xpath => '//*[@tag="502"]'
+    }, {
+        label => l('Bibliography, etc. Note: '),
+        xpath => '//*[@tag="504"]'
+    }, {
+        label => l('Formatted Contents Note: '),
+        xpath => '//*[@tag="505"]'
+    }, {
+        label => l('Restrictions on Access Note: '),
+        xpath => '//*[@tag="506"]'
+    }, {
+        label => l('Scale Note for Graphic Material: '),
+        xpath => '//*[@tag="507"]'
+    }, {
+        label => l('Creation/Production Credits Note: '),
+        xpath => '//*[@tag="508"]'
+    }, {
+        label => l('Citation/References Note: '),
+        xpath => '//*[@tag="510"]'
+    }, {
+        label => l('Participant or Performer Note: '),
+        xpath => '//*[@tag="511"]'
+    }, {
+        label => l('Type of Report and Period Covered Note: '),
+        xpath => '//*[@tag="513"]'
+    }, {
+        label => l('Data Quality Note: '),
+        xpath => '//*[@tag="514"]'
+    }, {
+        label => l('Numbering Peculiarities Note: '),
+        xpath => '//*[@tag="515"]'
+    }, {
+        label => l('Type of Computer File or Data Note: '),
+        xpath => '//*[@tag="516"]'
+    }, {
+        label => l('Date/Time and Place of an Event Note: '),
+        xpath => '//*[@tag="518"]'
+    }, {
+        label => l('Summary, etc.: '),
+        xpath => '//*[@tag="520"]'
+    }, {
+        label => l('Target Audience Note: '),
+        xpath => '//*[@tag="521"]'
+    }, {
+        label => l('Geographic Coverage Note: '),
+        xpath => '//*[@tag="522"]'
+    }, {
+        label => l('Preferred Citation of Described Materials Note: '),
+        xpath => '//*[@tag="524"]'
+    }, {
+        label => l('Supplement Note: '),
+        xpath => '//*[@tag="525"]'
+    }, {
+        label => l('Study Program Information Note: '),
+        xpath => '//*[@tag="526"]'
+    }, {
+        label => l('Additional Physical Form available Note: '),
+        xpath => '//*[@tag="530"]'
+    }, {
+        label => l('Reproduction Note: '),
+        xpath => '//*[@tag="533"]'
+    }, {
+        label => l('Original Version Note: '),
+        xpath => '//*[@tag="534"]'
+    }, {
+        label => l('Location of Originals/Duplicates Note: '),
+        xpath => '//*[@tag="535"]'
+    }, {
+        label => l('Funding Information Note: '),
+        xpath => '//*[@tag="536"]'
+    }, {
+        label => l('System Details Note: '),
+        xpath => '//*[@tag="538"]'
+    }, {
+        label => l('Terms Governing Use and Reproduction Note: '),
+        xpath => '//*[@tag="540"]'
+    }, {
+        label => l('Immediate Source of Acquisition Note: '),
+        xpath => '//*[@tag="541"]'
+    }, {
+        label => l('Information Relating to Copyright Status: '),
+        xpath => '//*[@tag="542"]'
+    }, {
+        label => l('Location of Other Archival Materials Note: '),
+        xpath => '//*[@tag="544"]'
+    }, {
+        label => l('Biographical or Historical Data: '),
+        xpath => '//*[@tag="545"]'
+    }, {
+        label => l('Language Note: '),
+        xpath => '//*[@tag="546"]'
+    }, {
+        label => l('Former Title Complexity Note: '),
+        xpath => '//*[@tag="547"]'
+    }, {
+        label => l('Issuing Body Note: '),
+        xpath => '//*[@tag="550"]'
+    }, {
+        label => l('Entity and Attribute Information Note: '),
+        xpath => '//*[@tag="552"]'
+    }, {
+        label => l('Cumulative Index/Finding Aids Note: '),
+        xpath => '//*[@tag="555"]'
+    }, {
+        label => l('Information About Documentation Note: '),
+        xpath => '//*[@tag="556"]'
+    }, {
+        label => l('Ownership and Custodial History: '),
+        xpath => '//*[@tag="561"]'
+    }, {
+        label => l('Copy and Version Identification Note: '),
+        xpath => '//*[@tag="562"]'
+    }, {
+        label => l('Binding Information: '),
+        xpath => '//*[@tag="563"]'
+    }, {
+        label => l('Case File Characteristics Note: '),
+        xpath => '//*[@tag="565"]'
+    }, {
+        label => l('Methodology Note: '),
+        xpath => '//*[@tag="567"]'
+    }, {
+        label => l('Linking Entry Complexity Note: '),
+        xpath => '//*[@tag="580"]'
+    }, {
+        label => l('Publications About Described Materials Note: '),
+        xpath => '//*[@tag="581"]'
+    }, {
+        label => l('Action Note: '),
+        xpath => '//*[@tag="583"]'
+    }, {
+        label => l('Accumulation and Frequency of Use Note: '),
+        xpath => '//*[@tag="584"]'
+    }, {
+        label => l('Exhibitions Note: '),
+        xpath => '//*[@tag="585"]'
+    }, {
+        label => l('Awards Note: '),
+        xpath => '//*[@tag="586"]'
+    }, {
+        label => l('Source of Description Note: '),
+        xpath => '//*[@tag="588"]'
+    } 
+];
+
+BLOCK render_contents;
+    xpath = xpath || '//*[starts-with(@tag,"5")]';
+    FOR node IN ctx.marc_xml.findnodes(xpath);
+        all_content = [];
+        FOR subfield IN node.childNodes;
+            NEXT UNLESS subfield.nodeName == "subfield";
+            code = subfield.getAttribute('code');
+            NEXT UNLESS code.match('[a-z]');
+            all_content.push(subfield.textContent);
+            total_contents = all_content.join(" ").replace('\s+$', '');
+        %] [% total_contents %][%- END;
+        IF all_terms.size; "<br/>"; END;
+    END;
+END 
+%]
+
+[%  BLOCK render_all_contents;
+    FOREACH cont IN contents;
+        content = PROCESS render_contents(xpath=cont.xpath);
+        IF content.match('\S');
+%]
+        <table class='rdetail_content'>
+            <tbody>
+                <tr>
+                    <td class='rdetail_content_type'>[% cont.label %]</td>
+                    <td class='rdetail_content_value' itemprop='keywords'>[% content %]</td>
+                </tr>
+            </tbody>
+        </table>
+        [%- END; %]
+    [%- END; %]
+[%- END %]
+
+[%-  content_html = PROCESS render_all_contents;
+    IF content_html.length > 0;
+%]
+<h2 class='rdetail_contents'>[% l('Content descriptions') %]</h2>
+[%- content_html %]
+[%- END %]
diff --git a/Open-ILS/src/templates/opac/parts/record/extras.tt2 b/Open-ILS/src/templates/opac/parts/record/extras.tt2
index c031bc7..14d0d92 100644
--- a/Open-ILS/src/templates/opac/parts/record/extras.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/extras.tt2
@@ -36,7 +36,7 @@
 
         extras = [
             {name => 'summaryplus',  label => l('Summaries &amp; More'), hide => hide_summary}, 
-            {name => 'contents',  label => l('Contents'), hide => !attrs.contents},
+            {name => 'contents',  label => l('Contents'), hide => !ctx.marc_xml.findnodes('//*[starts-with(@tag,"5")]')},
             {name => 'annotation', label => l('Annotation'), hide => 1}, 
             {name => 'awards',  label => l('Awards, Reviews, & Suggested Reads')}, 
             {name => 'excerpt',  label => l('Excerpt'), hide => 1},
@@ -75,8 +75,6 @@
             [%  IF tab_is_active(name);
                     IF name == 'marchtml';
                         ctx.marchtml;
-                    ELSIF name == 'contents';
-                        attrs.contents;
                     ELSE;
                         # Load the template for the selected extra
                         INCLUDE "opac/parts/record/${name}.tt2";

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

Summary of changes:
 Open-ILS/src/templates/opac/css/style.css.tt2      |    7 +-
 .../src/templates/opac/parts/record/contents.tt2   |  193 ++++++++++++++++++++
 .../src/templates/opac/parts/record/extras.tt2     |    3 -
 .../src/templates/opac/parts/record/summary.tt2    |    1 +
 4 files changed, 200 insertions(+), 4 deletions(-)
 create mode 100644 Open-ILS/src/templates/opac/parts/record/contents.tt2


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list