From 129bf4781f834424858be6eef8fac11511a0a42d Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 17 Mar 2023 08:59:42 +0000 Subject: [PATCH] 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 Signed-off-by: Lucas Gass Signed-off-by: Tomas Cohen Arazi --- .../bootstrap/en/includes/serial-status.inc | 12 ++++++++++++ .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 13 +------------ .../bootstrap/en/modules/opac-full-serial-issues.tt | 13 +------------ 3 files changed, 14 insertions(+), 24 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc new file mode 100644 index 0000000000..456171ecf2 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc @@ -0,0 +1,12 @@ +[% IF ( serial.status1 ) %]Expected[% END %] +[% IF ( serial.status2 ) %]Arrived[% END %] +[% IF ( serial.status3 ) %]Late[% END %] +[% IF ( serial.status4 ) %]Missing[% END %] + [% IF ( serial.status41 ) %]Missing (never received)[% END %] + [% IF ( serial.status42 ) %]Missing (sold out)[% END %] + [% IF ( serial.status43 ) %]Missing (damaged)[% END %] + [% IF ( serial.status44 ) %]Missing (lost)[% END %] +[% IF ( serial.status5 ) %]Not available[% END %] +[% IF ( serial.status6 ) %]Delete[% END %] +[% IF ( serial.status7 ) %]Claimed[% END %] +[% IF ( serial.status8 ) %]Stopped[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index ae49613297..4ef51c19c4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -767,18 +767,7 @@ [% latestserial.publisheddate | $KohaDates %] [% latestserial.planneddate | $KohaDates %] - [% IF (latestserial.status1 ) %]Expected[% END %] - [% IF (latestserial.status2 ) %]Arrived[% END %] - [% IF (latestserial.status3 ) %]Late[% END %] - [% IF (latestserial.status4 ) %]Missing[% END %] - [% IF (latestserial.status41 ) %]Missing (never received)[% END %] - [% IF (latestserial.status42 ) %]Missing (sold out)[% END %] - [% IF (latestserial.status43 ) %]Missing (damaged)[% END %] - [% IF (latestserial.status44 ) %]Missing (lost)[% END %] - [% IF (latestserial.status5 ) %]Not issued[% END %] - [% IF (latestserial.status6 ) %]Delete[% END %] - [% IF (latestserial.status7 ) %]Claimed[% END %] - [% IF (latestserial.status8 ) %]Stopped[% END %] + [% INCLUDE 'serial-status.inc' serial = latestserial %] [% latestserial.notes | html %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt index 3b24ba9087..758dfcbeec 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt @@ -165,18 +165,7 @@ [% serial.serialseq | html %] - [% IF ( serial.status1 ) %]Expected[% END %] - [% IF ( serial.status2 ) %]Arrived[% END %] - [% IF ( serial.status3 ) %]Late[% END %] - [% IF ( serial.status4 ) %]Missing[% END %] - [% IF ( serial.status41 ) %]Missing (never received)[% END %] - [% IF ( serial.status42 ) %]Missing (sold out)[% END %] - [% IF ( serial.status43 ) %]Missing (damaged)[% END %] - [% IF ( serial.status44 ) %]Missing (lost)[% END %] - [% IF ( serial.status5 ) %]Not available[% END %] - [% IF ( serial.status6 ) %]Delete[% END %] - [% IF ( serial.status7 ) %]Claimed[% END %] - [% IF ( serial.status8 ) %]Stopped[% END %] + [% INCLUDE 'serial-status.inc' serial = serial %] [% serial.subscriptionid | html %] -- 2.39.5