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

Evergreen Git git at git.evergreen-ils.org
Mon Jun 13 10:07:08 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, master has been updated
       via  ec980413ac34112c6994bd582c20edb30bb9aa23 (commit)
       via  ea3b8857d08b8a9050e763f8084c841e8df9a473 (commit)
       via  081b2a5ce30d9a4582d845d191b11b6c09fd25e5 (commit)
       via  30992ad5459ebf2b135ba614040d68399f60fffd (commit)
      from  da0b6c44881f85509822802e58774488d84a2059 (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 ec980413ac34112c6994bd582c20edb30bb9aa23
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 ea3b8857d08b8a9050e763f8084c841e8df9a473
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 081b2a5ce30d9a4582d845d191b11b6c09fd25e5
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 30992ad5459ebf2b135ba614040d68399f60fffd
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