Bugzilla – Attachment 90886 Details for
Bug 23126
Multiline entries in subscription history display with <br/> in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23126: Display multi-line entries in subscrpitions correctly
Bug-23126-Display-multi-line-entries-in-subscrpiti.patch (text/plain), 8.53 KB, created by
David Nind
on 2019-06-21 09:52:48 UTC
(
hide
)
Description:
Bug 23126: Display multi-line entries in subscrpitions correctly
Filename:
MIME Type:
Creator:
David Nind
Created:
2019-06-21 09:52:48 UTC
Size:
8.53 KB
patch
obsolete
>From 94e8261aa94a13bba46320f0cb43075bb7cdbf76 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Tue, 18 Jun 2019 08:06:10 +0200 >Subject: [PATCH] Bug 23126: Display multi-line entries in subscrpitions > correctly > >There are several notes and other fields in a subscription that >can be entered as multi-line input with breaks. We should display >them as they were entered with keeping the line breaks intact. > >To test: >- Add a subscription > - Add comments including line breaks in internal and OPAC note > - Check the manual history checkbox >- Go to the subscription detail page, tab 'Planning' >- Use the 'Edit history' link to edit the history >- Enter content with line breaks in all the input fields where > it's possible >- Go to the OPAC detail page for your subscription record >- Go to tab 'Subscriptions' > More details > Brief history >- Verify the line breaks show there as <br> >- Apply patch >- Relaod page, verify all information displays correctly now >- Go back to the detail page, subscription tab - verify same there >- Go back to the subscription detail page in staff > - Check editing the history works as expected > - Verify information on all tabs displays correctly > - Receive a serial issue - verify note on top displays right > - Go to the serial collection page of the subscription - same there > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Serials.pm | 3 --- > .../intranet-tmpl/prog/en/modules/serials/serials-collection.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt | 2 +- > .../intranet-tmpl/prog/en/modules/serials/subscription-detail.tt | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt | 4 ++-- > opac/opac-serial-issues.pl | 6 ------ > 7 files changed, 7 insertions(+), 16 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 44c3cb958e..6bdbd8cc4e 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -429,9 +429,6 @@ sub GetSubscriptionsFromBiblionumber { > $subs->{histenddate} = ""; > } > $subs->{opacnote} //= ""; >- $subs->{opacnote} =~ s/\n/\<br\/\>/g; >- $subs->{missinglist} =~ s/\n/\<br\/\>/g; >- $subs->{recievedlist} =~ s/\n/\<br\/\>/g; > $subs->{ "periodicity" . $subs->{periodicity} } = 1; > $subs->{ "numberpattern" . $subs->{numberpattern} } = 1; > $subs->{ "status" . $subs->{'status'} } = 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >index 454a7262c7..7d4310d406 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >@@ -53,7 +53,7 @@ > <td>[% subscription.numberpattern.label | html %]</td> > <td>[% IF subscription.branchcode %][% Branches.GetName( subscription.branchcode ) | html %][% END %]</td> > <td> [% subscription.callnumber | html %]</td> >- <td> [% subscription.notes | html %] >+ <td> [% subscription.notes | html | html_line_break %] > [% UNLESS subscription.closed %] > [% IF ( subscription.subscriptionexpired ) %] > <br /><span class="problem"> Subscription expired</span> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index 37ccf50194..7d95e0564d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -95,7 +95,7 @@ $(document).ready(function() { > <h1>Serial edition <i>[% bibliotitle | html %]</i> > [% IF location %] ([% AuthorisedValues.GetByCode('LOC', location) | html %])[% END %] > [% IF ( callnumber ) %] callnumber: [% callnumber | html %][% END %]</h1> >-[% IF internalnotes %]<p>Nonpublic note: [% internalnotes | html %]</p>[% END %] >+[% IF internalnotes %]<p>Nonpublic note: [% internalnotes | html | html_line_break %]</p>[% END %] > <form method="post" name="f" class="noEnterSubmit" action="serials-edit.pl" id="serials_edit"> > > [% IF ( Errors ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index a30270abf7..4cf1291bb7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -332,8 +332,8 @@ > <li><span class="label">End date:</span> [% enddate | html %]</li> > <li><span class="label">History start date:</span> [% histstartdate | html %] </li> > <li><span class="label">History end date:</span> [% histenddate | html %]</li> >- <li><span class="label">Received issues:</span>[% recievedlist | html %]</li> >- <li><span class="label">Missing issues:</span>[% missinglist | html %]</li> >+ <li><span class="label">Received issues:</span>[% recievedlist | html | html_line_break %]</li> >+ <li><span class="label">Missing issues:</span>[% missinglist | html | html_line_break %]</li> > <li><span class="label">Nonpublic note:</span>[% internalnotes | html | html_line_break %]</li> > <li><span class="label">Public note:</span>[% notes | html | html_line_break %]</li> > <li><span class="label">History staff note:</span>[% librariannote | html | html_line_break %]</li> >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 d3e95f0097..3f04b4e6f7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -832,7 +832,7 @@ > [% END %] > </span>[% END %] > [% IF ( subscription.missinglist ) %] >- <p class="subscription_missing">Missing issues: [% subscription.missinglist | html %] </p> >+ <p class="subscription_missing">Missing issues: [% subscription.missinglist | html | html_line_break %] </p> > [% END %] > [% IF ( subscription.opacnote ) %] > <p class="subscription_opacnote">[% subscription.opacnote | html | html_line_break %]</p> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt >index c416dab05f..6f6e879ca6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt >@@ -120,12 +120,12 @@ > > [% IF ( subscription_LOO.recievedlist ) %] > <h5>Available issues</h5> >- <p>[% subscription_LOO.recievedlist | html %]</p> >+ <p>[% subscription_LOO.recievedlist | html | html_line_break %]</p> > [% END %] > > [% IF ( subscription_LOO.missinglist ) %] > <h5>Unavailable issues</h5> >- <p>[% subscription_LOO.missinglist | html %]</p> >+ <p>[% subscription_LOO.missinglist | html | html_line_break %]</p> > [% END %] > > [% IF ( subscription_LOO.opacnote ) %] >diff --git a/opac/opac-serial-issues.pl b/opac/opac-serial-issues.pl >index b94935feee..88f86646e1 100755 >--- a/opac/opac-serial-issues.pl >+++ b/opac/opac-serial-issues.pl >@@ -71,9 +71,6 @@ if ( $selectview eq "full" ) { > my $yearmin = $subscriptions->[0]->{year}; > my $yearmax = $subscriptions->[ -1 ]->{year}; > >- # replace CR by <br> in librarian note >- # $subscription->{opacnote} =~ s/\n/\<br\/\>/g; >- > $template->param( > biblionumber => scalar $query->param('biblionumber'), > years => $subscriptioninformation, >@@ -106,9 +103,6 @@ else { > } > } > >- # replace CR by <br> in librarian note >- # $subscription->{opacnote} =~ s/\n/\<br\/\>/g; >- > my $title = $subscriptions->[0]->{bibliotitle}; > > $template->param( >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23126
:
90714
|
90869
|
90886
|
90887
|
90929
|
90931
|
90932
|
90967
|
90968
|
90969