[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. d164e07bd250886804239f851e0ccd7c2b47892d

Evergreen Git git at git.evergreen-ils.org
Mon Jun 13 10:09:47 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_0 has been updated
       via  d164e07bd250886804239f851e0ccd7c2b47892d (commit)
       via  4ffa9f093e3c805e918c70b29e2ce134bb310a68 (commit)
       via  58e6dfd49a33597985d4f4854451ef50f82ffa98 (commit)
       via  f322924fcc63e69ddfb8950cf2862cbbbbdd354e (commit)
      from  52db7cd3c9fb40dcba787408c929c2c3b5049e04 (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 d164e07bd250886804239f851e0ccd7c2b47892d
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 4ffa9f093e3c805e918c70b29e2ce134bb310a68
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/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
index 66202f6..1022fa4 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
@@ -3296,7 +3296,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";
 
@@ -3417,7 +3417,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 58e6dfd49a33597985d4f4854451ef50f82ffa98
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 f322924fcc63e69ddfb8950cf2862cbbbbdd354e
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:
 .../src/perlmods/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