kohabug 2186 - improve display of empty import batches
[1] Display the "No records have been staged" message only
if no import batches exist.
[2] When displaying a batch that has no bibs in it, display
a "There are no records in this batch to import". Also,
do not display the "import record into catalogue" button
for an empty batch.
[3] Add CSS class "problem" to both messages.
Documentation changes: minor; only required if screenshots
exist of the manage staged MARC records page that has no
import batches on it.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
7ff55f6c40
commit
57fb7e45b7
|
|
@ -38,6 +38,14 @@
|
|||
<p>Label batch created, with id: <!-- TMPL_VAR name="label_batch" --> </p>
|
||||
</div>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- TMPL_UNLESS name="batch_list" -->
|
||||
<!-- TMPL_UNLESS name="batch_info" -->
|
||||
<span class="problem">No records have been staged.</span>
|
||||
<a href="/cgi-bin/koha/tools/stage-marc-import.pl">Stage MARC records for import</a>.
|
||||
<!-- /TMPL_UNLESS -->
|
||||
<!-- /TMPL_UNLESS -->
|
||||
|
||||
<!-- TMPL_IF name="batch_info" -->
|
||||
<fieldset class="rows">
|
||||
<ul>
|
||||
|
|
@ -259,8 +267,11 @@ Page
|
|||
<!-- /TMPL_LOOP -->
|
||||
</div>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_ELSE -->
|
||||
No records have been staged. <a href="/cgi-bin/koha/tools/stage-marc-import.pl">Stage MARC records for import</a>.
|
||||
<!-- TMPL_ELSE -->
|
||||
<!-- TMPL_IF name="batch_info" -->
|
||||
<span class="problem">There are no records in this batch to import.</span>
|
||||
<a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>.
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -365,11 +365,13 @@ sub batch_info {
|
|||
$template->param(upload_timestamp => $batch->{'upload_timestamp'});
|
||||
$template->param(num_biblios => $batch->{'num_biblios'});
|
||||
$template->param(num_items => $batch->{'num_biblios'});
|
||||
if ($batch->{'import_status'} eq 'staged' or $batch->{'import_status'} eq 'reverted') {
|
||||
$template->param(can_commit => 1);
|
||||
}
|
||||
if ($batch->{'import_status'} eq 'imported') {
|
||||
$template->param(can_revert => 1);
|
||||
if ($batch->{'num_biblios'} > 0) {
|
||||
if ($batch->{'import_status'} eq 'staged' or $batch->{'import_status'} eq 'reverted') {
|
||||
$template->param(can_commit => 1);
|
||||
}
|
||||
if ($batch->{'import_status'} eq 'imported') {
|
||||
$template->param(can_revert => 1);
|
||||
}
|
||||
}
|
||||
if (defined $batch->{'matcher_id'}) {
|
||||
my $matcher = C4::Matcher->fetch($batch->{'matcher_id'});
|
||||
|
|
|
|||
Loading…
Reference in New Issue