Bugzilla – Attachment 80035 Details for
Bug 20772
Make request metadata editable and add price_paid field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20772: (follow-up) Fix DB updates and templates
Bug-20772-follow-up-Fix-DB-updates-and-templates.patch (text/plain), 7.13 KB, created by
Andrew Isherwood
on 2018-10-05 11:00:21 UTC
(
hide
)
Description:
Bug 20772: (follow-up) Fix DB updates and templates
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2018-10-05 11:00:21 UTC
Size:
7.13 KB
patch
obsolete
>From d781b81406b809f0b3a38351e44a595c6c2bf26c Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Fri, 5 Oct 2018 11:56:31 +0100 >Subject: [PATCH] Bug 20772: (follow-up) Fix DB updates and templates > >Carry out changes requested in commenbt #27 >--- > .../bug_20772-add-price_paid_column_to_illrequests.perl | 2 +- > .../bug_20772-add-readonly-flag-to-illrequestattributes.perl | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 10 +++++----- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt | 10 +++++++--- > 4 files changed, 14 insertions(+), 10 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_20772-add-price_paid_column_to_illrequests.perl b/installer/data/mysql/atomicupdate/bug_20772-add-price_paid_column_to_illrequests.perl >index 5d32fb7914..f7207926ab 100644 >--- a/installer/data/mysql/atomicupdate/bug_20772-add-price_paid_column_to_illrequests.perl >+++ b/installer/data/mysql/atomicupdate/bug_20772-add-price_paid_column_to_illrequests.perl >@@ -2,7 +2,7 @@ $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { > > if( !column_exists( 'illrequests', 'price_paid' ) ) { >- $dbh->do( "ALTER TABLE illrequests ADD COLUMN price_paid varchar(20) DEFAULT NULL" ); >+ $dbh->do( "ALTER TABLE illrequests ADD COLUMN price_paid varchar(20) DEFAULT NULL AFTER 'cost'" ); > } > > SetVersion( $DBversion ); >diff --git a/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl b/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl >index ab64c158be..7707bc55e8 100644 >--- a/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl >+++ b/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl >@@ -2,7 +2,7 @@ $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { > > if( !column_exists( 'illrequestattributes', 'readonly' ) ) { >- $dbh->do( "ALTER TABLE illrequestattributes ADD COLUMN readonly tinyint(1) NOT NULL DEFAULT 1" ); >+ $dbh->do( "ALTER TABLE illrequestattributes ADD COLUMN readonly tinyint(1) NOT NULL DEFAULT 1 AFTER 'value'" ); > $dbh->do( "UPDATE illrequestattributes SET readonly = 1" ); > } > >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 0d1ec14417..9dd1326d04 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 >@@ -441,7 +441,7 @@ > </li> > <li class="cost"> > <label class="cost">Cost:</label> >- [% request.cost || 'N/A' | html %] >+ [% IF request.cost %][% request.cost | html %][% ELSE %]<span>N/A</span>[% END %] > </li> > <li class="price_paid"> > <label class="price_paid">Price paid:</label> >@@ -514,7 +514,7 @@ > <div class="rows"> > <div class="orderid"> > <span class="label orderid">Order ID:</span> >- [% request.orderid || "N/A" | html %] >+ [% IF request.orderid %][% request.orderid | html %][% ELSE %]<span>N/A</span>[% END %] > </div> > <div class="borrowernumber"> > <span class="label borrowernumber">Patron:</span> >@@ -526,7 +526,7 @@ > > <div class="biblio_id"> > <span class="label biblio_id">Bibliographic record ID:</span> >- [% request.biblio_id || "N/A" | html %] >+ [% IF request.biblio_id %][% request.biblio_id | html %][% ELSE %]<span>N/A</span>[% END %] > </div> > <div class="branchcode"> > <span class="label branchcode">Library:</span> >@@ -546,11 +546,11 @@ > </div> > <div class="cost"> > <span class="label cost">Cost:</span> >- [% request.cost || "N/A" | html %] >+ [% IF request.cost %][% request.cost | html %][% ELSE %]<span>N/A</span>[% END %] > </div> > <div class="price_paid"> > <span class="label price_paid">Price paid:</span> >- [% request.price_paid || "N/A" %] >+ [% IF request.price_paid %][% request.price_paid | html %][% ELSE %]<span>N/A</span>[% END %] > </div> > <div class="req_id"> > <span class="label req_id">Request number:</span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >index 838f827951..c44f4199a1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >@@ -125,8 +125,12 @@ > [% FOREACH request IN requests %] > [% status = request.status | html %] > <tr> >- <td>[% request.metadata.Author || 'N/A' | html %]</td> >- <td>[% request.metadata.Title || 'N/A' | html %]</td> >+ <td> >+ [% IF request.metadata.Author %][% request.metadata.Author | html %][% ELSE %]<span>N/A</span>[% END %] >+ </td> >+ <td> >+ [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]<span>N/A</span>[% END %] >+ </td> > <td>[% request.backend | html %]</td> > <td>[% request.medium | html %]</td> > <td>[% request.capabilities.$status.name | html %]</td> >@@ -192,7 +196,7 @@ > [% FOREACH meta IN request.metadata %] > <div class="requestattr-[% meta.key | html %]"> > <span class="label">[% meta.key | html %]:</span> >- [% meta.value || 'N/A' | html %] >+ [% IF meta.value %][% meta.value | html %][% ELSE %]<span>N/A</span>[% END %] > </div> > [% END %] > </div> >-- >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 20772
:
75491
|
75492
|
75493
|
75494
|
75495
|
75496
|
75497
|
75563
|
77230
|
77231
|
77232
|
77233
|
77234
|
77235
|
77236
|
77237
|
80010
|
80011
|
80012
|
80013
|
80014
|
80015
|
80016
|
80017
|
80027
|
80028
|
80029
|
80030
|
80031
|
80032
|
80033
|
80034
|
80035
|
80036
|
80037
|
80039
|
80041
|
80042
|
80043
|
80044
|
80045
|
80046
|
80051
|
80232
|
80566
|
80567
|
80568
|
80569
|
80570
|
80571
|
80572
|
80573
|
80574
|
80575
|
80576
|
80577