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@coffeecode.net>
Signed-off-by: Ben Shum <bshum@biblio.org>
$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 (
<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>
.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;
+}