Bugzilla – Attachment 124436 Details for
Bug 28933
Hard to parse OPAC-detail subscription information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28933: Add subscription class to each subscription in opac-detail
Bug-28933-Add-subscription-class-to-each-subscript.patch (text/plain), 16.73 KB, created by
Owen Leonard
on 2021-09-02 18:32:35 UTC
(
hide
)
Description:
Bug 28933: Add subscription class to each subscription in opac-detail
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-09-02 18:32:35 UTC
Size:
16.73 KB
patch
obsolete
>From 4d5cee6b8836058db5fd57cd96130a2981225f63 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 31 Aug 2021 20:36:37 +0000 >Subject: [PATCH] Bug 28933: Add subscription class to each subscription in > opac-detail > >To Test: >1. Go to a record with some subscriptions, have some closed and some > open. >2. Go to the opac-detail page, click on the subscription tab and use > your developer tools to inscept the element. >3. Notice the hierarchy of HTML structure, everything is a sibling of > the next. >4. Apply patch >5. Reload the same opac-detail page and again inscept the element. >6. Now every individual subscription should be wrapped in an element > with the class name of 'subscription'. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../bootstrap/en/modules/opac-detail.tt | 146 +++++++++--------- > 1 file changed, 74 insertions(+), 72 deletions(-) > >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 ce9bff3939..fe2b35da26 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -628,84 +628,86 @@ > <h2>This is a serial</h2> > <p class="subscription_count">There are [% subscriptionsnumber | html %] subscription(s) associated with this title.</p> > [% FOREACH subscription IN subscriptions %] >- [% IF ( subscription.branchcode ) %] >- <h3>At library: [% Branches.GetName( subscription.branchcode ) | html %]</h3> >- [% ELSE %] >+ <div class="subscription"> > [% IF ( subscription.branchcode ) %] >- <h3>At library: [% subscription.branchcode | html %]</h3> >+ <h3>At library: [% Branches.GetName( subscription.branchcode ) | html %]</h3> >+ [% ELSE %] >+ [% IF ( subscription.branchcode ) %] >+ <h3>At library: [% subscription.branchcode | html %]</h3> >+ [% END %] > [% END %] >- [% END %] >- [% IF ( subscription.closed ) %] >- <p class="subscription_closed">This subscription is closed.</p> >- [% END %] >- [% IF ( subscription.location ) %] >- <p class="subscription_location">Location: [% AuthorisedValues.GetByCode( 'LOC', subscription.location, 1 ) | html %] >- [% END %] >- [% IF ( subscription.callnumber ) %] >- <p class="subscription_callnumber">Call number: [% subscription.callnumber | html %]</p> >- [% END %] >- [% IF ( subscription.subscriptionnotes ) %] >- <p class="subscription_notes">[% subscription.subscriptionnotes | html | html_line_break %] </p> >- [% END %] >- <p class="subscription_dates">Subscription from: [% subscription.histstartdate | $KohaDates %] to:[% IF ( subscription.histenddate ) %] [% subscription.histenddate | $KohaDates %] [% ELSE %] now (current)[% END %]</p> >- [% IF ( subscription.letter ) %] >- <span class="email_notifications"> >- [% IF ( loggedinusername ) %] >- [% IF ( subscription.hasalert ) %] >- <span>You have subscribed to email notification on new issues. </span><a class="btn btn-secondary" title="Cancel email notification" href="/cgi-bin/koha/opac-alert-subscribe.pl?op=cancel&subscriptionid=[% subscription.subscriptionid | html %]&biblionumber=[% subscription.biblionumber | html %]">Cancel email notification</a> >+ [% IF ( subscription.closed ) %] >+ <p class="subscription_closed">This subscription is closed.</p> >+ [% END %] >+ [% IF ( subscription.location ) %] >+ <p class="subscription_location">Location: [% AuthorisedValues.GetByCode( 'LOC', subscription.location, 1 ) | html %] >+ [% END %] >+ [% IF ( subscription.callnumber ) %] >+ <p class="subscription_callnumber">Call number: [% subscription.callnumber | html %]</p> >+ [% END %] >+ [% IF ( subscription.subscriptionnotes ) %] >+ <p class="subscription_notes">[% subscription.subscriptionnotes | html | html_line_break %] </p> >+ [% END %] >+ <p class="subscription_dates">Subscription from: [% subscription.histstartdate | $KohaDates %] to:[% IF ( subscription.histenddate ) %] [% subscription.histenddate | $KohaDates %] [% ELSE %] now (current)[% END %]</p> >+ [% IF ( subscription.letter ) %] >+ <span class="email_notifications"> >+ [% IF ( loggedinusername ) %] >+ [% IF ( subscription.hasalert ) %] >+ <span>You have subscribed to email notification on new issues. </span><a class="btn btn-secondary" title="Cancel email notification" href="/cgi-bin/koha/opac-alert-subscribe.pl?op=cancel&subscriptionid=[% subscription.subscriptionid | html %]&biblionumber=[% subscription.biblionumber | html %]">Cancel email notification</a> >+ [% ELSE %] >+ <a class="btn btn-secondary" title="Subscribe to email notification on new issues" href="/cgi-bin/koha/opac-alert-subscribe.pl?subscriptionid=[% subscription.subscriptionid | html %]&biblionumber=[% subscription.biblionumber | html %]">Subscribe to email notification on new issues</a> >+ [% END %] > [% ELSE %] >- <a class="btn btn-secondary" title="Subscribe to email notification on new issues" href="/cgi-bin/koha/opac-alert-subscribe.pl?subscriptionid=[% subscription.subscriptionid | html %]&biblionumber=[% subscription.biblionumber | html %]">Subscribe to email notification on new issues</a> >+ <span>You must log in if you want to subscribe to email notification on new issues</span> > [% END %] >- [% ELSE %] >- <span>You must log in if you want to subscribe to email notification on new issues</span> >- [% END %] >- </span> >- [% END %] >- [% IF ( subscription.missinglist ) %] >- <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> >- [% END %] >- [% IF ( subscription.latestserials ) %] >- <p class="subscription_latestissues"> The [% subscription.opacdisplaycount | html %] latest issues for this subscription:</p> >- <table class="table table-bordered table-striped" id="subscriptionst"> >- <caption class="sr-only">Latest serials</caption> >- <thead> >- <tr> >- <th id="serial_serialseq" data-colname="serial_serialseq">Issue #</th> >- <th id="serial_publisheddate" data-colname="serial_publisheddate">Publication date</th> >- <th id="serial_planneddate" data-colname="serial_planneddate">Received date</th> >- <th id="serial_status" data-colname="serial_status">Status</th> >- <th id="serial_notes" data-colname="serial_notes">Note</th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH latestserial IN subscription.latestserials %] >+ </span> >+ [% END %] >+ [% IF ( subscription.missinglist ) %] >+ <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> >+ [% END %] >+ [% IF ( subscription.latestserials ) %] >+ <p class="subscription_latestissues"> The [% subscription.opacdisplaycount | html %] latest issues for this subscription:</p> >+ <table class="table table-bordered table-striped" id="subscriptionst"> >+ <caption class="sr-only">Latest serials</caption> >+ <thead> > <tr> >- <td class="serialseq">[% latestserial.serialseq | html %]</td> >- <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 %] >- </td> >- <td class="serial_notes">[% latestserial.notes | html %]</td> >+ <th id="serial_serialseq" data-colname="serial_serialseq">Issue #</th> >+ <th id="serial_publisheddate" data-colname="serial_publisheddate">Publication date</th> >+ <th id="serial_planneddate" data-colname="serial_planneddate">Received date</th> >+ <th id="serial_status" data-colname="serial_status">Status</th> >+ <th id="serial_notes" data-colname="serial_notes">Note</th> > </tr> >- [% END # / FOREACH latestserials %] >- </tbody> >- </table> >- [% END # / IF subscription.latestserials %] >+ </thead> >+ <tbody> >+ [% FOREACH latestserial IN subscription.latestserials %] >+ <tr> >+ <td class="serialseq">[% latestserial.serialseq | html %]</td> >+ <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 %] >+ </td> >+ <td class="serial_notes">[% latestserial.notes | html %]</td> >+ </tr> >+ [% END # / FOREACH latestserials %] >+ </tbody> >+ </table> >+ [% END # / IF subscription.latestserials %] >+ </div> > [% END # / FOREACH subscriptions %] > <p class="subscription_moredetails"><a href="opac-serial-issues.pl?biblionumber=[% biblio.biblionumber | uri %]">More details</a></p> > </div> <!-- / #subscriptions --> >-- >2.20.1
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 28933
:
124314
|
124436
|
125321