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

Evergreen Git git at git.evergreen-ils.org
Mon Apr 9 08:46:16 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  1406a46bf12b1e9fdce323b917cf52a4296072d0 (commit)
      from  fc5f7714c978fd7a5b5c4ce77d6a993e10dd6ccf (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 1406a46bf12b1e9fdce323b917cf52a4296072d0
Author: Dan Scott <dan at coffeecode.net>
Date:   Sun Apr 8 15:47:10 2012 -0400

    TPAC: Show deleted record warning for deleted records
    
    At the cost of an extra database query per record displayed, we can
    properly activate the "This record has been deleted..." message. Prior
    to this commit, the message was embedded on every page but hidden via
    CSS - which isn't great for search engines or source-reading types.
    
    Now we only include & display the message if it has, in fact, been
    deleted.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index abb8265..9150480 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -64,6 +64,14 @@ sub load_record {
 
     $self->get_hold_copy_summary($rec_id, $org);
 
+    $self->ctx->{bib_is_dead} = OpenILS::Application::AppUtils->is_true(
+        OpenILS::Utils::CStoreEditor->new->json_query({
+            select => { bre => [ 'deleted' ] },
+            from => 'bre',
+            where => { 'id' => $rec_id }
+        })->[0]->{deleted}
+    );
+
     $cstore->kill_me;
 
     if (
diff --git a/Open-ILS/src/templates/opac/parts/record/body.tt2 b/Open-ILS/src/templates/opac/parts/record/body.tt2
index 9f120c6..0571a72 100644
--- a/Open-ILS/src/templates/opac/parts/record/body.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/body.tt2
@@ -43,10 +43,10 @@
         <div class="clear-both"></div>
     </div>
     [% END %]
-
-    <div style='font-weight: bold; padding: 5px; margin: 5px; width: 100%;'
-        class='hide_me color_4' id='rdetail_deleted_exp'>
+    [%- IF ctx.bib_is_dead %]
+    <div id='rdetail_deleted_exp'>
         [% l("This record has been deleted from the database.  We recommend that you remove this title from any bookbags it may have been added to.") %]
     </div>
+    [%- END %]
     [% INCLUDE "opac/parts/record/summary.tt2" %]
 </div>
diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css
index 62b677f..b5d4387 100644
--- a/Open-ILS/web/css/skin/default/opac/style.css
+++ b/Open-ILS/web/css/skin/default/opac/style.css
@@ -1425,3 +1425,9 @@ a.preflib_change {
 .rdetail-holding-group { margin-left: 1.5em; }
 .rdetail-holding-group span { margin-left: 1.5em; }
 .rdetail-holding-group .paging { margin-left: 1.5em; }
+#rdetail_deleted_exp {
+    font-weight: bold;
+    padding: 1em;
+    margin: 1em;
+    border: thick solid red;
+}

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

Summary of changes:
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm |    8 ++++++++
 Open-ILS/src/templates/opac/parts/record/body.tt2  |    6 +++---
 Open-ILS/web/css/skin/default/opac/style.css       |    6 ++++++
 3 files changed, 17 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list