From fafc7311c2913ff7049390048c5ba26b5485abfb Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Fri, 29 Apr 2022 07:24:06 -0400 Subject: [PATCH] Bug 20256: (QA follow-up) hide Edit chooice in Actions on items editor if item cannot be edited --- cataloguing/additem.pl | 4 ++-- .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index d80a197872..7d3e3bf7d1 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -563,8 +563,8 @@ if ($op) { my @items; for my $item ( $biblio->items->as_list, $biblio->host_items->as_list ) { my $i = $item->columns_to_str; - $item->{nomod} = 1 unless $patron->can_edit_item($item); - push @items, $item->columns_to_str; + $i->{nomod} = 1 unless $patron->can_edit_item($item); + push @items, $i; } my @witness_attributes = uniq map { 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 b6d0af02f7..b75ecb7113 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -115,7 +115,9 @@ [% IF item.biblionumber != biblio.biblionumber %] [%# Host item %]
  • Edit in host   Delink
  • [% ELSE %] + [% UNLESS item.nomod %]
  • Edit
  • + [% END %]
  • Duplicate
  • Delete
  • -- 2.30.2