[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. e9ac062bb6999ccaf8cc2d71027bd1c6e11a022b

Evergreen Git git at git.evergreen-ils.org
Mon Jun 13 10:08:54 EDT 2011


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, rel_2_1 has been updated
       via  e9ac062bb6999ccaf8cc2d71027bd1c6e11a022b (commit)
       via  8abd5c7d8552ef8b9acf0a9e2090ec667674837d (commit)
       via  7feafcf562d49a0af383824dd3c7b5bdd05fa170 (commit)
       via  e1a860f0e0e4f7fe749c2f1b4de74e738245317c (commit)
      from  577c9dfe80ae302f82d7b16b80eb408bf531777c (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 e9ac062bb6999ccaf8cc2d71027bd1c6e11a022b
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Jun 7 10:16:25 2011 -0400

    Use the new status.opac_visible attribute in search summary
    
    Until we exposed the OPAC visibility of the status element as set in
    config.copy_status, We previously had to hardcode the logic for whether
    a given copy should be displayed based on its status. Now we can simply
    use the status.opac_visible attribute to determine visibility.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/opac/skin/default/xml/result/result_table.xml b/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
index 8838a80..7ee942a 100644
--- a/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
+++ b/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
@@ -166,28 +166,15 @@
                                                 return;
                                             }
 
-                                            /* 
-                                               Hardcoded check for copy statuses per default opac_visible
-                                               setting in config.copy_status; replace with a copy attribute
-                                               check for visible status if holdings_xml ever gets that
-                                            */
-                                            var ident;
+                                            /* Ensure the status is visible */
+                                            var visible_status;
                                             dojo.query('status', cp).forEach(function (status) {
-                                                ident = status.getAttribute('ident');
+                                                visible_status = status.getAttribute('opac_visible');
                                             });
-                                            if (parseInt(ident) !== 0 && /* Available */
-                                                parseInt(ident) != 1 &&  /* Checked out */
-                                                parseInt(ident) != 5 &&  /* In process */
-                                                parseInt(ident) != 6 &&  /* In transit */
-                                                parseInt(ident) != 7 &&  /* Reshelving */
-                                                parseInt(ident) != 8 &&  /* On holds shelf */
-                                                parseInt(ident) != 9 &&  /* On order */
-                                                parseInt(ident) != 12
-                                            ) {
+                                            if (visible_status == 'f') {
                                                 return;
                                             }
 
-
                                             /* Ensure the circulation library is visible */
                                             var lib_vis;
                                             dojo.query('circlib', cp).forEach(function (status) {

commit 8abd5c7d8552ef8b9acf0a9e2090ec667674837d
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Jun 7 10:09:57 2011 -0400

    Add opac_visible attribute to copy and serial unit statuses
    
    config.copy_status defines an opac_visible column, but that attribute
    was not being exposed in the holdings XML, so code that displayed copies
    and serial units based on the holdings XML had to hardcode the display
    based on the status ID or name instead of using the configured setting.
    
    To simplify display logic, teach holdings XML about the opac_visible
    column and expose its value in the status element as a new opac_visible
    attribute.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm
index 68928a6..a0a634a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm
@@ -3336,7 +3336,7 @@ sub as_xml {
 
     $xml .= ">\n";
 
-    $xml .= '        <status ident="' . $self->obj->status->id . '">' . $self->escape( $self->obj->status->name  ) . "</status>\n";
+    $xml .= '        <status ident="' . $self->obj->status->id . '" opac_visible="' . $self->obj->status->opac_visible . '">' . $self->escape( $self->obj->status->name  ) . "</status>\n";
     $xml .= '        <location ident="' . $self->obj->location->id . '">' . $self->escape( $self->obj->location->name  ) . "</location>\n";
     $xml .= '        <circlib ident="' . $self->obj->circ_lib->id . '">' . $self->escape( $self->obj->circ_lib->name  ) . "</circlib>\n";
 
@@ -3457,7 +3457,7 @@ sub as_xml {
 
     $xml .= ">\n";
 
-    $xml .= '        <status ident="' . $self->obj->status->id . '">' . $self->escape( $self->obj->status->name  ) . "</status>\n";
+    $xml .= '        <status ident="' . $self->obj->status->id . '" opac_visible="' . $self->obj->status->opac_visible . '">' . $self->escape( $self->obj->status->name  ) . "</status>\n";
     $xml .= '        <location ident="' . $self->obj->location->id . '" opac_visible="'.$self->obj->location->opac_visible.'">' . $self->escape( $self->obj->location->name  ) . "</location>\n";
     $xml .= '        <circlib ident="' . $self->obj->circ_lib->id . '" opac_visible="'.$self->obj->circ_lib->opac_visible.'">' . $self->escape( $self->obj->circ_lib->name  ) . "</circlib>\n";
 

commit 7feafcf562d49a0af383824dd3c7b5bdd05fa170
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon Jun 6 13:38:17 2011 -0400

    Make copy status visibility match default config.copy_status settings
    
    Previous version of this patch had hardcoded copy status settings to
    0, 7, 12 to match the "Available" settings, rather than the OPAC
    visibility settings available from config.copy_status for each status.
    
    Until config.copy_status.opac_visible translates into an opac_visible
    attribute on the status element in the holdings XML, this is probably
    the best we can do.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/opac/skin/default/xml/result/result_table.xml b/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
index 517ce19..8838a80 100644
--- a/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
+++ b/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
@@ -166,14 +166,24 @@
                                                 return;
                                             }
 
-                                            /* Hardcoded check for copy status 0, 7, or 12 */
+                                            /* 
+                                               Hardcoded check for copy statuses per default opac_visible
+                                               setting in config.copy_status; replace with a copy attribute
+                                               check for visible status if holdings_xml ever gets that
+                                            */
                                             var ident;
                                             dojo.query('status', cp).forEach(function (status) {
                                                 ident = status.getAttribute('ident');
                                             });
-                                            if (parseInt(ident) !== 0 && 
-                                                parseInt(ident) != 7 &&
-                                                parseInt(ident) != 12) {
+                                            if (parseInt(ident) !== 0 && /* Available */
+                                                parseInt(ident) != 1 &&  /* Checked out */
+                                                parseInt(ident) != 5 &&  /* In process */
+                                                parseInt(ident) != 6 &&  /* In transit */
+                                                parseInt(ident) != 7 &&  /* Reshelving */
+                                                parseInt(ident) != 8 &&  /* On holds shelf */
+                                                parseInt(ident) != 9 &&  /* On order */
+                                                parseInt(ident) != 12
+                                            ) {
                                                 return;
                                             }
 

commit e1a860f0e0e4f7fe749c2f1b4de74e738245317c
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon May 30 22:49:00 2011 -0400

    Plug the many OPAC visibility holes in search result item display
    
    Check volume and circ_lib and copy status OPAC visibility (and
    deleted status in the case of volumes) in addition to the existing
    copy and copy-location checks.
    
    Worst hack is hard-coded copy status IDs of 0, 7, 12 - but this is
    currently used throughout the code, so one more can't hurt that much
    (OWWW).
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/web/opac/skin/default/xml/result/result_table.xml b/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
index 5ff3ba8..517ce19 100644
--- a/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
+++ b/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
@@ -149,6 +149,12 @@
                                         if (item_cnt >= max_items) {
                                             return output.innerHTML;
                                         }
+                                        if (vol.getAttribute('deleted') == 't') {
+                                            return;
+                                        }
+                                        if (vol.getAttribute('opac_visible') == 'f') {
+                                            return;
+                                        }
                                         dojo.query('copy', vol).forEach(function (cp) {
                                             if (item_cnt >= max_items) {
                                                 return;
@@ -159,6 +165,28 @@
                                             if (cp.getAttribute('opac_visible') == 'f') {
                                                 return;
                                             }
+
+                                            /* Hardcoded check for copy status 0, 7, or 12 */
+                                            var ident;
+                                            dojo.query('status', cp).forEach(function (status) {
+                                                ident = status.getAttribute('ident');
+                                            });
+                                            if (parseInt(ident) !== 0 && 
+                                                parseInt(ident) != 7 &&
+                                                parseInt(ident) != 12) {
+                                                return;
+                                            }
+
+
+                                            /* Ensure the circulation library is visible */
+                                            var lib_vis;
+                                            dojo.query('circlib', cp).forEach(function (status) {
+                                                lib_vis = status.getAttribute('opac_visible');
+                                            });
+                                            if (lib_vis != 't') {
+                                                return;
+                                            }
+
                                             var cp_entry = dojo.create('div');
                                             var loc_visible;
                                             var vol_appended = false;

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

Summary of changes:
 .../perlmods/lib/OpenILS/Application/SuperCat.pm   |    4 +-
 .../opac/skin/default/xml/result/result_table.xml  |   25 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list