Bugzilla – Attachment 159658 Details for
Bug 35108
ILL - "Manage request" page is too loaded
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35108: Hide optionally empty fields label entries, these are:
Bug-35108-Hide-optionally-empty-fields-label-entri.patch (text/plain), 11.12 KB, created by
Pedro Amorim
on 2023-12-07 16:52:33 UTC
(
hide
)
Description:
Bug 35108: Hide optionally empty fields label entries, these are:
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-12-07 16:52:33 UTC
Size:
11.12 KB
patch
obsolete
>From a00ec358654e66d22fc71a1f89a0044e2e27a4a6 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 19 Oct 2023 14:13:48 +0000 >Subject: [PATCH] Bug 35108: Hide optionally empty fields label entries, these > are: > >orderid, biblio_id, batch already was the case, type, type_disclaimer_value, type_disclaimer_date, cost, price_paid, notesstaff, notesopac > >Test plan, k-t-d: >1) Install FreeForm and BLDSS backends, run: >bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-plus.sh) >2) Create a new FreeForm request, visit: >/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm >5) Set type 'Book', put '42' in the cardnumber, and pick a library. Click 'create'. >6) Notice how there is a lot of unnecessary empty field entries >7) Apply patch, restart plack (koha-plack --restart kohadev) >8) Refresh the page, notice all the empty fields entries are no longer displayed >--- > .../prog/en/modules/ill/ill-requests.tt | 114 ++++++++++-------- > 1 file changed, 65 insertions(+), 49 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index f25db5d988..0a8b9163f4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -631,10 +631,12 @@ > <h4>Details from library</h4> > <div class="rows"> > <ol> >- <li class="orderid"> >- <span class="label orderid">Order ID:</span> >- [% IF request.orderid %][% request.orderid | html %][% ELSE %]<span>N/A</span>[% END %] >- </li> >+ [% IF request.orderid %] >+ <li class="orderid"> >+ <span class="label orderid">Order ID:</span> >+ [% request.orderid | html %] >+ </li> >+ [% END %] > <li class="borrowernumber"> > <span class="label borrowernumber">Patron:</span> > [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %] >@@ -642,15 +644,12 @@ > [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %] > </a> > </li> >- >- <li class="biblio_id"> >- <span class="label biblio_id">Bibliographic record ID:</span> >- [% IF request.biblio_id %] >+ [% IF request.biblio_id %] >+ <li class="biblio_id"> >+ <span class="label biblio_id">Bibliographic record ID:</span> > <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% request.biblio_id | uri %]">[% request.biblio_id | html %]</a> >- [% ELSE %] >- <span>N/A</span> >- [% END %] >- </li> >+ </li> >+ [% END %] > <li class="branchcode"> > <span class="label branchcode">Library:</span> > [% Branches.GetName(request.branchcode) | html %] >@@ -667,58 +666,75 @@ > [% END %] > </li> > [% IF request.ill_batch > 0 %] >- <li class="batch"> >- <span class="label batch">Batch:</span> >- <a href="/cgi-bin/koha/ill/ill-requests.pl?batch_id=[% request.ill_batch.ill_batch_id | uri %]"> >- [% request.ill_batch.name | html %] >- </a> >- </li> >+ <li class="batch"> >+ <span class="label batch">Batch:</span> >+ <a href="/cgi-bin/koha/ill/ill-requests.pl?batch_id=[% request.ill_batch.ill_batch_id | uri %]"> >+ [% request.ill_batch.name | html %] >+ </a> >+ </li> > [% END %] > <li class="updated"> > <span class="label updated">Last updated:</span> > [% request.updated | $KohaDates with_hours => 1 %] > </li> >- <li class="medium"> >- <span class="label medium">Request type:</span> >- [% type = request.get_type %] >- [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %] >- </li> >- <li class="type_disclaimer_value"> >- <span class="label type_disclaimer_value">Type disclaimer value:</span> >- [% type_disclaimer_value = request.get_type_disclaimer_value %] >- [% IF type_disclaimer_value %][% type_disclaimer_value | html %][% ELSE %]<span>N/A</span>[% END %] >- </li> >- <li class="type_disclaimer_date"> >- <span class="label type_disclaimer_date">Type disclaimer date:</span> >- [% type_disclaimer_date = request.get_type_disclaimer_date %] >- [% IF type_disclaimer_date %][% type_disclaimer_date | html %][% ELSE %]<span>N/A</span>[% END %] >- </li> >- <li class="cost"> >- <span class="label cost">Cost:</span> >- [% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %] >- </li> >- <li class="price_paid"> >- <span class="label price_paid">Price paid:</span> >- [% IF request.price_paid %][% request.price_paid | $Price %][% ELSE %]<span>N/A</span>[% END %] >- </li> >- <li class="notesstaff"> >- <span class="label notes_staff">Staff notes:</span> >- <p>[% request.notesstaff | html %]</p> >- </li> >- <li class="notesopac"> >- <span class="label notes_opac">Notes:</span> >- <p>[% request.notesopac | html %]</p> >- </li> >+ [% type = request.get_type %] >+ [% IF type %] >+ <li class="medium"> >+ <span class="label medium">Request type:</span> >+ [% type | html %] >+ </li> >+ [% END %] >+ [% type_disclaimer_value = request.get_type_disclaimer_value %] >+ [% IF type_disclaimer_value %] >+ <li class="type_disclaimer_value"> >+ <span class="label type_disclaimer_value">Type disclaimer value:</span> >+ [% type_disclaimer_value = request.get_type_disclaimer_value %] >+ [% type_disclaimer_value | html %] >+ </li> >+ [% END %] >+ [% type_disclaimer_date = request.get_type_disclaimer_date %] >+ [% IF type_disclaimer_date %] >+ <li class="type_disclaimer_date"> >+ <span class="label type_disclaimer_date">Type disclaimer date:</span> >+ [% type_disclaimer_date | html %] >+ </li> >+ [% END %] >+ [% IF request.cost %] >+ <li class="cost"> >+ <span class="label cost">Cost:</span> >+ [% request.cost | $Price %] >+ </li> >+ [% END %] >+ [% IF request.price_paid %] >+ <li class="price_paid"> >+ <span class="label price_paid">Price paid:</span> >+ [% request.price_paid | $Price %] >+ </li> >+ [% END %] >+ [% IF request.notesstaff %] >+ <li class="notesstaff"> >+ <span class="label notes_staff">Staff notes:</span> >+ <p>[% request.notesstaff | html %]</p> >+ </li> >+ [% END %] >+ [% IF request.notesopac %] >+ <li class="notesopac"> >+ <span class="label notes_opac">Notes:</span> >+ <p>[% request.notesopac | html %]</p> >+ </li> >+ [% END %] > </ol> > </div> > <div class="rows"> > <h4>Details from supplier ([% request.backend | html %])</h4> > <ol> > [% FOREACH meta IN request.metadata %] >+ [% IF meta.value %] > <li class="requestmeta-[% meta.key.replace('\s','_') | html %]"> > <span class="label">[% meta.key.replace('_',' ') | html %]:</span> > [% meta.value | html %] > </li> >+ [% END %] > [% END %] > </ol> > </div> >-- >2.30.2
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 35108
:
157458
|
157463
|
157464
|
159657
|
159658
|
159688
|
159689
|
159752
|
159753
|
165136
|
165137