Bugzilla – Attachment 186022 Details for
Bug 13870
Add warnings about subscriptions and orders when deleting items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13870: (follow-up) fix strings internationalisation
Bug-13870-follow-up-fix-strings-internationalisati.patch (text/plain), 3.19 KB, created by
Thibaud Guillot (thibaud_g)
on 2025-09-02 07:24:54 UTC
(
hide
)
Description:
Bug 13870: (follow-up) fix strings internationalisation
Filename:
MIME Type:
Creator:
Thibaud Guillot (thibaud_g)
Created:
2025-09-02 07:24:54 UTC
Size:
3.19 KB
patch
obsolete
>From d68e525a50a2c177fc7dc9c1536d8a9a97ce4f23 Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Tue, 2 Sep 2025 09:24:19 +0200 >Subject: [PATCH] Bug 13870: (follow-up) fix strings internationalisation > >--- > cataloguing/additem.pl | 14 +++++++------- > .../prog/en/modules/cataloguing/additem.tt | 6 +++++- > 2 files changed, 12 insertions(+), 8 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index d4610c66c56..d87da0bd37d 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -703,13 +703,13 @@ for my $item ( $biblio->items->as_list, $biblio->host_items->as_list ) { > my $i = $item->columns_to_str; > my $i_order = GetOrderFromItemnumber( $i->{itemnumber} ); > my $i_serialid = Koha::Serial::Items->find( { itemnumber => $i->{itemnumber} }, { prefetch => 'serialid' } ); >- if ($i_order) { >- $warning_messages{ $i->{itemnumber} } = >- sprintf( "There is an order (ordernumber %s) on this item", $i_order->{ordernumber} ); >- } >- if ($i_serialid) { >- $warning_messages{ $i->{itemnumber} } = 'A subscription is linked to this item'; >- } >+ >+ $warning_messages{ $i->{itemnumber} } = { >+ subscription_linked => $i_serialid ? 1 : undef, >+ ordernumber_linked => $i_order ? $i_order->{ordernumber} : undef, >+ }; >+ >+ > $i->{nomod} = 1 unless $patron->can_edit_items_from( $item->homebranch ); > push @items, $i; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 02448b23732..a1ee643224f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -194,7 +194,11 @@ > data-itemnumber="[% item.itemnumber | html %]" > data-has-serial-item="[% Item.HasSerialItem(item.itemnumber) | html %]" > href="#" >- [% IF ( warn_message ) %]data-bs-toggle="tooltip" data-bs-placement="right" title="[% warn_message | html %]"[% END %] >+ [% IF ( warn_message.ordernumber_linked ) %] >+ data-bs-toggle="tooltip" data-bs-placement="right" title="An order is linked to this item ([% warn_message.ordernumber_linked | html %])" >+ [% ELSIF ( warn_message.subscription_linked )%] >+ data-bs-toggle="tooltip" data-bs-placement="right" title="A subscription is linked to this item" >+ [% END %] > > > Delete > [% IF warn_message %] >-- >2.39.5
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 13870
:
147641
|
152235
|
152236
|
155576
|
175440
|
176858
|
179579
|
179580
|
179581
|
179834
|
180952
|
183442
|
183556
|
186020
|
186021
| 186022