Bug 32752: Use an include for displaying the serial status in the OPAC

This moves the existing status in the OPAC into an include.

To test:
* Add a subscription with issues in different status
* View the OPAC detail page of the record
* Verify that in the subscription tab the status display nicely
* Veriy that More details > Full history displays the status nicely too

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Katrin Fischer 2023-03-17 08:59:42 +00:00 committed by Tomas Cohen Arazi
parent 88989f44a3
commit 129bf4781f
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
3 changed files with 14 additions and 24 deletions

View file

@ -0,0 +1,12 @@
[% IF ( serial.status1 ) %]<span>Expected</span>[% END %]
[% IF ( serial.status2 ) %]<span>Arrived</span>[% END %]
[% IF ( serial.status3 ) %]<span>Late</span>[% END %]
[% IF ( serial.status4 ) %]<span>Missing</span>[% END %]
[% IF ( serial.status41 ) %]<span>Missing (never received)</span>[% END %]
[% IF ( serial.status42 ) %]<span>Missing (sold out)</span>[% END %]
[% IF ( serial.status43 ) %]<span>Missing (damaged)</span>[% END %]
[% IF ( serial.status44 ) %]<span>Missing (lost)</span>[% END %]
[% IF ( serial.status5 ) %]<span>Not available</span>[% END %]
[% IF ( serial.status6 ) %]<span>Delete</span>[% END %]
[% IF ( serial.status7 ) %]<span>Claimed</span>[% END %]
[% IF ( serial.status8 ) %]<span>Stopped</span>[% END %]

View file

@ -767,18 +767,7 @@
<td class="publisheddate" data-order="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</td>
<td class="planneddate" data-order="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</td>
<td class="serial_status">
[% IF (latestserial.status1 ) %]<span>Expected</span>[% END %]
[% IF (latestserial.status2 ) %]<span>Arrived</span>[% END %]
[% IF (latestserial.status3 ) %]<span>Late</span>[% END %]
[% IF (latestserial.status4 ) %]<span>Missing</span>[% END %]
[% IF (latestserial.status41 ) %]<span>Missing (never received)</span>[% END %]
[% IF (latestserial.status42 ) %]<span>Missing (sold out)</span>[% END %]
[% IF (latestserial.status43 ) %]<span>Missing (damaged)</span>[% END %]
[% IF (latestserial.status44 ) %]<span>Missing (lost)</span>[% END %]
[% IF (latestserial.status5 ) %]<span>Not issued</span>[% END %]
[% IF (latestserial.status6 ) %]<span>Delete</span>[% END %]
[% IF (latestserial.status7 ) %]<span>Claimed</span>[% END %]
[% IF (latestserial.status8 ) %]<span>Stopped</span>[% END %]
[% INCLUDE 'serial-status.inc' serial = latestserial %]
</td>
<td class="serial_notes">[% latestserial.notes | html %]</td>
</tr>

View file

@ -165,18 +165,7 @@
</td>
<td>[% serial.serialseq | html %]</td>
<td>
[% IF ( serial.status1 ) %]<span>Expected</span>[% END %]
[% IF ( serial.status2 ) %]<span>Arrived</span>[% END %]
[% IF ( serial.status3 ) %]<span>Late</span>[% END %]
[% IF ( serial.status4 ) %]<span>Missing</span>[% END %]
[% IF ( serial.status41 ) %]<span>Missing (never received)</span>[% END %]
[% IF ( serial.status42 ) %]<span>Missing (sold out)</span>[% END %]
[% IF ( serial.status43 ) %]<span>Missing (damaged)</span>[% END %]
[% IF ( serial.status44 ) %]<span>Missing (lost)</span>[% END %]
[% IF ( serial.status5 ) %]<span>Not available</span>[% END %]
[% IF ( serial.status6 ) %]<span>Delete</span>[% END %]
[% IF ( serial.status7 ) %]<span>Claimed</span>[% END %]
[% IF ( serial.status8 ) %]<span>Stopped</span>[% END %]
[% INCLUDE 'serial-status.inc' serial = serial %]
</td>
<td class="subscriptionidfilterclass">[% serial.subscriptionid | html %]</td>
</tr>