Bug 27421: (QA follow-up) Template polishing

The completed alert needs a condition on status.
The record_type variable needs a bit of 'context'.

Test plan:
Verify if a failed or new job does not have a Completed alert.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Marcel de Rooy 2022-09-06 12:14:02 +00:00 committed by Tomas Cohen Arazi
parent 5b6d1e99a2
commit d939368ce9
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
3 changed files with 11 additions and 3 deletions

View file

@ -3,7 +3,9 @@
[% BLOCK report %]
[% SET report = job.report %]
[% IF report %]
<div class="dialog message">Completed import of records</div>
[% IF job.status == 'finished' %]
<div class="dialog message">Completed import of records</div>
[% END %]
<table>
<tr>
<td>Number of records added</td>

View file

@ -3,7 +3,9 @@
[% BLOCK report %]
[% SET report = job.report %]
[% IF report %]
<div class="dialog message">Success: Import reverted</div>
[% IF job.status == 'finished' %]
<div class="dialog message">Success: Import reverted</div>
[% END %]
<table>
<tr>
<td>Number of records deleted</td>

View file

@ -3,8 +3,12 @@
[% BLOCK report %]
[% SET report = job.report %]
[% IF report %]
[% IF job.status == 'finished' %]
<div class="dialog message">Completed staging records</div>
[% END %]
<h2>MARC staging results</h2>
[% SWITCH (record_type) %]
[% SWITCH job.decoded_data.record_type %]
[% CASE 'biblio' %]
<h3>Processing bibliographic records</h3>
[% CASE 'auth' %]